Commit Graph

160 Commits

Author SHA1 Message Date
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
Rachel Fenichel
ed983333eb bindEventWithChecks_ for internal use, and bindEvent_ with old behaviour but deprecated 2016-09-23 13:46:11 -07:00
Rachel Fenichel
8f601345bb cache delete areas instead of recalculating them onMouseDown 2016-06-17 12:39:18 -07:00
Neil Fraser
46b1310743 Fix trashcan hotspot in RTL. 2016-05-14 03:44:37 -07:00
rachel-fenichel
21e999678c correctly position trash can and zoom controls when the flyout is always open; add flyout and toolbox size to main workspace metrics; get rid of flyout's vertical offset. 2016-04-13 15:30:11 -07:00
rachel-fenichel
b22b25e8f8 correctly position the trash can and zoom controls for RTL, toolbox at left 2016-04-13 14:04:14 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
picklesrus
80d8d55315 Cache delete area rectangle bounds in the on mouse down event
to avoid getting it for every mouse move event. The delete areas
won't change while the user is dragging blocks around.
Also switch calculations for delete area inclusion to be done in
client coordinates so we don't have to convert to svg coordinates on
every mouse move event.
This should speed up dragging blocks a bunch.
2016-02-03 15:36:39 -08:00
Neil Fraser
11ef9f2988 Add hook for clicking on trashcan. 2015-10-25 23:50:20 -07:00
Neil Fraser
58db773526 Move trashcan split by 1px.
Firefox on Windows is off by a pixel.
2015-09-11 21:50:44 -07:00
Neil Fraser
f9d47bd39e Lay out trashcan and zoom controls more flexibly. 2015-09-01 22:44:33 +01:00
Neil Fraser
5b7fec7092 Add zooming feature.
By carloslfu.
2015-08-19 17:21:05 -07:00
Neil Fraser
0478d308a6 Trivial cleanup. 2015-08-18 11:34:22 -07:00
Neil Fraser
1ca2fdc844 Add classes to svg groups. 2015-07-14 23:13:09 -07:00
Neil Fraser
ede636361d Simplify workspace resizing. 2015-04-28 17:55:45 -07:00
Neil Fraser
17961f7f58 Support multiple Blockly instances. 2015-04-28 13:51:25 -07:00
Neil Fraser
1916f2351d Remove failed attempt at spriting icons. 2015-03-25 17:24:28 -07:00
Neil Fraser
3e12c1ea5e Render sprites from vectors. Remove blurry shadow from trash. 2015-03-23 23:55:13 -07:00
Neil Fraser
c9addf7e31 Improve accuracy of goog.require calls. 2015-02-06 15:27:25 -08:00
Neil Fraser
03e53d2d68 Fix runaway trashcan lid task (issue 261 on code.google.com). 2015-01-26 06:06:46 -08:00