google / blockly-samples

Plugins, codelabs, and examples related to the Blockly library.

Home Page:http://github.com/google/blockly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backpack Plugin Update HoverStyle not compatible with multiselect plugin

changminbark opened this issue · comments

Check for duplicates

  • I have searched for similar issues before opening a new one.

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

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?

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 =)