Commit Graph

61 Commits

Author SHA1 Message Date
Rachel Fenichel
e8d6f7f408 chore: auto-fix violations of comma-dangle rule (#5625) 2021-10-21 09:01:51 -07:00
Neil Fraser
90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Neil Fraser
c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Rachel Fenichel
b25e24fd02 chore: Run clang-format on core/*.js (#5589)
* Run clang-format on core/*.js

* Revert changes for css formatting
2021-10-07 10:32:02 -07:00
Christopher Allen
c5ffd036ca fix: JSDoc improvments for accessors, etc. (#5567)
* fix: Revert removal of documentation for get/set accessors.
  
  This partially reverts commit 839cb7b,
  "fix: infinite loop when using defineProperties (#5549)"

* docs: Use @name to attach JSDocs to accessors

  Reintroduce documentation for deprecated properties where it was
  removed when converting them to accessors.

* docs: Remove duplicate @package declarations

* fix: Fix eslint and compiler errors/warnings

* fix: Minor JSDoc tweaks to address comments on PR #5567
2021-09-29 01:57:28 +01:00
Monica Kozbial
f67214dac5 Update @package annotations (#5558) 2021-09-28 08:55:49 -07:00
Monica Kozbial
d8fbe1b05b Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events

* Add annotations to files under core/interfaces

* Add annotations to files under core/keyboard_nav

* Add annotations to files under core/renderers

* Add annotations to files under core/serialization

* Add annotations to files under core/theme

* Add annotations to files under core/toolbox

* Add annotations to files under core/utils

* Add annotations to files under core
2021-09-27 14:42:54 -07:00
alschmiedt
839cb7bef1 fix: infinite loop when using defineProperties (#5549) 2021-09-27 14:31:30 -07:00
Aaron Dodson
e0693a65d2 chore: Remove declareLegacyNamespace() from files in core (#5525)
* chore: Remove declareLegacyNamespace() from files in core

* fix: Update missing/errant re-exports in blockly.js
2021-09-23 14:48:52 -07:00
Aaron Dodson
e1310b6464 fix: JSDoc generation for modules without classes 2021-09-22 14:37:55 -07:00
Aaron Dodson
646a931d77 Migrate core/tooltip.js to goog.module syntax (#5222)
* Migrate core/tooltip.js to ES6 const/let

* Migrate core/tooltip.js to goog.module

* Migrate core/tooltip.js to named requires

* clang-format core/tooltip.js

* Fix exports of mutable fields in core/tooltip.js

* Don't assign a value when exporting visible in core/tooltip.js
2021-09-09 12:45:16 -07:00
Rachel Fenichel
1eabe91fa6 Move set/getParentContainer into common 2021-08-04 15:59:41 -07:00
Neil Fraser
d519ab8f54 JSDoc improvements 2021-05-27 21:30:26 -07:00
Monica Kozbial
57749e6eb8 Updating bump logic to support single-direction scrollbars (#4652)
* Updating bump logic to support single-direction scrollbars
2021-03-01 12:20:12 -08:00
Sam El-Husseini
f97730e83c Sort requires (#4658)
* Cleanup gulp method to sort requires
2021-02-25 17:17:42 -08:00
Rachel Fenichel
1d8c234d33 Update uses of bindEvent_, bindEventWithChecks_, and unbindEvent_. Add missing requires for Blockly.browserEvents. 2021-02-23 11:23:28 -08:00
alschmiedt
b01faa09e0 Fix typo (#4324) 2020-09-25 13:52:35 -07:00
Beka Westberg
47cc3b97b0 Add getTooltip (#4254)
* Add getTooltip

* Add tests

* Fix typings?

* Fix typings?

* PR Comments
2020-09-10 08:57:05 -07:00
Sam El-Husseini
a3dbbfd7ab Support a custom container element for the dropdowndiv, widgetdiv and tooltip. (#3772)
* Support a custom container element for the dropdowndiv, widgetdiv and tooltip
2020-03-27 17:13:46 -07:00
alschmiedt
7f9539e64b Fix inner html (#3759)
* Fix ie11 bug by switching from innerHtml to innerText

* Change to textContent
2020-03-20 13:46:59 -07:00
Sam El-Husseini
14428a0da4 Fix two memory leaks (#3747)
* Fix two memory leaks
2020-03-13 14:49:08 -07:00
Neil Fraser
4e2f8e6e02 Use SPDX licences.
This is a followup to #3127.
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Sam El-Husseini
8eba82b906 Fix 4 misc warnings (#3283) 2019-10-17 16:52:52 -05:00
Neil Fraser
b46a4fe286 Bring our license format up to date (#3127)
* Google changed from an Inc to an LLC.

This happened back in 2017 but we didn’t notice.  Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.

* Remove project description/titles from licenses

This is no longer part of Google’s header requirements.  Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).

* License no longer requires URL.

* Fix license regexps.
2019-10-02 14:46:56 -07:00
Beka Westberg
2af17fd782 Removed obsolete widgetDiv check in tooltip code. 2019-06-11 13:32:10 -07:00
Neil Fraser
d1a29739d8 Move utilities into own directory.
TODO: There are more functions which may be migrated into dom and string.
2019-06-07 10:32:57 -07:00
Beka Westberg
f0d6fbd192 Reorganized field view initialization. 2019-05-31 10:38:18 -07:00
Neil Fraser
49954e0cec Remove calls to goog.dom.getViewportSize
document.documentElement.clientWidth/clientHeight seems to work everywhere Blockly works.  Closure’s functions are mind-numbingly complex due to IE5, old WebKit, Opera 8, and others.
2019-05-17 15:04:39 -07:00
Neil Fraser
dddb94aedd Fix circular dependency. 2018-10-16 11:34:10 -07:00
Neil Fraser
f802859547 Remove goog.dom.removeChildren
HTML can be nullified with innerHTML, SVG needs a loop.
2018-07-11 12:20:02 -07:00
Neil Fraser
284b79407e Require Blockly.utils where needed. 2018-07-11 12:20:02 -07:00
Neil Fraser
eea2794e38 Remove goog.dom.TagName 2018-07-11 12:20:02 -07:00
Neil Fraser
3909bd420a Remove all goog.asserts and goog.isXxx
First step to reducing Closure’s footprint.
2018-07-11 12:20:02 -07:00
Rachel Fenichel
52e0241f66 Add argsIgnorePattern to the eslintrc 2018-04-06 13:29:22 -07:00
picklesrus
e0f7862547 spacing changes 2017-11-02 14:05:29 -07:00
picklesrus
de8d13eaa1 Fix lint errors so we can eventually run eslint on travis. 2017-11-02 14:05:29 -07:00
Paul Kaplan
075bda45a5 Block rendering performance (#1363)
* Use Blockly.Field.getCachedWidth instead of non-caching method

* Check for timeout pid before calling clearTimeout
2017-10-13 14:08:52 -07:00
Rachel Fenichel
98914fcf6b Dragging changes, rebased on develop (#1078)
* Add block drag surface translateSurfaceBy

* Add dragged connection manager

* Add gesture.js

* Add GestureHandler

* Implemented gesture skeleton

* Most basic workspace dragging

* Add dragged connection manager

* cleanup

* doc

* more cleanup

* Add gesture handler

* Add translateSurfaceInternal

* core/block_dragger.js

* cleanup

* Pull in changes to dragged connection manager

* Pull in changes to dragged connection manager

* comments

* more annotations

* Add workspace dragger

* Add coordinate annotations

* Start on block dragging

* Limit number of concurrent gestures

* Add some TODOs

* start using dragged connection manager

* Set origin correctly for dragging blocks

* Connect or delete at the end of a block drag.

* cleanup

* handle field clicks and block + workspace right-clicks

* move code into BlockDragger class, but still reach into Gesture internals a lot

* Clean up block dragger

* Call blockDragger constructor with correct arguments

* Enable block dragging in a mutator workspace

* Add workspace dragger

* click todos

* Drag flyout with background

* more dragging from flyout

* nit

* fix dragging from flyouts

* Remove unused code and rename gestureHandler to gestureDB

* Rename gesture handler

* Added some jsdoc in gesture.js

* Update some docs

* Move some code to block_svg and clean up code

* Lots of coordinate annotations

* Fix block dragging when zoomed.

* Remove built files from branch

* More dragging work (#1026)

-- Drag bubbles while dragging blocks
-- Use bindEventWithChecks to work in touch on Android. Not tested anywhere else yet.
-- Handle dragging blocks while zoomed
-- Handle dragging blocks in mutators
-- Handle right-clicks (I hope)
-- Removed lots of unused code

* More dragging work (#1048)

- Removed gestureDB
- Removing uses of terminateDrag
- Cleaned up disposal code

* Dragging bugfixes (#1058)

- Get rid of flyout.dragMode_ and blockly.dragMode_
- Make drags from the flyout start from the top block in the group
- Block tooltips from being scheduled or shown during gestures
- Don't resize mutator bubbles mid-drag

* Fix events in new dragging (#1060)

* rebuild for testing

* unbuild

* Fix events

* rebuild

* Fix up cursors

* Use language files from develop

* Remove handled TODOS

* attempt to fix IE rerendering bug, and recalculate workspace positions on scroll

* Rebuild all the things

* Comment cleanup; annotations; delete unused variables.
2017-05-05 12:42:53 -07:00
Andrew n marshall
e95991cba8 Adding @namespace annotations for JSDoc. (#900) 2017-02-01 09:10:35 -08:00
Neil Fraser
4cda20dbbf Fix speling. 2016-11-19 02:40:11 -08:00
Rachel Fenichel
acaf81185e Mouseover behaviour fixes (#684)
* fix broken tooltips

* use bindEvent to make mouseover and mouseout work in the flyout
2016-10-11 10:55:42 -07:00
Rachel Fenichel
ed983333eb bindEventWithChecks_ for internal use, and bindEvent_ with old behaviour but deprecated 2016-09-23 13:46:11 -07:00
Rachel Fenichel
c373d6d091 Make context menus work again; fix dragging from the toolbox with variables. 2016-09-07 15:49:20 -07:00
Rodrigo Queiro
d9a3569706 Convert createDom calls to createUntypedDom (#481)
Unless they could be converted to use goog.dom.TagName, in which case do
that. createDom is going to require goog.dom.TagName member as the
tagName parameter. This change prepares for that.
2016-07-18 07:18:17 -07:00
Neil Fraser
3012d52808 Line wrap comments in generated code. 2016-06-08 00:12:58 -07:00
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
Neil Fraser
ac0b5e7871 Use ENUM for dragMode. Blocks no longer sticky when created from disappearing flyout. 2016-03-29 08:36:11 -07:00
Neil Fraser
06858e8972 Trivial number/text/colour blocks should inherit parent's tooltip. 2016-02-02 16:20:02 -08:00
Neil Fraser
5b7fec7092 Add zooming feature.
By carloslfu.
2015-08-19 17:21:05 -07:00
Neil Fraser
bd144f14ea Fix tooltip location when page is scrolled.
Also of note, Closure Compiler is no longer preserving licences.
2015-08-06 11:12:41 -07:00