question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating block with neither previousStatement nor nextStatement results in incorrectly displayed block icon.

See original GitHub issue

I’m creating a starting block that has neither a previousStatement nor a nextStatement, since all blocks are to be placed as an input.

init: function() {
      this.jsonInit({
        "id": "[ID]",
        "message0": "%1 %2",
        "args0": [
          {
            "type": "input_statement",
            "name": "SUBSTACK"
          },
          {
            "type": "field_image",
            "src": Blockly.mainWorkspace.options.pathToMedia + "icons/turtle/snow.svg",
            "width": 40,
            "height": 40,
            "flip_rtl": false
          }
        ],
        "inputsInline": true,
        "category": Blockly.Categories.turtle,
        "colour": Blockly.Colours.control.primary,
        "colourSecondary": Blockly.Colours.control.secondary,
        "colourTertiary": Blockly.Colours.control.tertiary
      });
    }

It looks something like this: image Notice that the icon isn’t correctly placed on the block.

If I add a line “previousStatement”:null, to the json, then the block looks like this: image Notice that the icon is correctly placed on the block.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
PullJoshcommented, Oct 19, 2016

Will extension blocks be supported in the horizontal layout? If so, this seems like a necessary feature.

1reaction
mrjacobbloomcommented, Oct 20, 2016

@PullJosh But why would you want a hat-cap block?

If I’m being honest, I hadn’t really gotten that far in my thinking. 😛

SCRATCH 3 WEB-BLOX

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a block icon & block info block to display a ... - GitHub
I think I now have a need for a Block icon/info link . This will be a link to the documentation of the...
Read more >
problems linking block icons - 12987 - Industry Support Siemens
I made a block icon with a C script animation, I used GetFaceplateTagname() function to get the tagname so I can do this....
Read more >
Block attributes do not display as expected in AutoCAD
Attributes of some Block objects are not displayed as expected in AutoCAD, while they are displayed correctly inside Block Editor.
Read more >
Post type not supporting third party blocks - WordPress.org
I have created a custom post type “icon” and a taxonomy “Icon Categories” for it. ... is not showing those custom blocks, and...
Read more >
Display-like Simulink block with dynamically changing icon
I would like to create an own block which does the same. Sufficient would be to switch from a red to a green...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found