picklesrus
6851baea12
Fix #425 . Attash the resize handler to the workspace so it can be removed ( #429 )
...
when workspace.dispose() is called.
2016-06-13 14:46:58 -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
666536807a
Add comments; scroll to start for always open flyout
2016-05-13 14:26:32 -07:00
Rachel Fenichel
77a8b92ac2
Merge branch 'develop' into feature/horizontal_toolbox_port
2016-05-11 11:44:38 -07:00
Rachel Fenichel
3605dfb9c0
Undo decimation of variable redeclarations
2016-05-10 14:40:48 -07:00
Rachel Fenichel
640b38f38e
lint
2016-05-05 13:13:48 -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
a27fe99be4
Merge branch 'develop' into feature/horizontal_toolbox_port
2016-04-25 14:25:36 -07:00
Neil Fraser
9f260501fe
Remove duplicate getBlockById function.
2016-04-18 03:14:55 -07:00
rachel-fenichel
18a1550285
Horizontal toolbox layout with positioning at start or end.
2016-04-07 14:02:22 -07:00
Neil Fraser
4ac1204550
Set field.sourceBlock in headless Blockly.
2016-04-04 17:47:15 -07:00
rachel-fenichel
be3c761fc0
lint
2016-03-29 15:22:45 -07:00
rachel-fenichel
e2f1a6c843
Fix annotations
2016-03-29 14:26:56 -07:00
rachel-fenichel
0686762a12
Move options to their own file; clean up initialization code.
2016-03-29 14:15:29 -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
Neil Fraser
5097963cb1
Reduce code duplication in 'if' block.
2016-03-01 18:21:02 -08:00
Neil Fraser
fee94ae405
Allow injection based on CSS selector (based on PR 249).
2016-02-29 15:11:00 -08:00
Neil Fraser
e6db687234
Fix startScale on workspaces without a fixed flyout.
2016-02-24 19:27:03 -08:00
Neil Fraser
dc1f03a168
Merge pull request #231 from carlosperate/toolbox_nodes
...
Allow XML DOM nodes to be injected as toolbox in IE
2016-01-08 15:13:47 -08:00
Neil Fraser
4253de041a
Remove old realtime.
2016-01-08 13:03:22 -08:00
Neil Fraser
3bce368115
Simplify workspace options by removing svg property.
2016-01-07 17:01:01 -08:00
carlosperate
bda78da155
Allow nodes input to toolbox injection in IE
2016-01-05 00:56:57 +00:00
Neil Fraser
00ba0acf40
Clean up build file from previous PR.
2015-11-13 21:11:24 -08:00
Neil Fraser
a485e63df2
Allow zooming of non-scrolling workspaces.
2015-10-21 14:38:39 -07:00
Neil Fraser
dcd463b550
Add 'startScale' and remove 'enabled' options on zoom.
2015-10-21 13:25:02 -07:00
Neil Fraser
8ecfab014f
Separate overlapping emboss filter and disabled pattern across multiple Blockly instances. Issue 184.
2015-09-28 12:20:28 -07:00
Neil Fraser
37777828f4
Fix disconnect sound in FF.
2015-09-22 11:14:25 -07:00
Neil Fraser
c14951c928
Add disconnect sound and animation.
2015-09-20 14:28:39 -07:00
Neil Fraser
5b7fec7092
Add zooming feature.
...
By carloslfu.
2015-08-19 17:21:05 -07:00
Neil Fraser
09f5ac6f7b
Remove non-functioning workspace long-click.
2015-07-13 17:48:50 -07:00
Neil Fraser
e0f90e6e33
Adding more type documentation.
2015-07-13 15:03:22 -07:00
Neil Fraser
d819db2acf
Lint corrections.
2015-07-02 19:41:10 -07:00
Neil Fraser
edd3e3bf33
Lint corrections.
2015-06-17 13:05:24 -07:00
Neil Fraser
c5b88b1116
Kill SVG when disposing main workspace.
2015-05-02 21:08:18 -07:00
Neil Fraser
d83f5872c6
Don't allow snapping to grid with 0 spacing.
2015-04-30 17:59:56 -07:00
Neil Fraser
3ff69d47fe
Inject can now take an ID. Also, fix unit tests.
2015-04-29 20:26:04 -07:00
Neil Fraser
ede636361d
Simplify workspace resizing.
2015-04-28 17:55:45 -07:00
Neil Fraser
c014799df8
Fix black workspace background in IE11.
2015-04-28 15:06:22 -07:00
Neil Fraser
17961f7f58
Support multiple Blockly instances.
2015-04-28 13:51:25 -07:00
Neil Fraser
6d1df4dfb5
Revert "De-singleton Blockly. Part 1."
...
This reverts commit 3122c8a93f .
2015-04-07 21:01:37 -07:00
Neil Fraser
3122c8a93f
De-singleton Blockly. Part 1.
2015-04-06 18:36:53 -07:00
Neil Fraser
3e12c1ea5e
Render sprites from vectors. Remove blurry shadow from trash.
2015-03-23 23:55:13 -07:00
Neil Fraser
da122e2a31
Enable long-press context menus.
2015-03-17 15:37:33 -07:00
Neil Fraser
4d2aac4f19
Bug-fixes to background grid.
2015-03-08 17:39:30 -07:00
Neil Fraser
612b190ef4
Add background grid for snapping.
2015-03-08 12:48:42 -07:00
Neil Fraser
bdc4795fb6
Simplify workspace construction.
2015-03-06 15:27:41 -06:00
Neil Fraser
c9addf7e31
Improve accuracy of goog.require calls.
2015-02-06 15:27:25 -08:00
Neil Fraser
f8365e9eba
Inject CSS rule for cursors regardless of CSS flag.
2015-01-22 13:54:00 -08:00
Neil Fraser
6e45f933e7
Add option flag to supress internal CSS.
2015-01-22 13:31:55 -08:00
Neil Fraser
a0ebb7a1a3
Fix deleting in RTL toolbox-less workspaces (issue 29).
2015-01-12 17:31:03 -08:00