Commit graph

86 commits

Author SHA1 Message Date
Rachel Fenichel
8f601345bb cache delete areas instead of recalculating them onMouseDown 2016-06-17 12:39:18 -07:00
picklesrus
33ba6e8fad Fix by calling workspace's resize when the flyout reflows. () 2016-06-14 10:13:03 -07:00
Rodrigo Queiro
0585a667ec Fix typo in flyout.js () 2016-06-07 09:54:57 -07:00
Rodrigo Queiro
736ff96ead Fix typo in flyout.js () 2016-06-07 09:54:37 -07:00
picklesrus
213469a479 Change the blockly workspace resizing strategy. ()
* 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 .

* Add @package to workspace resizeContents.
2016-06-03 16:11:55 -07:00
rachel-fenichel
e14e42192c Merge pull request from rachel-fenichel/cleanup/more_lint
More lint and eslint configuration.
2016-05-25 15:36:03 -07:00
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
Rachel Fenichel
6208ba62fb Rename a variable for clarity 2016-05-25 13:47:19 -07:00
Neil Fraser
29e10e0976 Routine recompile. 2016-05-14 03:50:35 -07:00
Rachel Fenichel
f38b43419c Combine horizontal and vertical flyout scrolling 2016-05-13 16:07:53 -07:00
Rachel Fenichel
65aceaa1dc Fix docstrings and add horizontal scrolling. 2016-05-13 15:30:47 -07:00
Rachel Fenichel
666536807a Add comments; scroll to start for always open flyout 2016-05-13 14:26:32 -07:00
Rachel Fenichel
8cfd48554a clean up margins 2016-05-11 16:40:42 -07:00
Rachel Fenichel
e0cda58701 fix variable naming in createnewblock. 2016-05-11 15:15:12 -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 . 2016-05-04 15:00:57 -07:00
Rachel Fenichel
8f51fb1e48 remove duplicate code 2016-05-02 15:23:02 -07:00
Rachel Fenichel
cb1188af45 Add TODOs 2016-04-27 10:31:01 -07:00
Rachel Fenichel
2591e12a46 Fix janky scrolling in vertical case 2016-04-26 18:16:26 -07:00
Rachel Fenichel
60dfbb455e offset correctly when opening for the first time 2016-04-26 15:10:49 -07:00
Rachel Fenichel
a27fe99be4 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-04-25 14:25:36 -07:00
Neil Fraser
6c0bf9f966 Routine recompile. 2016-04-21 06:05:25 -07:00
Neil Fraser
9e034b2716 Merge pull request from picklesrus/develop-hatblock
Take into account height of the hat for hat blocks.
2016-04-21 05:27:35 -07:00
Neil Fraser
e65d6964bd Merge pull request from rachel-fenichel/cleanup/flyout_listeners
Decompose functions in flyout.  Does not change behaviour.
2016-04-21 05:19:00 -07:00
Neil Fraser
703ac981da Routine recompile. 2016-04-20 16:44:13 -07:00
rachel-fenichel
c8f98a7ded Decompose functions in flyout. Does not change behaviour. 2016-04-20 14:14:53 -07:00
Neil Fraser
52eb6adcc2 Add click events to non-closing flyout blocks. Issue . 2016-04-20 05:03:05 -07:00
rachel-fenichel
ac15b8b179 Use Infinity instead of a large number 2016-04-19 14:37:50 -07:00
rachel-fenichel
8882c727a3 remove log statements 2016-04-19 14:27:13 -07:00
rachel-fenichel
84d2388add works in horizontal rtl! 2016-04-19 13:58:58 -07:00
rachel-fenichel
4fd9f096de decompose Blockly.Flyout.prototype.show 2016-04-14 13:21:35 -07:00
rachel-fenichel
a1509a4467 toolbox -> flyout 2016-04-14 12:50:10 -07:00
Neil Fraser
b5a2f75cee Add tooltips to input holes in flyout. 2016-04-13 15:54:05 -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
Katelyn Mann
79f91266ac Take into account height of the hat for hat blocks.
Also, position hat blocks correctly in the flyout/toolbox.
This fixes .
2016-04-12 14:59:58 -07:00
rachel-fenichel
01955c6615 lint 2016-04-12 13:14:49 -07:00
rachel-fenichel
7cf5de5774 Dragging out of flyout with zoom works for horizontal flyouts in LTR mode 2016-04-11 12:51:18 -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
4e42a1b78e Swap order of arguments on domToWorkspace. 2016-04-04 18:31:41 -07:00
Neil Fraser
ac0b5e7871 Use ENUM for dragMode. Blocks no longer sticky when created from disappearing flyout. 2016-03-29 08:36:11 -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
2a1ffa11c4 Add undo/redo. Also refactor connections.
Bugs in undoing mutators and renaming variables.
2016-03-03 17:48:54 -08:00
Neil Fraser
4d4521bed3 Fix scaled RTL coordinates. 2016-02-25 11:08:59 -08:00
Neil Fraser
e6db687234 Fix startScale on workspaces without a fixed flyout. 2016-02-24 19:27:03 -08:00
Neil Fraser
f0d04ba16b Fix RTL flyout events. 2016-02-24 16:52:55 -08:00
Neil Fraser
6e6a04b879 Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
Neil Fraser
0fab13400a Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00