Commit Graph

939 Commits

Author SHA1 Message Date
Rachel Fenichel
104958e25f Cleanup: semicolons, spacing, etc. (#1116) 2017-05-19 16:27:48 -07:00
Derek Brown
63fe91180b Add image_onclick option (#1080) 2017-05-19 16:18:54 -07:00
Rachel Fenichel
d4694b49d3 Click events on shadow blocks have the correct id (#1089) 2017-05-19 16:16:01 -07:00
marisaleung
90eeaae8bf Merge pull request #1112 from marisaleung/Add_type_and_id_info_to_xml
Add type and id info to xml
2017-05-19 15:49:02 -07:00
marisaleung
1cd8e1fcc1 Add type, id, and info to the generated xml.
Add xml tests for fieldToDom.
Update workspace tests to pass with new changes.
2017-05-19 15:47:39 -07:00
marisaleung
5fddba7545 Add VariableMap requirement to workspace. 2017-05-17 14:51:29 -07:00
marisaleung
8d5edb3e55 Merge pull request #1096 from marisaleung/develop
Assign variable UUID to field_variable dropdown.
2017-05-15 10:56:56 -07:00
marisaleung
6492f2988a Assign variable UUID to field_variable dropdown. 2017-05-15 10:43:53 -07:00
picklesrus
48a5270072 Fix #1077 by adding a rule to cover the toolbox labels too. (#1099) 2017-05-12 11:29:52 -07:00
marisaleung
cc93e1c6e8 Merge pull request #1085 from marisaleung/develop
Names are correctly fetched from VariableModels.
2017-05-09 10:03:37 -07:00
marisaleung
2bb258165a Names are correctly fetched from VariableModels! 2017-05-09 08:50:11 -07:00
Rachel Fenichel
920422196f Tidy up context menu code. (#1081) 2017-05-05 12:57:40 -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
8c46d7c798 Improve errors when validating JSON block definitions. (#1086)
goog.asserts to not run from blockly_compressed.js. User data validation should always run.
2017-05-05 11:14:54 -07:00
Rachel Fenichel
55096aeb16 Fix #1051 (#1084) 2017-05-05 09:36:24 -07:00
marisaleung
0e0b1a3ebd Merge branch 'develop' into develop 2017-05-04 12:38:15 -07:00
marisaleung
12ea998155 Created separate file for VariableMap 2017-05-03 17:04:15 -07:00
marisaleung
2b1fe1c4e3 Merge pull request #1071 from marisaleung/develop
VariableMap and functions added.
2017-05-03 13:20:05 -07:00
marisaleung
d903b5e86b VariableMap and functions added. 2017-05-03 10:51:24 -07:00
Rachel Fenichel
507c13ed33 Fix #1069 (#1073) 2017-05-02 17:06:03 -07:00
marisaleung
b159c7c3b5 Create separate file for VariableMap and its functions. 2017-05-02 15:06:12 -07:00
marisaleung
2994805e6a VariableMap and functions added. 2017-05-02 10:07:46 -07:00
picklesrus
28572dadac Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059) 2017-04-21 16:20:13 -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
marisaleung
54178c65ae Merge pull request #1055 from marisaleung/develop
Create a variable model with name, id, and type.
2017-04-20 13:31:22 -07:00
marisaleung
9577e5ddc4 Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
2017-04-20 13:19:53 -07:00
Andrew n marshall
1c45724e37 Correcting #1054 (#1056)
single quotes. better logic.
2017-04-19 14:38:22 -07:00
Andrew n marshall
25788a016e Enforcing non-empty names on value inputs and statement inputs. (#1054) 2017-04-19 11:03:16 -07:00
marisaleung
2588ff8353 Merge pull request #1049 from marisaleung/develop
bumpNeighbours_ function moved to block_svg.
2017-04-19 10:25:18 -07:00
marisaleung
21bf339e5d bumpNeighbours_ function moved to block_svg.
Fixed #1009
2017-04-17 15:22:53 -07:00
marisaleung
bae3493980 Merge pull request #1044 from marisaleung/develop
field_angle renders degree symbol consistently.
2017-04-17 09:59:21 -07:00
marisaleung
bc1ca547a4 field_angle renders degree symbol consistently.
Fixes #973
2017-04-14 12:17:09 -07:00
marisaleung
e4edc3899a Ensure useDragSurface is a boolean.
Fixed #988
2017-04-11 15:33:51 -07:00
marisaleung
f19b2c87aa Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
2017-04-11 14:01:25 -07:00
vicng
ae2aaa2159 - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
2017-04-07 15:32:50 -07:00
Rachel Fenichel
f2f522d77a Miscellaneous comment cleanup 2017-04-05 15:52:49 -07:00
Rachel Fenichel
077547ec90 Block browser context menu in the toolbox and flyout 2017-04-04 14:36:01 -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
92f3880008 RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead. 2017-03-27 17:25:41 -07:00
Rachel Fenichel
85b4f5f1a8 Fix #969 2017-03-17 16:25:45 -07:00
picklesrus
fd7d8b1ac8 Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9f). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979) 2017-03-17 16:15:40 -07:00
picklesrus
847d83e4af Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974) 2017-03-10 14:58:09 -08:00
picklesrus
9b98573327 Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904.  This calls blur and focus from workspace.markFocused and removes the event listener on focus events.  markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus.  As far as I can tell, there are no uses of the focus handler that actually did anything for us.
2017-03-08 14:27:53 -08:00
picklesrus
63c899e4e1 Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899) 2017-03-06 16:19:29 -08:00
picklesrus
ab042d4dd8 Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964) 2017-03-03 16:15:02 -08:00
Rachel Fenichel
72256a187d Annotation fixes 2017-03-03 13:22:50 -08:00
Andrew n marshall
6e1ffe09c2 Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
2017-03-03 08:40:00 -08:00
Rachel Fenichel
4b75b6271b Make it easier to read the code that creates the variable category in the tolbox 2017-03-02 13:55:25 -08:00
Rachel Fenichel
05312c9bf7 Merge pull request #952 from rachel-fenichel/feature/if_else_update
Use mutator extension for controls_if block
2017-02-27 19:56:32 -08:00
Rachel Fenichel
c30928a177 Make some functions private and add tests 2017-02-24 15:51:59 -08:00