Commit Graph

82 Commits

Author SHA1 Message Date
Rachel Fenichel
b4109d7c43 Add no-multi-spaces rule 2019-07-31 09:33:54 -07:00
Neil Fraser
74be35e23d Rename Blockly.Xml.utils to Blockly.utils.xml 2019-07-08 13:29:43 -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
9f528922a7 Fix some dependencies 2019-05-24 15:45:05 -07:00
Neil Fraser
4161ba0fa7 Move goog.global to Blockly.utils.global
Can’t use Blockly.global since that’s the last file to load.
2019-05-17 15:04:39 -07:00
Neil Fraser
25adb40e66 Prefix and suffix edge cases for flow statements.
Call suffix code on break/continue before executing the break/continue.
Call prefix code for enclosing loop before executing continue.
2019-05-14 17:19:31 -07:00
alschmiedt
c4f8313792 Updates function call 2019-04-08 14:14:56 -07:00
Neil Fraser
f118d33855 Corrections to JSDoc comments 2019-03-29 15:24:37 -07:00
Rachel Fenichel
fd8865bda6 Merge pull request #2311 from BeksOmega/fixes/AbsoluteMetrics
Changed Absolute Metrics to Avoid Simple Toolboxes
2019-03-01 11:01:50 -08:00
Beka Westberg
e0673faf41 Added event filtering to workspaceChanged in mutator. (#2320) 2019-02-27 16:06:37 -08:00
Beka Westberg
69718f2fd4 Removed accessing private flyout.width_ variable. 2019-02-26 16:33:18 -08:00
Beka Westberg
a0aa84d861 Changed absolute metrics to avoid simple toolboxes. 2019-02-23 14:34:26 -08:00
Neil Fraser
471b54bea8 Disable orphaned mutator blocks. (#2304) 2019-02-20 08:59:32 -08:00
alschmiedt
caf664db04 Small fixes 2019-01-09 15:38:30 -08:00
alschmiedt
d3a603ffd9 Update the style on blocks in the mutator 2018-12-21 09:00:55 -08:00
Neil Fraser
dddb94aedd Fix circular dependency. 2018-10-16 11:34:10 -07:00
Neil Fraser
e62bb1af73 Remove all calls to goog.dom.createDom
All XML node cereations are now centralized.
2018-10-16 11:34:10 -07:00
Neil Fraser
284b79407e Require Blockly.utils where needed. 2018-07-11 12:20:02 -07:00
Andrew n marshall
2c84161b4a Correct require goog.Timer statements. (#1906) 2018-06-06 15:57:53 -07:00
Neil Fraser
662d79443f Add 'ordered' option to descendant getting functions. (#1786) 2018-04-17 11:41:03 -07:00
Rachel Fenichel
701b187640 Fix #1699 2018-03-16 15:00:31 -07:00
Neil Fraser
b1e4648c3c Use dataset instead of ID. 2018-03-16 14:46:05 -07:00
Neil Fraser
867dcdb716 Add IDs to bubbles. 2018-03-16 14:46:05 -07:00
Rachel Fenichel
4c9b602523 Move event classes into separate files, and update requires accordingly 2018-02-27 17:47:33 -08:00
Rachel Fenichel
f3a4664dea Delete extra variables at the end of a procedure argument edit 2018-02-15 17:18:23 -08:00
Rachel Fenichel
2b7b4bf3af More lint 2018-01-24 16:40:07 -08:00
Rachel Fenichel
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
3575d53018 57 errors remaining 2018-01-23 18:42:45 -08:00
picklesrus
de8d13eaa1 Fix lint errors so we can eventually run eslint on travis. 2017-11-02 14:05:29 -07:00
marisaleung
aff9c4867c Correctly named block events called. 2017-06-08 15:44:43 -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
picklesrus
52f76013b5 Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors.  The old way was quite slow because it changed the stylesheet directly.  See issue #981 for more details on implementation and tradeoffs.  This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
2017-04-21 14:57:54 -07:00
picklesrus
a82bd49d7e Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG.  This paves the way to make performance
improvements to workspace dragging.
2016-12-09 16:19:19 -08:00
Neil Fraser
4cda20dbbf Fix speling. 2016-11-19 02:40:11 -08: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
Katelyn Mann
33e9d75457 Fix for #521.
Add a isMutator member similar to isFlyout to workspace_svg so it knows whether
it is mutator or not. Allow blocks to access that property so that they can recalculate
coordinates appropriately.
2016-08-16 11:19:29 -07:00
picklesrus
d215314ffd Revert "Convert createDom calls to createUntypedDom" 2016-07-20 15:21:45 -07:00
Neil Fraser
877aa7522d Fix mutator/warning/comment icons to highlight on mouse over only if they are usable. 2016-07-19 16:34:48 -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
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
Rachel Fenichel
cb4e9cd737 Fix mutator workspace in ltr 2016-05-13 15:06:06 -07:00
Neil Fraser
7e96a60da7 Use goog.math.Coordinate instead of separate X and Y properties. 2016-04-19 21:14:49 -07:00
rachel-fenichel
ae1a0aab8a add isConnected() to connections. 2016-03-30 15:10:59 -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
db7a787778 Add UI events. 2016-03-28 15:40:37 -07:00
Neil Fraser
82fdb5805b Fix leaky group. Recompile. 2016-03-24 16:54:53 -07:00
Neil Fraser
e0ebce1b60 Fix undoing function argument changes. 2016-03-24 15:30:29 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
Neil Fraser
6ae436a153 Add undo/redo context menu options on workspace. 2016-03-17 14:44:26 -07:00