Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blocks with hats zoom out of the toolbar #2800

Closed
mattbishop opened this issue Aug 11, 2019 · 4 comments
Closed

blocks with hats zoom out of the toolbar #2800

mattbishop opened this issue Aug 11, 2019 · 4 comments
Labels
component: toolbox/flyout issue: bug Describes why the code or behaviour is wrong

Comments

@mattbishop
Copy link

Describe the bug

If your workspace is horizontal, and you have start hats turned on, zooming the workspace causes the elements without start connections to step their way out of position and eventually disappear from the toolbar.

To Reproduce

Steps to reproduce the behavior:

  1. Load the attached HTML file in a Blockly environment.
  2. click the zoom + button a few times
  3. Then click the zoom - button a few times
  4. The "procedures" block steps down and out of the toolbox view

Expected behavior

The procedures block should work the same way as it would without the hat, meaning it zooms in and out without disappearing

Screenshots

I'll add a screen cap.

Desktop (please complete the following information):

  • OS: Mac OS 10.14.6
  • Browser chrome 76, safari 12.1

Additional context

Blockly July 2019 release. Same bug appears in Scratch Blocks too.

@mattbishop mattbishop added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Aug 11, 2019
@mattbishop
Copy link
Author

zoom-bug

@mattbishop
Copy link
Author

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>scrolling bug</title>
  <style>
    #blocklyDiv {
      height: 600px;
      width: 800px;
    }
  </style>
</head>
<script src="../node_modules/google-blockly/blockly_compressed.js"></script>
<script src="../node_modules/google-blockly/blocks_compressed.js"></script>
<script src="../node_modules/google-blockly/msg/js/en.js"></script>
<block id="toolbox">
  <block type="controls_if"></block>
  <block type="logic_compare"></block>
  <block type="procedures_defnoreturn"></block>
</block>
<body>
  <div id="blocklyDiv"></div>
  <script>
    Blockly.BlockSvg.START_HAT = true
    const blocklyDiv = document.getElementById('blocklyDiv');
    Blockly.inject(blocklyDiv, {
      horizontalLayout: true,
      toolbox: document.getElementById('toolbox'),
      zoom: {
        controls: true
      }
    });
  </script>
</body>
</html>

@mattbishop
Copy link
Author

BTW, verticalLayout also behaves badly, just in a different way.

@RoboErikG RoboErikG added component: toolbox/flyout and removed issue: triage Issues awaiting triage by a Blockly team member labels Aug 12, 2019
@RoboErikG RoboErikG added this to the 2019_q3_release milestone Aug 12, 2019
@RoboErikG
Copy link
Contributor

Fixed in new renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toolbox/flyout issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

2 participants