Commit Graph

64 Commits

Author SHA1 Message Date
picklesrus
48a5270072 Fix #1077 by adding a rule to cover the toolbox labels too. (#1099) 2017-05-12 11:29:52 -07:00
Rachel Fenichel
98914fcf6b Dragging changes, rebased on develop (#1078)
* Add block drag surface translateSurfaceBy

* Add dragged connection manager

* Add gesture.js

* Add GestureHandler

* Implemented gesture skeleton

* Most basic workspace dragging

* Add dragged connection manager

* cleanup

* doc

* more cleanup

* Add gesture handler

* Add translateSurfaceInternal

* core/block_dragger.js

* cleanup

* Pull in changes to dragged connection manager

* Pull in changes to dragged connection manager

* comments

* more annotations

* Add workspace dragger

* Add coordinate annotations

* Start on block dragging

* Limit number of concurrent gestures

* Add some TODOs

* start using dragged connection manager

* Set origin correctly for dragging blocks

* Connect or delete at the end of a block drag.

* cleanup

* handle field clicks and block + workspace right-clicks

* move code into BlockDragger class, but still reach into Gesture internals a lot

* Clean up block dragger

* Call blockDragger constructor with correct arguments

* Enable block dragging in a mutator workspace

* Add workspace dragger

* click todos

* Drag flyout with background

* more dragging from flyout

* nit

* fix dragging from flyouts

* Remove unused code and rename gestureHandler to gestureDB

* Rename gesture handler

* Added some jsdoc in gesture.js

* Update some docs

* Move some code to block_svg and clean up code

* Lots of coordinate annotations

* Fix block dragging when zoomed.

* Remove built files from branch

* More dragging work (#1026)

-- Drag bubbles while dragging blocks
-- Use bindEventWithChecks to work in touch on Android. Not tested anywhere else yet.
-- Handle dragging blocks while zoomed
-- Handle dragging blocks in mutators
-- Handle right-clicks (I hope)
-- Removed lots of unused code

* More dragging work (#1048)

- Removed gestureDB
- Removing uses of terminateDrag
- Cleaned up disposal code

* Dragging bugfixes (#1058)

- Get rid of flyout.dragMode_ and blockly.dragMode_
- Make drags from the flyout start from the top block in the group
- Block tooltips from being scheduled or shown during gestures
- Don't resize mutator bubbles mid-drag

* Fix events in new dragging (#1060)

* rebuild for testing

* unbuild

* Fix events

* rebuild

* Fix up cursors

* Use language files from develop

* Remove handled TODOS

* attempt to fix IE rerendering bug, and recalculate workspace positions on scroll

* Rebuild all the things

* Comment cleanup; annotations; delete unused variables.
2017-05-05 12:42:53 -07:00
picklesrus
52f76013b5 Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors.  The old way was quite slow because it changed the stylesheet directly.  See issue #981 for more details on implementation and tradeoffs.  This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
2017-04-21 14:57:54 -07:00
Karan Purohit
4a81623f8d Code correction from previous commit. Moved style to css.js and set ROUNDING=15; 2017-02-15 14:33:20 +05:30
Andrew n marshall
e95991cba8 Adding @namespace annotations for JSDoc. (#900) 2017-02-01 09:10:35 -08:00
picklesrus
8aa8b1b3ba Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.

Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
2017-01-18 13:02:08 -08:00
picklesrus
25ed815320 Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805) 2017-01-05 15:39:06 -08:00
picklesrus
e1cd21842a Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.

* Address code review comments

* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
2016-12-15 11:02:49 -08:00
picklesrus
a82bd49d7e Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG.  This paves the way to make performance
improvements to workspace dragging.
2016-12-09 16:19:19 -08:00
Rachel Fenichel
ff87c76557 Don't make labels clickable 2016-12-02 14:03:49 -08:00
Rachel Fenichel
effc1d5f1c Add ability to specify a css class for labels and buttons 2016-12-02 14:01:36 -08:00
picklesrus
7f02c19bfe Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging.  This is a backport of the block drag surface from scratch-blocks.  At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move.  At the end of the drag, the blocks are dropped back in the svg in their new position.
2016-11-15 13:19:49 -08:00
Rachel Fenichel
34a6d5e6e4 simplification 2016-11-09 13:12:18 -08:00
Rachel Fenichel
d91ba9e2f9 Move injected css to start of head 2016-11-08 16:54:35 -08:00
Rachel Fenichel
afca4264ca Add option to style flyout buttons as labels 2016-10-31 15:20:16 -07:00
Neil Fraser
5cdb843f3e Update demo to latest interpreter. 2016-09-20 12:52:22 -07:00
Neil Fraser
bc2bfbd53d Add shadow to flyout buttons. 2016-09-15 18:39: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
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
Rachel Fenichel
cb3bef8f32 Flyout button with click handler 2016-07-07 14:37:12 -07:00
Rachel Fenichel
06b9bb68e6 Rename knob to handle 2016-05-27 10:25:19 -07:00
Rachel Fenichel
77a8b92ac2 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44:38 -07:00
Katelyn Mann
ca16d1fefe An alternate (and less expensive) way to keep stuff outside of the blockly div
from getting selected. Use e.preventDefault instead of adding and removing
classes on mousedown and mouseup.  This keeps the browser from having to
potentially recacluate style on mousedown and mouseup events.
2016-05-04 19:12:38 -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
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
19263bdd5b Vectorize icons. 2015-12-13 11:06:15 +01:00
Neil Fraser
00ba0acf40 Clean up build file from previous PR. 2015-11-13 21:11:24 -08:00
Neil Fraser
3d2e9b3a17 Move category colours to be on left. 2015-10-14 14:02:09 -07:00
Neil Fraser
59cadcb2d7 Add optional colour tabs on toolbox categories. 2015-10-12 17:30:41 -07:00
Neil Fraser
349146743b Remove dependency on goog.cssom. 2015-09-29 15:40:19 -07:00
Neil Fraser
5b7fec7092 Add zooming feature.
By carloslfu.
2015-08-19 17:21:05 -07:00
Allison Lamm
6070b9473d Update type annotation for Blockly cursor 2015-08-10 14:17:11 -05:00
carlosperate
3cc4c4e141 Contain the height of the field dropdown to the window viewport height. 2015-07-16 22:08:50 +01:00
Neil Fraser
f2c9c89dd3 Darken the flyout scrollbars. 2015-07-15 14:09:19 -07:00
Neil Fraser
6291e98473 Remove scrollbar background UI. 2015-07-14 17:22:35 -07:00
Neil Fraser
e0f90e6e33 Adding more type documentation. 2015-07-13 15:03:22 -07:00
Neil Fraser
b37fb2bf8c Move datepicker CSS out of main codebase. 2015-06-13 16:29:21 -07:00
Neil Fraser
af056f9028 Reduce highlight width by a pixel. 2015-06-03 23:04:28 -07:00
Neil Fraser
6fdab711b2 Fix several RTL bugs. 2015-05-19 12:02:49 -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
29976c4c4d Remove outside border from Blockly (issue 92). 2015-04-07 20:27:26 -07:00
Neil Fraser
3122c8a93f De-singleton Blockly. Part 1. 2015-04-06 18:36:53 -07:00
Neil Fraser
e2af14c32f Replace drawn icons with images (issue 45). 2015-03-25 23:58:58 -07:00
Neil Fraser
612b190ef4 Add background grid for snapping. 2015-03-08 12:48:42 -07:00
Paul Kendall
b3b9ef8ce3 Add a new FieldDate input type 2015-02-05 07:29:48 +13:00
Neil Fraser
816aa86992 Replace <hr> with <sep></sep> (issue 50). Alphabetize CSS. 2015-01-23 18:24:15 -08:00
Neil Fraser
1c39a638e3 Lint fixes. 2015-01-22 15:58:10 -08:00