daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
10.15k stars 623 forks source link

unable to select multiple targets #291

Closed usmanibrahim74 closed 4 years ago

usmanibrahim74 commented 4 years ago

Environments

Description

I'm trying to set multiple targets but I got this error in return image

the code I used for this purpose is this

const targets = [].slice.call(document.querySelectorAll(".target"));
                this.moveable = new Moveable(this.container, {
                    target: targets,
                    dragTarget: null,
                    container: this.container,
                    dragArea: true,
                    draggable: true,
                    resizable: true,
                    scalable: true,
                    rotatable: true,
                    warpable: true,
                    groupable: false,
                    pinchable: true, // ["resizable", "scalable", "rotatable"]
                    origin: false,
                    keepRatio: false,
                    edge: false,
                    throttleDrag: 0,
                    throttleResize: 0,
                    throttleScale: 0,
                    throttleRotate: 0,
                });
daybrush commented 4 years ago

@usmanibrahim74

do not use groupable props (should be true)

usmanibrahim74 commented 4 years ago

it worked, thanks. but when selecting one target with groupable= true; it is not selecting. so in that situation i have to keep it false. right?

daybrush commented 4 years ago

@usmanibrahim74

Don't put the groupable props.

it's not public props.

usmanibrahim74 commented 4 years ago

ohh ok. now I got it. thanks