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

dose it support umd way? #76

Open mlzboy opened 2 months ago

mlzboy commented 2 months ago

Check for duplicates

Description

https://codepen.io/mlzboy/pen/ZEdRdrw?editors=1010 write a snippet code with claude seems not work image

Reproduction steps

Stack trace

No response

Screenshots

No response

Browsers

No response

HollowMan6 commented 2 months ago

No, it's an ESM module. I think it should be enough for most people and I don't have plans for UMD, but if you are interested, you are welcome to submit a PR and configure it as a dual ESM + UMD package.

mlzboy commented 2 months ago

I used this module old version in blockly 9 with umd support ... but after use this module ,workspace.getTopBlocks(true).length will not work as expect,when I drag a block from toolbox into workspace it will append to topblocks twice.but workspace.getAllBlocks(true).length works fine.so I want to check the new version dose any change for fix this issue

HollowMan6 commented 2 months ago

I used this module old version in blockly 9 with umd support ...

Oh really, that would be the intial version of this plugin, which I don’t remember I did anything specifically to support UMD. If you have any ideas for how to restore that support, feel free to send a PR.

but after use this module ,workspace.getTopBlocks(true).length will not work as expect,when I drag a block from toolbox into workspace it will append to topblocks twice.but workspace.getAllBlocks(true).length works fine.so I want to check the new version dose any change for fix this issue

EDIT: Ah, you mean you have this issue in the old versions of this plugin? Then it's probably fixed since the new version switched to IDraggable.

~That sounds like a Blockly issue, maybe they have some bugs counting the blocks when we have customized IDraggable, I would suggest you to open an issue there.~