moveable
moveable copied to clipboard
Bug: lost moveable control box reference
Environments
- Framework name: VanillaJS
- Moveable Component version: 0.51.2
- Testable Address
Description
Release 0.46.0 seems to have introduced a bug where the the movable control box reference is lost when selecting/deselecting multiple targets. When using it to click on single targets it uses the same element but upon selecting/deselecting multiple, it creates a new element. In turn, this end ups creating a lot of one-time use elements and you must always call getControlBoxElement() to have the correct reference.
Use-case
using inputs to modify the moveable control box when multiple targets are selected
@SidIcarus
Your observation is correct.
Moveable is
Single (+ No Select) Group Individual Group
All three cases have different elements. Using the same element would require a very large amount of work and would be difficult. I'm not sure if I can solve it, but I'll try.
@daybrush
It is reasonable to have different elements for each use case; that is, seeing three would make sense. But we don't see three elements, we see a new element for each change. Prior to 0.46 it did not appear to do that.
I presume the routes that could be taken are
- one control box element
- one control box element per use-case (3)
- continuously created control box elements but removing the elements that are no longer used
thoughts?
I think I can just use the moveable.getManager().state/getState() for managing the control box size.
Removing the elements that are no longer used would be great though.
Hi, @daybrush, @SidIcarus
I have the same issue with ngx-moveable v0.49.0. Whenever select multi-targets, moveable-control-box count is increased.
So, ngx-moveable.moveable-control-box is not updated to top-left circle.
It works good until ngx-moveable v0.42.0.
I am going to obtain the top-left coordinate of the selected targets area.
Can you please check and let me know a solution? Thank you
I am also seeing the same issue as @wen9218 please let us know if you need additional info and tx for a great lib!