Is it possible to create only one control box for all the elements, which dynamically switches between selected items? It would reduce number of HTML elements and enhance overall app speed when you have 1000+ items on the page.
@outOFFspace
Is this what you want?
https://codepen.io/daybrush/pen/QWLpOby
If this is what you want, you only need to change the target.
```js
const moveable = new Moveable(.....);
moveable.target = document.querySelector(".target1");
// moveable.target = document.querySelector(".target2");
// moveable.target = document.querySelector(".target3");
@daybrush,
Thank you for quick response! Awesome!
I came across one problem. I'm using vue-moveable and there you have to create instance each time you want to use moveable. The solution you provided involves the use of a single instance of moveable. Any advice in this case?
@outOFFspace
I'm not sure that vue-moveable is not managed by me.
But it seems to be possible to access internal variables.
vueMoveable.moveable.target = document.querySelector(".target2");
I will ask him once.
Can you please provide same example in angular. Thanks.
@shakoorattari
If targets is element or arr length 1, it is a single box.
If the arr length is 2 or more, it is a muli box.
<ngx-moveable
[target]="targets"
/>
@daybrush Thank you.
But i's facing issues when using frame scene object in angular.
so if possible for you please make a same sample for angular. :)
Most helpful comment
@outOFFspace
Is this what you want?
https://codepen.io/daybrush/pen/QWLpOby
If this is what you want, you only need to change the target.
```js
const moveable = new Moveable(.....);
moveable.target = document.querySelector(".target1");
// moveable.target = document.querySelector(".target2");
// moveable.target = document.querySelector(".target3");