Commit Graph

68 Commits

Author SHA1 Message Date
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
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Rachel Fenichel
acd3a00f4a Unify code for positioning the widget div (#1334)
* New widget div functions, used in context menu code

* Make all widget div positioning functions use the same argument order

* Use new widget div functions for fields

* share code for measuring menu size

* Get rid of positionMenu

* Update copyright date

* Rebuild blockly_uncompressed because there's a new require in town
2017-09-22 16:07:32 -07:00
Sam El-Husseini
9c0de1ae8d Avoid IE and Edge re-rendering (#1326)
* Fix wrong width of field_dropdown with an image on Edge / IE

* Avoid re-rendering on IE and Edge by using getBBox().width to compute the text width on those browsers
2017-09-19 15:04:25 -07:00
Rachel Fenichel
dd50dde23d Make dropdowns update correctly when you switch between images. (#1321) 2017-09-18 13:09:07 -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
CoryDCode
537bf17b7d Adding the remove variable modal and functionality to accessible Blockly. (#1011) 2017-03-30 11:31:31 -07:00
Rachel Fenichel
5a40208138 Separate tests 2017-02-06 15:25:59 -08:00
Rachel Fenichel
630863d9db Add isEditable to field, and add tests 2017-02-06 14:47:45 -08:00
Tim Dawborn
d55d9cbd9f Attempt to work around the IE/Edge bug where getComputedTextLength() throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue. 2017-01-27 15:15:09 +11:00
Rachel Fenichel
3742788557 annotation updates 2017-01-26 16:37:35 -08:00
Neil Fraser
ac0105cb4d Set the text not the value when closing a text editor.
Also rename variables for clarity.
2016-11-24 10:39:13 -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
Neil Fraser
01ab0b4ab6 Add arrow to images in dropdown menus. Fold updateTextNode_ into render_. 2016-11-06 21:19:07 -08:00
Neil Fraser
5b033e2f7b Misc cleanup. 2016-11-05 00:15:39 -07:00
Neil Fraser
917b8ff542 Lint and style tweaks. 2016-11-02 17:11:41 -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
b77c080678 Fix bugs with missing mouseUp events on mutators. Also stop filtering out key presses. 2016-08-25 15:18:53 -07:00
Rachel Fenichel
dc6ca79d4b Merge branch 'develop' into feature/simple_multitouch 2016-08-25 12:25:48 -07:00
Neil Fraser
1aeb26860a Routine recompile. 2016-07-26 17:23:57 -07:00
Rachel Fenichel
6b7965a727 Ignore everything but the first touch stream 2016-07-20 17:03:24 -07:00
Neil Fraser
19005ca3bf Routine recompile. 2016-07-19 16:44:12 -07:00
Neil Fraser
e03a4a9e30 Fix creation of uneditable blocks. Issue #324. 2016-07-18 00:54:34 -07:00
Neil Fraser
5c2c4d8400 Refactor validators to survive aggressive Closure compression. 2016-07-15 20:59:20 -07:00
Neil Fraser
555eac8b7f Simplify field validator chaining. 2016-06-29 17:44:12 -07:00
Rodrigo Queiro
2dcb6cb68b Ignore mouseup at end of drag with isDragging (#416)
This includes both block drags and workspace scrolls and fixes #404. I
used isDragging rather than checking the origin of click so that it can
easily be extended to the case where the flyout is scrolled by dragging
a block, a la LLK/scratch-blocks#206.
2016-06-28 18:11:48 -07:00
Neil Fraser
36130cbc39 Don't fire change event on fields that haven't been named yet. 2016-06-15 01:30:04 -07:00
Neil Fraser
04ebbb3b76 Fix undo on fields with validators with side effects. 2016-06-14 18:42:49 -07:00
Rachel Fenichel
3605dfb9c0 Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
Rachel Fenichel
640b38f38e lint 2016-05-05 13:13:48 -07:00
Neil Fraser
4ac1204550 Set field.sourceBlock in headless Blockly. 2016-04-04 17:47:15 -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
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
Neil Fraser
63c112932b Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
Neil Fraser
c429949a4e Add Create, Delete, and Change events.
Not counting change for mutators.
2016-01-20 19:11:03 -08:00
Neil Fraser
36fe3994c9 Misc cleanup. 2016-01-15 15:36:06 -08:00
Neil Fraser
890d8d8d73 Fix zoom center button. Reverse disconnect wiggle. 2015-09-22 17:28:51 -07:00
Troy McKinnon
6d6716c3d3 adding type annotations 2015-09-22 13:32:14 -05:00
Neil Fraser
6f2f3914f6 Double rendering speeds by adding a cache to prevent repeated calls to getComputedTextLength. 2015-09-15 16:20:13 -07:00
Neil Fraser
db940ca493 Fix reversed height and width on image fields. 2015-09-07 18:52:07 -07:00
Neil Fraser
f601bdc3c7 Fix FF editor location by a pixel. 2015-08-21 14:13:07 -07:00
carlosperate
055c11155d Update getScaledBBox_ to return new object to fix issue in IE. 2015-08-21 18:51:25 +01:00
Neil Fraser
5b7fec7092 Add zooming feature.
By carloslfu.
2015-08-19 17:21:05 -07:00
Neil Fraser
94d3b6f4ea Add ellipsis to long fields. 2015-07-21 18:24:07 -07:00
Neil Fraser
45fd0e9d44 Remove unused field clone. 2015-07-20 16:17:21 -07:00
Neil Fraser
09f5ac6f7b Remove non-functioning workspace long-click. 2015-07-13 17:48:50 -07:00
Troy McKinnon
68dbb71610 adding missing type documentation to public fields 2015-07-13 16:44:11 -05:00
Neil Fraser
9050e32954 Adding JsonInit method of creating blocks. 2015-06-08 15:54:18 -07:00