google / blockly-samples

Plugins, codelabs, and examples related to the Blockly library.
http://github.com/google/blockly
Apache License 2.0
830 stars 615 forks source link

Backpack Plugin Update HoverStyle not compatible with multiselect plugin #2420

Closed changminbark closed 1 month ago

changminbark commented 1 month ago

Check for duplicates

Component

Workspace backpack plugin

Description

I was able to create a toFlyoutInfo() method for the multiselectDraggable class to make it compatible with the backpack plugin. However, it does not visually update the backpack when we hover over the backpack because the backpack plugin only checks whether the object being dragged is a BlockSvg.

image

Reproduction steps

Stack trace

No response

Screenshots

No response

changminbark commented 1 month ago

I would like to take this on. But to make it more future-proof (by allowing other types of objects that can be added to the backpack and be dragged), what check should I do? Do you think instanceof Blockly.IDraggable or something along those lines would work?

BeksOmega commented 1 month ago

Yay thanks for your interest in taking this! I think you should check if it implements Backpackable, to indicate that the thing being dragged can be added to the backpack =)