Commit Graph

79 Commits

Author SHA1 Message Date
Rachel Fenichel
13e4d671c3 Moved setHighlighted and setDisabled into the path object. 2019-11-01 14:28:51 -07:00
Neil Fraser
123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07:00
Sam El-Husseini
bfe62f98ca Dispose makes the types we use inconsistent. Suppress checkTypes in dispose. (#3336) 2019-10-24 15:47:42 -04:00
Sam El-Husseini
4f02ceeba0 Make Blockly options an interface (#3312)
* Make workspace options an interface so it can be extended in the d.ts.
2019-10-22 14:20:26 -04:00
Sam El-Husseini
3c2c4677df Fix 55 warnings related to flyouts. (#3211)
* Fix 55 warnings related to flyouts.
2019-10-16 12:13:37 -05:00
Beka Westberg
8f73fdb512 Fixed comments in trashcan. 2019-10-15 13:02:02 -07:00
Beka Westberg
b2a8172720 Fixed disabled blocks in trashcan. 2019-10-15 13:02:02 -07:00
Rachel Fenichel
79c2fa6688 Make trashcan setOpen package and update a few annotations. 2019-10-03 18:08:27 -07:00
Rachel Fenichel
79bedca5a7 Element -> SVGElement (#3140)
* Use SVGElement instead of Element for the results of createSvgElement

* More SVGElement annotations.
2019-10-02 16:12:31 -07: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
Neil Fraser
b701475984 Simplify trashcan code (#3110)
Also delete unused props in CSS.
2019-09-27 11:43:56 -07:00
Neil Fraser
6650ecf13f Make dynamic variables be an optional module.
Also straighten out some dependencies.
2019-09-27 10:48:14 -07:00
Neil Fraser
6e76b6f49e Make flyout buttons be an optional module. 2019-09-24 10:58:33 -07:00
Neil Fraser
ddb8e46b87 Make flyouts be optional modules.
No Blockly instances need both Horizontal and Vertical flyouts.  Dropping one of these saves 2 KB.  Some don’t need flyouts at all (e.g. Blockly Games Puzzle or readonly documentation blocks).
2019-09-23 22:02:59 -07:00
Neil Fraser
56e7a46f45 Add more missing dependencies
Submitted without review.  From this bug:
https://github.com/google/blockly-games/issues/116
2019-09-21 08:48:27 -07:00
Sam El-Husseini
fc420b7037 Support for registering renderers and switching between them (#3013)
* Added support for registering renderers and for choosing which renderer the workspace wants to use.
2019-09-13 10:30:20 -07:00
Rachel Fenichel
16f0992764 Enable operator-linebreak rule 2019-07-31 09:45:27 -07:00
Beka Westberg
5a4cc7ae12 Removed textToDom Needing <xml> Documents (#2585)
* Removed textToDom needing <xml> documents.

* Fixed jsdoc.

* Followon changes resulting from lack of XML tag.

* Fix Mocha test.
2019-06-24 15:50:06 -07:00
Neil Fraser
6947010c49 Change Rect to use top/bottom/left/right
Instead of top/left/height/width.  Given our uses of Rect, it makes the math slightly simpler.

This is a setup for using Rect in other places.  Currently it is only used to describe delete areas.
2019-06-07 10:32:57 -07:00
Neil Fraser
98a98bcce6 Add Blockly.utils.dom.XLINK_NS
And fix provide/require mixup.
2019-06-07 10:32:57 -07:00
Neil Fraser
848d3a3509 Move setCssTransform & createSvgElement to dom.
Also move SVG_NS and HTML_NS properties.
2019-06-07 10:32:57 -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
Neil Fraser
f2c57dea1b Remove goog.math.Rect dependency 2019-06-07 10:32:57 -07:00
Beka Westberg
985bf3af3b Fixed how the trashcan handled shadow blocks. (#2545) 2019-06-05 09:53:56 -07:00
Neil Fraser
9f528922a7 Fix some dependencies 2019-05-24 15:45:05 -07:00
Neil Fraser
f118d33855 Corrections to JSDoc comments 2019-03-29 15:24:37 -07:00
Neil Fraser
e9de083361 Fix @return JSDocs. 2019-03-29 15:24:37 -07:00
Neil Fraser
405b1e4e78 Lint issues found while debugging. 2019-03-27 15:47:29 -07:00
Beka Westberg
772c501ac3 Fixed multiple trashcans on the same page leaking state. 2019-02-12 13:55:37 -08:00
Beka Westberg
4f51ea222c Changed the trashcan lid to always open towards the workspace. 2019-01-28 18:04:37 -08:00
Rachel Fenichel
8fc4ea19ed Merge pull request #2241 from BeksOmega/fixes/DisabledContentsBlocks
RetrieveDisabled Blocks from the Trashcan
2019-01-28 16:47:53 -08:00
Beka Westberg
999a204dbd Added the ability to drag disabled blocks out of the trashcan flyout. 2019-01-28 16:26:21 -08:00
Beka Westberg
363ff487a4 Changed trashcan and zoom controls to be positioned in the opposite corner of the toolbox. Fixed trashcan hotspot being incorrect. 2019-01-28 15:24:56 -08:00
Beka Westberg
2b05b83c74 Added displaying flyout horizontally when layout is horizontal. 2019-01-10 13:21:14 -08:00
Beka Westberg
96e754cf36 Updated Comments. 2018-12-19 18:10:57 -08:00
Beka Westberg
9ee7319ac5 Trashcan/Zoom Anchored to Top when Toolbox is on Bottom. 2018-12-19 10:26:07 -08:00
Beka Westberg
dcae85dd4f Added maxTrashcanContents Property to Workspace Options (#2183)
* Added maxTrashcanContents property to workspace options.

* Changed default with trashcan to 32.
2018-12-18 13:22:43 -08:00
Beka Westberg
77ee4c8e22 Reverted to storing xml as text. 2018-12-12 15:20:12 -08:00
Beka Westberg
39b7f95827 Renamed var block to node in cleanBlockXML_. 2018-12-12 06:50:35 -08:00
Beka Westberg
5f2d5df321 Fixed nits. Changed contents to store XML. Added removing IDs from all descendants. Removed deleteNext. 2018-12-11 16:46:24 -08:00
Beka Westberg
31daf37922 Fixed lid angle not being set property through events. 2018-12-10 16:43:18 -08:00
Beka Westberg
15b34f7e73 Added flyout to trashcan to "get back" deleted blocks.` 2018-12-07 10:44:24 -08:00
Andrew n marshall
411ec9724e Replacing node.parentNode.removeChild(node)
...with Blockly.utils.removeNode(..), which includes
a null/undefined check on parentNode before continuing.
2018-09-04 13:31:53 -07:00
Neil Fraser
c51cf0b79c Remove goog.dom.removeNode 2018-07-11 12:20:02 -07:00
Neil Fraser
07d1d86283 Remove remaining goog.math 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
05fcdc3510 Remove goog.Timer 2018-06-12 14:06:10 -07:00
Rachel Fenichel
1e3450a051 Indentation lint that blocks moving to eslint 4.0 2018-01-23 17:27:35 -08:00
Neil Fraser
fc8d4c90b4 Compatibility for Closure Compiler. (#1240) 2017-07-31 09:07:41 -07:00
Neil Fraser
f6aef459fc API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
2016-11-15 13:54:33 -08:00