mit-cml / workspace-multiselect

A Blockly plugin that allows you to drag, select and manipulate multiple blocks in the workspace.
https://hollowman6.github.io/workspace-multiselect/multi-workspace
11 stars 12 forks source link

hideIcon: true still takes up space as if it is there #27

Closed laurensvalk closed 9 months ago

laurensvalk commented 10 months ago

The icon seems to still take up space even when it is disabled:

hideicon: false

image

hideIcon: true:

image

And the weight is also hardcoded.


Possible API suggestion:

showIcon: false: don't show at all, and don't take space.

showIcon: true : show in default weight (3)

showIcon: someNumber like true, but weight set to given number.

HollowMan6 commented 10 months ago

I don't like the idea of having both boolean and number type for config at the same time, we might go for TypeScript later, just like what Blockly is having.

So I added a new weight option there. Fixes available in #26

laurensvalk commented 10 months ago

Sure. Sounds good to me, thanks for looking into this so quickly!

(For what it's worth, a boolean | number type in Typescript is not uncommon.)

HollowMan6 commented 10 months ago

For what it's worth, a boolean | number type in Typescript is not uncommon.

At least it's kind of wired, anyway, I also don't want to break the current API by changing hideIcon to showIcon

laurensvalk commented 10 months ago

Confirmed with #26 that placement can now be selected:

image

as well as omitted

image