Commit graph

85 commits

Author SHA1 Message Date
Neil Fraser
7928fac3ce Collapse the five 0/1-based index flags into one option. 2016-10-06 17:54:43 -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
1d1321a00d Changes per neil's comments, plus a rebuild 2016-09-21 16:25:44 -07:00
Rachel Fenichel
10c6d998c3 Get rid of a console.trace and allow drops on the toolbox 2016-09-20 15:10:33 -07:00
Rachel Fenichel
b771d8daf4 Cleanup 2016-09-07 18:14:05 -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
546504a88a Merge remote-tracking branch 'upstream/develop' into cleanup/mainWorkspaceMetrics 2016-08-22 15:09:47 -07:00
Neil Fraser
c41a4fa6e4 Fix ability to expand toolbox categories. 2016-08-21 14:29:07 -07:00
Rachel Fenichel
cc9396d739 Prefer functions in workspaceSvg to functions in blockly.js 2016-08-19 14:13:20 -07:00
Rodrigo Queiro
88eac2480b Convert string tag name to goog.dom.TagName (#515)
in createDom calls only. This improves the type information of the
created objects.
2016-08-19 03:55:45 -07:00
Rachel Fenichel
a2b3a3638a Merge branch 'develop' into feature/variable_management 2016-08-12 14:32:26 -07:00
Rachel Fenichel
dc02dfb8ff Separators specified in toolbox XML should replace, not add to, previous gaps. 2016-08-09 17:51:50 -07:00
Rachel Fenichel
350e1ff2cc Merge remote-tracking branch 'upstream/develop' into feature/variable_management_merge_develop 2016-08-08 16:58:51 -07:00
rachel-fenichel
0765d9cbd6 Merge pull request #482 from svbatalov/toolbox-hscroll-patch-event
Scroll toolbox with LEFT/RIGHT in horizontalLayout
2016-08-02 12:44:16 -07:00
Jean-Michel DECORET
927cabe992 Develop - Modals support (#512)
* * apply bootstrap3 integration fixes

* Injection subcontainer

Include svg and div into a master container, which allow css better
positioning (overflow scrolling problem)

* * Fix toolbox positioning (rtl and ltr). Because toolbox if relative to injection div, only adjust it to left (ltr) or right (rtl) edge

* * fix style (thanks to @NeilFraser)

* * revert msg files
2016-07-30 20:36:35 -07:00
picklesrus
d215314ffd Revert "Convert createDom calls to createUntypedDom" 2016-07-20 15:21:45 -07:00
Batalov Sergey
34530666fb Small fixes 2016-07-20 08:49:28 +05:00
Batalov Sergey
2afd0171a1 Scroll toolbox with LEFT/RIGHT in horizontalLayout 2016-07-19 09:27:58 +05:00
Rodrigo Queiro
d9a3569706 Convert createDom calls to createUntypedDom (#481)
Unless they could be converted to use goog.dom.TagName, in which case do
that. createDom is going to require goog.dom.TagName member as the
tagName parameter. This change prepares for that.
2016-07-18 07:18:17 -07:00
Rachel Fenichel
f040929bd8 Merge remote-tracking branch 'upstream/develop' into feature/merge_develop 2016-07-15 13:07:07 -07:00
Rachel Fenichel
13c6c63daa Create variables from the flyout 2016-07-07 14:39:45 -07:00
Markus Bordihn
c5246fc8e2 Update toolbox.js 2016-06-29 23:38:32 +02:00
Markus Bordihn
03250c9c5d Rewrite anonymouse function "syncTree" for compiler and debugging reasons.
See #448 for more details.
2016-06-29 12:09:44 +02:00
Rachel Fenichel
8f601345bb cache delete areas instead of recalculating them onMouseDown 2016-06-17 12:39:18 -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
65aceaa1dc Fix docstrings and add horizontal scrolling. 2016-05-13 15:30:47 -07:00
Rachel Fenichel
77a8b92ac2 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44: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
Neil Fraser
554fe18ab9 Use direct call to comment's resize rather than event. 2016-05-04 14:49:00 -07:00
Rachel Fenichel
e596e23012 Position toolbox correctly at bottom 2016-04-27 16:38:22 -07:00
Neil Fraser
418a7e621d Revert "Add option to set id on toolbox" 2016-04-21 05:57:26 -07:00
Neil Fraser
1d199ae267 Merge pull request #108 from cdjackson/toolbox-id
Add option to set id on toolbox
2016-04-21 05:54:32 -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
6202113237 fix accidental flyout scrolling 2016-04-08 15:34:08 -07:00
rachel-fenichel
a4bdede170 Fix scrollbar positioning and category ordering 2016-04-07 14:02:22 -07:00
rachel-fenichel
9d82bf3a18 lint 2016-04-07 14:02:22 -07:00
rachel-fenichel
18a1550285 Horizontal toolbox layout with positioning at start or end. 2016-04-07 14:02:22 -07:00
Neil Fraser
39f7e6660e Add category UI event. Issue #306. 2016-03-31 02:04:23 -07:00
Katelyn Mann
b11bd4fb71 Remove Blockly.removeAllRanges and replace it with calls to add/remove
css to mark text as unselectable instead.  I can't prove this is
significantly faster with numbers since the call to setup the time out
costs ~.1ms and the call when the timer fires is ~.05.  This happens on almost
every mouse event though.  Plus, it seems to remove a flicker of highlighting when
frames are skipped and keeps scrolling via the scrollbar from highlighting.
2016-03-28 10:06:43 -07:00
Neil Fraser
6e6a04b879 Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
Neil Fraser
5ca8b36cfc Allow <sep> to be used to add gaps between blocks. 2016-02-05 18:41:47 -08:00
picklesrus
80d8d55315 Cache delete area rectangle bounds in the on mouse down event
to avoid getting it for every mouse move event. The delete areas
won't change while the user is dragging blocks around.
Also switch calculations for delete area inclusion to be done in
client coordinates so we don't have to convert to svg coordinates on
every mouse move event.
This should speed up dragging blocks a bunch.
2016-02-03 15:36:39 -08:00
Neil Fraser
3bce368115 Simplify workspace options by removing svg property. 2016-01-07 17:01:01 -08:00
Neil Fraser
e1acdf5caf Allow RGB colours. 2015-12-13 19:13:05 +01:00
Neil Fraser
383ca8258c Fix toolbar with both colours and subcategories.
Also fix updating of toolbar after loading Blockly.
2015-12-01 12:28:19 -08:00
Ke, Mingze
ff6d06a735 Fixed toolbox categories don't support touch. Issue #202. 2015-11-09 18:08:13 +08:00
Neil Fraser
1026d353ce Allow blocks in toolbox to be disabled individually. 2015-10-21 15:21:51 -07:00