Commit graph

65 commits

Author SHA1 Message Date
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
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
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
Neil Fraser
c83faa3314 Fix colours on collapsed categories. 2015-10-14 15:00:32 -07:00
Neil Fraser
3d2e9b3a17 Move category colours to be on left. 2015-10-14 14:02:09 -07:00
Neil Fraser
b503dd7d80 Add shadow blocks and category colours to code demo. 2015-10-12 21:00:29 -07:00
Neil Fraser
59cadcb2d7 Add optional colour tabs on toolbox categories. 2015-10-12 17:30:41 -07:00
Neil Fraser
4dffad0dad Improve 'clean up' spacing. 2015-10-12 16:14:03 -07:00
Neil Fraser
53f5424801 Skc memory leaks (PR #159) 2015-08-20 15:46:44 -07:00
Allison Lamm
02fa8cb605 more type annotation updates 2015-08-10 14:34:42 -05:00
Neil Fraser
782676071a Fix page scrolling in flyout. 2015-07-14 17:04:47 -07:00
Neil Fraser
bcebb0776b Allow flights to be initially expanded in toolbox. 2015-07-09 11:57:06 -07:00
Neil Fraser
d819db2acf Lint corrections. 2015-07-02 19:41:10 -07:00
Chris Jackson
4272cfb1c1 Add option to set id on toolbox 2015-06-05 22:18:22 +01:00
Neil Fraser
8202ebf07d Dispose of toolbox when workspace is disposed. 2015-06-04 12:04:43 -07:00
Neil Fraser
e8ab929b6a Fix visibility changes with toolbox. 2015-05-22 17:08:59 -07:00
Neil Fraser
767d7fe556 Add expanded property to toolbox XML. 2015-05-22 13:10:58 -07:00
Neil Fraser
6fdab711b2 Fix several RTL bugs. 2015-05-19 12:02:49 -07:00
Neil Fraser
ede636361d Simplify workspace resizing. 2015-04-28 17:55:45 -07:00
Neil Fraser
17961f7f58 Support multiple Blockly instances. 2015-04-28 13:51:25 -07:00
Neil Fraser
29976c4c4d Remove outside border from Blockly (issue 92). 2015-04-07 20:27:26 -07:00
Neil Fraser
afda263f23 Lint warning cleanup. 2015-03-26 20:47:36 -07:00
Neil Fraser
764452eb10 Squeltch double-click highlighting on workspace and toolbox. 2015-03-17 12:20:56 -07:00