After autoclosing flyout in vertical grammar, flyout area still is detected as delete area
See original GitHub issueExpected Behavior
After flyout autocloses, the area under the flyout should be a workspace area, not a delete area. That is, dragging a block onto the area where the flyout used to be should not result in the block being deleted. The horizontal workspace scrollbar should stretch to the left all the way to the categories, at least when the flyout is closed.
Actual Behavior
After autoclosing the flyout, flyout area still is detected as delete area. In addition, before and after the flyout autocloses, the workspace horizontal scrollbar does not stretch to the left into the flyout area.
Steps to Reproduce
- Set
Blockly.VerticalFlyout.prototype.autoClose
set to true in flyout_vertical.js - Open tests/vertical_playground.html
- Drag a block out from the flyout
- Drag the block from the workspace on to the area where the flyout used to be
Operating System and Browser
Mac OS 10.11.6 Chrome 59
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Untitled
Champagne wedding dresses lace, Delete digital drama bracelet, ... Ridiculous redfoo clean, Brequinar structure, Flyout menu in sharepoint 2010, ...
Read more >Toad for Oracle User Guide
Alter indexes to logging after rebuild. 620. Change Sort Area Size for this session to: 620. After Rebuilds, change sort area size to:....
Read more >View Raw - UNPKG
To get around this, we: * - remove the props which have default values ... the onkeyup event handler should also detect the...
Read more >Untitled
Don't contact him after break up, Rego park apartments, Harga kanstin di ... Goblin king meme, Criccieth train station, Pokepark 2 arcane area...
Read more >Untitled
Hsi productions out of business, Portrait project gcse? ... Cerasella carosone, Winrt custom flyout, Newsletter publisher 2003, Grenzen des wachstums 2012, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rachel-fenichel we’ve now talked this over and decided to support auto-closing flyouts.
@msintov it would help us out if you’re able to describe your bug workarounds, or even better submit a PR. Thanks!
Here are the changes I have made to support an autoclosing flyout (let me know if something seems to be missing):
flyout_vertical.js
, setautoClose
to true:Note that width of the
scratchCategoryMenu
incss.js
is important in the calculations below (by default this is 52px).In
toolbox.js
, I expose a way to set the width:Note that the desired flyout width is stored in
Blockly.VerticalFlyout.prototype.DEFAULT_WIDTH
.In
Blockly.Toolbox.prototype.init
, I calculateBlockly.Toolbox.prototype.width
to be the sum of our desired flyout width and the toolbox (52px).At the end of
Blockly.hideChaff()
, I hide the flyout and also update the delete areas:flyout_base.js
, inBlockly.Flyout.prototype.setVisible
, if flyout is set to visible, I set the width of parentToolbox_ to include both the toolbox and flyout width:Blockly.WorkspaceSvg.prototype.recordDeleteAreas
, I only take flyout size into account when flyout is visible:Blockly.WorkspaceSvg.getTopLevelWorkspaceMetrics_
, I had to force the toolbox width recognized here to be only the width without the flyout. This enables the user to drag their program closer to the toolbox. Unfortunately I was not able to find a better place to put this fix that didn’t cause other badness like scripts jumping on workspace pan after project load or a newly dragged out block jumping. Probably there is a redraw call that needs to be made after the workspace is loaded instead of hacking it in like this.