Commit Graph

883 Commits

Author SHA1 Message Date
ramiAbdou
c5ead64c2b Made trashcan image black by adding new image and changing opacity
* Added cursor pointer abilities to the zoom buttons.
* Blacked out zoom buttons.
* Changed the opacity of the trashcan to make it black.
* Shifted positioning of zoom elements to eliminate small mishaps.
2019-02-25 23:06:00 -05:00
hsun1316
44ad45698c Made blocks return to original position if trash is canceled 2019-02-21 12:07:17 -05:00
Evan W. Patton
65b130840f Handle unknown method blocks in flyouts 2018-12-12 01:04:16 -05:00
Evan W. Patton
918349eaf3 Fix bad highlights on indented inputs 2018-07-06 01:31:41 -04:00
Evan W. Patton
4ac45d5cd6 Add ability to have custom menus in flyouts 2018-06-16 22:47:14 -04:00
Evan W. Patton
5f6bfe0a92 Fix performance when opening mutator with many entries
This commit makes the following changes:

1. Improves the mutator code for use under the App Inventor blocks
rendering algorithm which walks the blocks tree starting from a given
node. Iterating over children resulted in an O(n^2) performance.
2. Prevents events from firing when the mutator is first opened, which
prevents superfluous rerendering operations before any changes have
been made by the user.
3. Defers resizing the mutator workspace on every block change to only
occur once at the end of the current JavaScript execution context via
setTimeout().

Fixes mit-cml/appinventor-sources#959
2017-10-22 19:31:39 -04:00
Evan W. Patton
c44909baa3 Add mitigations for reported Blockly update issues
1. Set lastBlockCreated only if the flyout is not a mutator flyout.

2. Only hide workspace scrollbars for the drawer and backpack are
opened, not mutator workspaces.

3. Terminate the flyout's drag operations immediately before creating
a new block.

