Commit Graph

1541 Commits

Author SHA1 Message Date
Neil Fraser 51bfa9455d More comprehensive approach to gesture detection.
Search all workspaces.  The flaw with looking at the workspace of the selected block is that dragging a workspace is a gesture but has no selected block.
2019-03-29 15:24:37 -07:00
Neil Fraser e9de083361 Fix @return JSDocs. 2019-03-29 15:24:37 -07:00
Neil Fraser 68e134b073 No keyboard access to quarks during drag.
Same issue as zooming with the mouse wheel.
2019-03-29 15:24:37 -07:00
Neil Fraser 6862a7fe70 Use hashes instead of objects. 2019-03-29 15:24:37 -07:00
Neil Fraser 45e24c2b98 No need to check non-null before nullifying 2019-03-29 15:24:37 -07:00
Neil Fraser 6fb95f9038 Consistent speling. 2019-03-29 15:24:37 -07:00
Neil Fraser 87385b0721 Make drag detection more robust.
Previously, one could drag (and hold) a quark outside the bounds of a mutator bubble, then scroll, and the old code wouldn’t query the mutator for gestures.
2019-03-29 15:24:37 -07:00
Neil Fraser 46a4f33e4e Fix JSDoc 2019-03-29 15:24:37 -07:00
Neil Fraser d6096accca Remove Blockly.WidgetDiv.position
Nobody appears to call it.
2019-03-29 15:24:37 -07:00
Neil Fraser 2fd931cab9 Add comment regarding async nature of listening. 2019-03-29 15:24:37 -07:00
Neil Fraser 50519413d0 Line length 2019-03-29 15:24:37 -07:00
Beka Westberg 5b25843b98 Fixed trashcan flyout positioning. 2019-03-29 08:19:24 -07:00
Neil Fraser 405b1e4e78 Lint issues found while debugging. 2019-03-27 15:47:29 -07:00
Neil Fraser dbafdcf1ff Prevent gestures from being broken by zoom/scroll. 2019-03-27 15:47:29 -07:00
alschmiedt bf45c85bf1 Add private annotation 2019-03-22 10:14:43 -07:00
alschmiedt b6b7ab0091 Refactor setTheme 2019-03-22 09:54:52 -07:00
alschmiedt 5c18e102ca Fixed setTheme so it doesn't error when no workspace is created 2019-03-21 15:32:18 -07:00
Beka Westberg e947471215 Fixed updateToolbox not properly updating flyouts. (#2332) 2019-03-19 15:48:52 -07:00
alschmiedt 715fdde945 Reverts changes to fix bug with selecting dropdown 2019-03-12 10:39:09 -07:00
amber-cd c2f30d4ca6 Update toolbox.js
Changed style attribute to categorystyle.
2019-03-05 08:39:20 -05:00
Rachel Fenichel 47fff5cddb Merge pull request #2313 from rachel-fenichel/feature/dropdowndiv
Add dropdowndiv and use it for the colour picker and angle fields
2019-03-01 12:54:39 -08:00
Rachel Fenichel e20a7ef3c2 Use constants for dropdown div colours in the colour field 2019-03-01 12:38:37 -08: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
Rachel Fenichel c43988873e Don't try to bump if the object has already been deleted. 2019-02-28 17:32:55 -08:00
Beka Westberg d0559a5eeb Fixed scroll event binding to work with multiple workspaces. 2019-02-28 15:43:52 -08:00
Rachel Fenichel 0b1bd78674 Clarify some dropdown rendering code 2019-02-28 15:11:57 -08:00
Beka Westberg e0673faf41 Added event filtering to workspaceChanged in mutator. (#2320) 2019-02-27 16:06:37 -08:00
Beka Westberg 168ee80b05 Removed console log. 2019-02-26 16:37:56 -08:00
Beka Westberg 69718f2fd4 Removed accessing private flyout.width_ variable. 2019-02-26 16:33:18 -08:00
Rachel Fenichel 1546f56308 Add click target property to fields, with accessor 2019-02-26 16:23:21 -08:00
Rachel Fenichel dfc74b8c4f Use dropdownDiv for the angle field as well 2019-02-26 14:54:21 -08:00
Rachel Fenichel 58027b9668 css cleanup 2019-02-26 11:10:55 -08:00
Rachel Fenichel 4f3bb673ef Add require and rebuild for travis 2019-02-26 11:05:27 -08:00
Rachel Fenichel 2c624c5144 Use dropdowndiv for field colour but not field dropdown 2019-02-26 11:03:28 -08:00
Beka Westberg a0aa84d861 Changed absolute metrics to avoid simple toolboxes. 2019-02-23 14:34:26 -08:00
Rachel Fenichel d7e47c66b2 Merge pull request #2286 from BeksOmega/fixes/AddHideChaffToDocument
Fixes Block Input Sticking to the Screen When Navigated Away
2019-02-22 14:19:11 -08:00
Rachel Fenichel 351202d7c5 Merge pull request #2306 from BeksOmega/fixes/ScrollConstants
Added Scroll deltaMode Multiplier Constants
2019-02-22 14:18:15 -08:00
Bluefox e84a740d3d Fix error by init of dropdown in case the value is "" (#2308)
I have following dropdown options

```
[
    ["no matter", ""]
    ["Update", "true"]
    ["Command", "false"]
]
```
In case my value is "" the text is not filled with "no matter" by the initial draw and the empty selector is shown. I expect the text "no matter"

This PR fixes that
2019-02-22 10:02:14 -08:00
Beka Westberg 7e3bff2552 Readded the toolbox click subscriber. Added preventing propagation to the toolbox click subscriber. Added clearing touch identifier to the document click subscriber. 2019-02-21 14:57:19 -08:00
Rachel Fenichel c426aad387 Use dropdown div for dropdowns 2019-02-21 13:41:45 -08:00
Rachel Fenichel 763a06a7ac Use dropdown div for colour field 2019-02-21 13:41:45 -08:00
Rachel Fenichel 91408a3238 Add dropdowndiv file 2019-02-21 13:41:45 -08:00
Beka Westberg 4e7e712549 Added scroll delta mode constants. 2019-02-21 07:35:44 -08:00
Beka Westberg 0f86d6b69c Fixes block input sticking to the screen when navigated away. 2019-02-21 06:57:20 -08:00
Mark Gibson 09ce0873a8 Fix hat logic 2019-02-21 14:49:01 +00:00
Andrew n marshall 570eecbff8 Correcting jsdoc tag spacing (PR #2303) 2019-02-20 11:33:16 -08:00
Neil Fraser 471b54bea8 Disable orphaned mutator blocks. (#2304) 2019-02-20 08:59:32 -08:00
Beka Westberg 9dec2da5c5 Movement Updates (#2247)
This is a squash and merge of a large set of changes by @BeksOmega 

* Added functionality to scrolling, dragging, and zooming.

* Fixed incorrect changes to workspaceChanged function.

* Fixed comment.

* Fixed typo.

* Removed scrollbar.set calls from workspace_svg.

* Removed scrollbar.resize() call.

* Added move options to playground.

* Fixed scroll_ calls that replaced scrollbar.set calls.

* Removed this.scrollbar checks.

* Changed zoom so that it always zooms towards the coordinates. Changed isContentBounded_ to be separate from isMovable_ (b/c of the previous change zoomControls had to be added to the bounded check). Fixed scroll_() calls... again.

* Changed procedures so the Highlight definition option is only available if the workspace is moveable.

* Fixed scrollCenter so that it works with flyout toolboxes.

* Fixed zoomToFit so that it works with horizontal flyout toolboxes.

* Fixed Typo.

* Fixed bumping blocks when the workspace is not movable.

* Fixed bumping not working with left and top toolbox positions.

* Re-Added not allowing scrollCenter if the workspace is not movable. Disabled scrollCenter button for this case.

* Cleaned up formatting.

* Fixed bumping... again. Reformatted workspaceChanged a bit.

* Changed blocks to be completely bumped into the workspace.

* Reorganized metrics-getting for workspaceChanged.

* Added bumping workspace comments. Moved event checking.

* Renamed workspaceChanged to bumpObjects.

* Added a bumpObjects developer reminder.

* Added warning to zoomToFit.

* Cleaned up some text.

* Added better inline documentation.

* Fixed up inline docs.

* Cleaned up comments.

* Fixed zoomCenter not actually zooming towards the center.

* Fixed zoomControls error on unmovable bottom-toolbox workspaces

* Fixed programatically placing blocks in an unmovable workspace.

* Removed unnecessary translate call in inject.

* Reversed removal of translate. (apparently it was necessary)

* Cleaned up code in response to first round of reviews.

* Added unit comments to the zoom function.

* Removed bumpObjectsEventChecker. Added BUMP_EVENTS list to Blockly.Events.

* Changed getWorkspaceObjectMetrics call to getBoundingRectangle().

* Fixed utils.mouseToSvg (was causing problems with zoom on wheel if the page was scrolled).

* Fixed zoom when page is scrolled (actually this time). Reverted changes to utils.mouseToSvg.

* Fixed centerOnBlock.

* Added unit docs to translate. Moved setting the grid position to the translate function.

* Added TODO's.
2019-02-18 15:28:51 -08:00
Beka Westberg be7c242f97 Fixed bubble positioning to work with simple toolboxes (PR #2279)
Merge from BeksOmega/fixes/BubbleSimpleToolbox
2019-02-15 16:25:27 -08:00
Rachel Fenichel 18220da483 Merge pull request #2292 from BeksOmega/fixes/MultipleTrashcans
Fixed multiple trashcans on the same page leaking state.
2019-02-15 16:16:58 -08:00