scratch-blocks/core
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
..
block.js JS Doc and private 2016-05-10 15:46:51 -07:00
block_render_svg.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
block_svg.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
blockly.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
blocks.js Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
bubble.js Use direct call to comment's resize rather than event. 2016-05-04 14:49:00 -07:00
comment.js Use direct call to comment's resize rather than event. 2016-05-04 14:49:00 -07:00
connection.js Do not allow shadow blocks to have non-shadow children. 2016-05-29 14:53:29 -07:00
connection_db.js More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
constants.js Prevent sounds from playing on top of each other. 2016-05-21 05:55:24 -07:00
contextmenu.js Stop context menu in context menu. Issue #372. 2016-05-29 15:59:46 -07:00
css.js Rename knob to handle 2016-05-27 10:25:19 -07:00
events.js Remove sound and animation on delete during undo/redo. 2016-05-21 06:14:33 -07:00
field.js Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
field_angle.js Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
field_checkbox.js Fix #326 2016-04-09 12:01:38 -03:00
field_colour.js Fix #326 2016-04-09 12:01:38 -03:00
field_date.js Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
field_dropdown.js Fix #326 2016-04-09 12:01:38 -03:00
field_image.js Set field.sourceBlock in headless Blockly. 2016-04-04 17:47:15 -07:00
field_label.js Set field.sourceBlock in headless Blockly. 2016-04-04 17:47:15 -07:00
field_number.js use correct class name 2016-05-05 12:31:22 -07:00
field_textinput.js Fix error in closing text input if block is deleted. See PR #300 and Issue #303. 2016-03-29 21:41:20 -07:00
field_variable.js Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
flyout.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
generator.js Fix typo in workspacetoCode 2016-05-11 16:52:51 -07:00
icon.js Use goog.math.Coordinate instead of separate X and Y properties. 2016-04-19 21:14:49 -07:00
inject.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
input.js Merge branch 'master' into develop 2016-05-14 03:13:13 -07:00
msg.js Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
mutator.js More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
names.js Generalize PHP $ hack for variables. 2015-07-02 19:59:32 -07:00
options.js More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
procedures.js Remove setProcedureParameters from API (use domToMutation instead). 2016-03-22 10:48:13 -07:00
rendered_connection.js lint 2016-06-01 15:31:43 -07:00
scrollbar.js Check for infinity with == in scrollbar 2016-05-27 10:38:41 -07:00
toolbox.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
tooltip.js More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
trashcan.js Fix trashcan hotspot in RTL. 2016-05-14 03:44:37 -07:00
utils.js Merge branch 'develop' into cleanup/lint 2016-05-10 14:43:09 -07:00
variables.js Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
warning.js Use goog.math.Coordinate instead of separate X and Y properties. 2016-04-19 21:14:49 -07:00
widgetdiv.js Don't fire 'click' events when opening bubbles. Fix groups on context menu deletes. 2016-04-07 17:07:02 -07:00
workspace.js Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44:38 -07:00
workspace_svg.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
xml.js Change the blockly workspace resizing strategy. (#386) 2016-06-03 16:11:55 -07:00
zoom_controls.js Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00