4. Catch any exceptions in Flyout.prototype.hide that might prevent
proper clean up of the event listeners.
2017-05-28 15:32:34 -04:00
Evan W. Patton
455a5bb64c Add check to prevent spawning multiple blocks
Some App Inventor users were reporting issues where multiple blocks
were being created when dragging from the flyout. This commit adds a
lastBlockCreated field on the flyout that is used to detect whether a
creation operation has occurred since the last time the flyout was
opened. This field is cleared as part of clearOldBlocks_, which is
called during each show operation.
2017-05-26 23:46:36 -04:00
Evan W. Patton
4d22442e1b Add method for changing scrollbar visibility 2017-05-23 13:21:51 -04:00
Evan W. Patton
20001aa473 Fix FieldTextInput lack of Change event
FieldTextInput was not triggering a Change event and this prevented an
onWorkspaceChanged event from firing in the BlocklyPanel. This commit
separates the semantics of the text and value getter/setters so that
updates to the text in onHtmlInputChange handler do not prevent an
event being triggered in setValue() after the user commits the change.
2017-05-23 10:34:42 -04:00
Evan W. Patton
35881a7a98 Fix mutator toolbox ordering with block canvas
This is cherry-picked code from f3c10d4ea. When merged with Google's
master there will be a conflict that will need to be resolved.
2017-05-16 18:44:11 -04:00
Rachel Fenichel
144b7f4261 Don't connect to blocks under the flyout. 2017-05-16 18:17:30 -04:00
Evan W. Patton
fe8ec09de6 Improve rendering of flyouts with many blocks 2017-05-15 18:08:26 -04:00
Evan W. Patton
824b2cae18 Make flyouts hide the parent workspace's scrollbars 2017-05-15 18:04:50 -04:00
Evan W. Patton
aa9276bd34 Make paste operation not automatically select pasted block 2017-05-15 17:15:52 -04:00
Evan W. Patton
803c96cfe5 Fix indented value height computation 2017-03-25 22:02:07 -04:00
Evan W. Patton
a64cc214ba Make flyouts read-only if the parent is read-only 2017-03-24 09:12:33 -04:00
Evan W. Patton
2ce852eb80 Fix blocks not loading due to method removal in extensions 2017-03-08 09:09:30 -05:00
Evan W. Patton
8d5fa6c8ce Add missing badBlock CSS rules 2017-03-08 08:34:19 -05:00
Evan W. Patton
760f8c7ec1 Reduce HTTP requests for cursors 2017-03-04 00:23:46 -05:00
Evan W. Patton
45ff6e6355 Fix input resizing during text entry 2017-03-03 23:19:01 -05:00
Evan W. Patton
89ee279fb8 Persist backpack in block context menu 2017-03-01 14:23:09 -05:00
Evan W. Patton
bd0672cc4d Prevent triggering setValue() on every key press 2017-02-28 12:39:59 -05:00
Evan W. Patton
328dbf2c2d Fix open/close cursor CSS 2017-02-22 22:21:07 -05:00
Evan W. Patton
93655e42e2 Adjust WidgetDiv height to fit on screen 2017-02-20 18:20:58 -05:00
Evan W. Patton
e2b82e7627 Fix flyout errors due to invisible Backpack 2017-02-08 14:20:41 -05:00
Evan W. Patton
9a86163244 Fix invalid reference to backpack 2017-02-03 12:20:12 -05:00
Evan W. Patton
f6cedd4f83 Merge remote-tracking branch 'google/master' into feature/blockly-update 2017-02-03 08:55:43 -05:00
Evan W. Patton
3891a185ef [WIP] Fix element reordering without canvas 2017-01-31 10:50:07 -05:00
Evan W. Patton
f0f7128aff Defer comment rendering if workspace not rendered
When a Blockly workspace has not been rendered for the first time,
e.g. due to Firefox SVG exceptions, the comment bubbles do not have a
canvas to attach to. This fix sets a `visible` field on the comment
object during load of a Blockly workspace that can be used to trigger
an SVG update once the workspace has been rendered.
2017-01-27 09:39:31 -05:00
Rachel Fenichel
c005353189 annotation updates 2017-01-26 16:40:43 -08:00
Evan W. Patton
3307a4b397 Fix misnamed backpack variable 2017-01-25 14:32:08 -05:00
Rachel Fenichel
ec027baa5e Temporary fix for broken text field validation. 2017-01-20 22:07:04 -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
Rachel Fenichel
3cd62050a2 Merge pull request #802 from rachel-fenichel/bugfix/field_undo
Fix two event bugs on fields
2017-01-05 13:14:20 -08:00
picklesrus
9f3e15cd82 Move createDom call into the constructor of block drag surface. (#790) 2017-01-04 17:02:06 -08:00
Rachel Fenichel
12ffc655b8 Merge pull request #803 from rachel-fenichel/bugfix/xml_function_rename
Init procedure blocks with empty name, and set default name in xml in…
2017-01-04 13:22:41 -08:00
Rachel Fenichel
158df44a94 Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory 2017-01-03 18:41:28 -08:00
Rachel Fenichel
528ea86cbf Check if the text has changed before firing an event 2017-01-03 14:58:05 -08:00
Rachel Fenichel
056824593e Now that text input's setText skips setValue, it needs to explicitly create a change event 2017-01-03 14:51:28 -08:00
picklesrus
eb64921da5 Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
2017-01-03 14:36:31 -08:00
Rachel Fenichel
20cf6abb5f End event groups when you finish editing a field 2017-01-03 14:09:41 -08:00
picklesrus
91938c3fb8 Use the drag surface when scrolling using the scrollbars. #783 (#789) 2017-01-03 10:02:28 -08:00
picklesrus
6aee3ed2da Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787) 2016-12-16 09:52:19 -08:00
Rachel Fenichel
6b39c7d646 Merge pull request #782 from rachel-fenichel/feature/flyout_disable_resize
Disable workspace resizing while loading the flyout from XML
2016-12-15 11:15:39 -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
Rachel Fenichel
f54f229bc2 Disable workspace resizing while loading the flyout from XML 2016-12-14 17:06:09 -08:00
picklesrus
5b6f1debeb Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock.  This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
2016-12-14 14:57:32 -08:00
Evan W. Patton
0ca08cc9cc Revert commenting out preventDefault calls 2016-12-10 22:52:54 -05:00
Rachel Fenichel
22b018321c update generator comments 2016-12-09 22:10:36 -08:00