Commit Graph

124 Commits

Author SHA1 Message Date
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
Rodrigo Queiro
d3d0ca4fd0 Record whether the workspace has been dragged (#475)
* Record whether the workspace has been dragged

This fixes #473 by differentiating between a touch on an unmovable block
and using it to drag the workspace.

* Remove isScrolling and add DRAG_BEGIN

Applied after PR review.
2016-07-12 11:34:02 -07:00
Neil Fraser
2dab19c015 Ensure that if a procedure call exists, so does its definition.
Specifically, if a call is copied, then the def is deleted, then the
call is pasted, the def should be created.
2016-07-08 15:50:09 -07:00
Neil Fraser
91b10cae2f Create console stub for IE 9. 2016-06-22 13:01:37 -07:00
Neil Fraser
98617d8ddc Move tokenizeIntepolation into Blockly.utils namespace. 2016-06-22 13:01:37 -07:00
picklesrus
213469a479 Change the blockly workspace resizing strategy. (#386)
* Add a new method to be called when the contents of the workspace change and
the scrollbars need to be adjusted but the the chrome (trash, toolbox, etc)
are expected to stay in the same place.

Change a bunch of calls to svgResize to either be removed or call the new
method instead.  This is a nice performance win since the offsetHeight/Width
call in svgResize can be expensive, especially when called as often as we do -
there was some layout thrashing.

This also paves the way for moving calls to recordDeleteAreas
(which is also expensive) to a more cacheable spot than on every
mouse down/touch event.

of things (namely the scrollbars)

* Fix size of graph demo when it first loads by calling svgResize.
The graph starts with fixed width and was relying on a resize event
to fire (which I believe was removed in commit
217c681b86).

* Fix the resizing of the code demo.  The demo's tab min-width used to
match the toolbox's width was only being set on a resize event, but
commit 217c681b86 changed how that worked.

* Fix up some comments.

* Use specific workspaces rather than Blockly.getMainWorkspace().

* Make workspace required for resizeSvgContents and update
some calls to send real workspaces rather than ones that are
null.

Remove the private tag on terminateDrag_ because it is only
actually called from outside the BlockSvg object.

* Remove a rogue period.

* Recategorize BlockSvg.terminateDrag_ to @package instead of @private so that
other developers don't use it, but it still can be used by other Blockly classes.

* Add a TODO to fix issue #307.

* Add @package to workspace resizeContents.
2016-06-03 16:11:55 -07:00
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
rachel-fenichel
4de98b9f83 Merge pull request #291 from rachel-fenichel/feature/horizontal_toolbox_port
Horizontal toolbox layout with positioning at start or end.
2016-05-13 16:08:30 -07:00
Rachel Fenichel
71d3023a50 jsdoc 2016-05-12 13:24:08 -07:00
Rachel Fenichel
954b061e4a Merge branch 'develop' into feature/dragged_connection_list 2016-05-12 13:20:16 -07:00
Rachel Fenichel
77a8b92ac2 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44:38 -07:00
Neil Fraser
3ecdd2fc61 Merge branch 'master' into develop 2016-05-10 16:50:13 -07:00
Neil Fraser
28c62ce00b Merge pull request #358 from picklesrus/develop-selectable
An alternate (and less expensive) way to keep stuff outside of the bl…
2016-05-09 16:02:17 -07:00
Rodrigo Queiro
005706096f Fix typo in svgResize 2016-05-09 09:13:37 -07:00
rachel-fenichel
f468b6a6cb Merge pull request #357 from rachel-fenichel/feature/field_number_js
Add lightweight field_number
2016-05-05 12:32:01 -07:00
Katelyn Mann
ca16d1fefe An alternate (and less expensive) way to keep stuff outside of the blockly div
from getting selected. Use e.preventDefault instead of adding and removing
classes on mousedown and mouseup.  This keeps the browser from having to
potentially recacluate style on mousedown and mouseup events.
2016-05-04 19:12:38 -07:00
Neil Fraser
217c681b86 Use direct call to svg resize rather than event. Also fix issue #296. 2016-05-04 15:00:57 -07:00
Rachel Fenichel
d89d8a2113 Add lightweight field_number 2016-05-04 13:30:18 -07:00
Rachel Fenichel
e596e23012 Position toolbox correctly at bottom 2016-04-27 16:38:22 -07:00
Rachel Fenichel
2591e12a46 Fix janky scrolling in vertical case 2016-04-26 18:16:26 -07:00
Rachel Fenichel
a27fe99be4 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-04-25 14:25:36 -07:00
Neil Fraser
6d58f7959f Don't fire click when editing a field. Issue #336 part 1. 2016-04-19 21:14:49 -07:00
rachel-fenichel
21e999678c correctly position trash can and zoom controls when the flyout is always open; add flyout and toolbox size to main workspace metrics; get rid of flyout's vertical offset. 2016-04-13 15:30:11 -07:00
rachel-fenichel
90b1cce5d5 Correctly locate and size scrollbar for all toolbox positions. 2016-04-13 13:56:09 -07:00
rachel-fenichel
18a1550285 Horizontal toolbox layout with positioning at start or end. 2016-04-07 14:02:22 -07:00
Neil Fraser
effa81f622 Create fromJson for events. Add master-slave demo. 2016-04-06 14:27:15 -07:00
rachel-fenichel
5c8ff88587 Keep a list of connections that are being dragged 2016-04-05 16:13:19 -07:00