Commit Graph

150 Commits

Author SHA1 Message Date
Andrew n marshall
e9d8e00a55 Making all blocks use the MSG colour values. (#1749)
* Making all blocks use the MSG colour values.
 * Deprecating Blockly.Constants.Lists.HUE and similar constants.
 * Removing deprecated Blockly.Blocks.lists.HUE constants.
 * Allowing message references in the Block.setColour() parameter.
 * Adding checking of older constants, ensuring they are not overwritten.
2018-04-09 17:37:47 -07:00
Rachel Fenichel
2c7520a9db Make bind/unbindEvent_ public 2018-03-22 12:14:58 -07:00
Sam El-Husseini
fda7122b86 Fix lint 2018-03-02 16:00:30 -08:00
Sam El-Husseini
8d9dad8898 Remove unnecessary code, better styling. 2018-03-02 15:33:44 -08:00
Sam El-Husseini
b32dbcdb94 Pointer Event fixes ensuring they replace all mouse events, and fix comment focusing issue. 2018-03-02 15:01:58 -08:00
Rachel Fenichel
7ea0e1b8c3 Merge pull request #1680 from google/rachel-fenichel-patch-1
Mark bindEvent_ and bindEventWithChecks_ package instead of private
2018-03-02 13:51:21 -08:00
Rachel Fenichel
a5db01559f Mark unbindEvent_ package instead of private
Fixes ~20 compiler warnings.
2018-03-01 18:15:37 -08:00
Rachel Fenichel
5920e6aa39 Mark bindEvent_ and bindEventWithChecks_ package instead of private
Fixes 50 compiler warnings.
2018-03-01 17:56:49 -08:00
Rachel Fenichel
8c8412af74 Just check whether the window exists, instead of using goog.events.BroswerFeature 2018-02-16 15:01:13 -08:00
Rachel Fenichel
e5a2ef30f2 Switch to goog.events.BrowserFeature.POINTER_EVENTS 2018-02-15 11:26:06 -08:00
Rachel Fenichel
2a00055e57 Don't register mouse events if pointer events are supported 2018-02-14 10:42:27 -08:00
Rachel Fenichel
f471a23b2b Add comment 2018-02-12 13:25:07 -08:00
Rachel Fenichel
57852f0249 Don't allow block deletion in the flyout. Make copy-paste always copy to the main workspace. 2018-02-08 17:23:22 -08:00
Rachel Fenichel
870219e750 Get rid of the last indentation lint (that is checked by eslint) and turn indentation back to erroring instead of warning. 2018-01-25 17:33:43 -08:00
Rachel Fenichel
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
1e3450a051 Indentation lint that blocks moving to eslint 4.0 2018-01-23 17:27:35 -08:00
microsoftsam
4b064da8e8 Support pinch to zoom gesture for both touch and pointer events 2018-01-11 11:26:42 -08:00
Rachel Fenichel
8c51935025 More lint for unused variables 2017-11-03 14:04:36 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Rachel Fenichel
da6d392878 Allow the toolbox to scroll (#1319)
* Allow the toolbox to scroll

* Switch from onMouseDown to onClick_ for toolbox category taps and clicks.
2017-09-18 12:44:48 -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
Rachel Fenichel
72256a187d Annotation fixes 2017-03-03 13:22:50 -08:00
Andrew n marshall
1bc74819aa period 2017-02-24 15:47:35 -08:00
Andrew n marshall
a9aabd637f Adding warning on duplicate JSON block definition. 2017-02-24 15:41:56 -08:00
Andrew n marshall
24ebbcaad0 Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911) 2017-02-06 14:15:20 -08:00
Rachel Fenichel
3742788557 annotation updates 2017-01-26 16:37:35 -08:00
Rachel Fenichel
086fd720b2 Associate flyout button callbacks directly with workspaces 2016-12-08 13:05:19 -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
picklesrus
7f02c19bfe Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging.  This is a backport of the block drag surface from scratch-blocks.  At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move.  At the end of the drag, the blocks are dropped back in the svg in their new position.
2016-11-15 13:19:49 -08:00
Rachel Fenichel
b5822e2925 Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a000.
2016-11-11 17:05:13 -08:00
Rachel Fenichel
d04d8280c7 Merge branch 'master' into merge_master_to_develop_nov_11_16 2016-11-11 16:17:53 -08:00
Rachel Fenichel
26c10fe585 lint 2016-11-09 13:42:58 -08:00
Neil Fraser
c8ca24a000 Revert "Rebuild nov 3 16" 2016-11-08 16:46:00 -08:00
Rachel Fenichel
406fe8c26a Message fixes and lint 2016-11-08 16:16:02 -08:00
Rachel Fenichel
f9385d98d3 Add ability to define blocks with a json array 2016-11-02 16:52:37 -07:00
Rachel Fenichel
4d02e9bee6 lint 2016-10-31 14:38:55 -07:00
Rachel Fenichel
703bd96f7e Allow creation of buttons with developer-designated callbacks 2016-10-31 14:24:00 -07:00
Andrew n marshall
81499e4392 Merge pull request #703 from AnmAtAnm/alert-confirm-prompt
Adding hooks to support custom alert, confirm, and prompt dialogs
2016-10-20 17:20:00 -07:00
Andrew n marshall
8f3b4bcb5e Replaces calls to window.alert(), window.confirm(), and window.prompt() with Blockly.alert(), Blockly.confirm(), and Blockly.prompt(). These are designed to allow app developers to replace the dialogs with versions that match their own open app, possibly avoiding modal browser dialogs. They each take a callback, so the developer has the opportunity to implement non-modal behavior. 2016-10-20 16:30:40 -07:00
Shannon McCabe
f7bbaaa82d JSDoc format fixes 2016-10-07 14:30:14 -07:00
Rachel Fenichel
ba1238812f Revert "Revert "Ignore everything but the first touch stream"" 2016-09-23 13:36:53 -07:00
Rachel Fenichel
b2faa41eb1 Revert "Ignore everything but the first touch stream" 2016-09-22 15:26:52 -07:00
Rachel Fenichel
109e4bb352 Move code to touch.js 2016-09-07 17:42:09 -07:00
Rachel Fenichel
1c025672b3 Clear touch identifier at the ends of more drags. Includes flyout background, right-clicks on blocks, and loading sounds. 2016-08-31 15:56:37 -07:00
Rachel Fenichel
e4fcd8bf5c reset touch identifier at the end of a toolbox click 2016-08-30 15:28:47 -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
Rachel Fenichel
cc9396d739 Prefer functions in workspaceSvg to functions in blockly.js 2016-08-19 14:13:20 -07:00
Rachel Fenichel
7a7932acc7 No longer drops mouseUps; fixed lint per neil's comments 2016-08-18 14:46:28 -07:00
Rachel Fenichel
6b7965a727 Ignore everything but the first touch stream 2016-07-20 17:03:24 -07:00