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

Make it possible to disable multiple dropdown update #29

Closed laurensvalk closed 8 months ago

laurensvalk commented 9 months ago

Would it be worth considering making the feature from https://github.com/mit-cml/workspace-multiselect/issues/3 optional, instead of always on?

Defaulting to true is probably fine, but it would be nice to be able to turn it off, e.g. add a config option to guard this code:

image


Rationale

The idea in #3 does sound quite nice but it is not always safe to do.

Blocks with mutators may have the same type_id but aren't guaranteed to have the same fields. In my application, the code above crashes on setFieldValue.

And the approach also doesn't currently scale to dropdowns in the shape of shadow blocks, so I think I would prefer to turn this option off for consistency.

Thanks!