vue-moveable icon indicating copy to clipboard operation
vue-moveable copied to clipboard

How to change default container for controls?

Open usmanibrahim74 opened this issue 4 years ago • 1 comments

Hello I'm new to vue and I'm using vue-moveable in a subcomponent and but controls are moving all over the page. I want them in that component only. I tried using the container prop mentioned in API documentation. like this

data: function () {
            return {
                moveable: {
                    container: document.getElementById('html-container'),
                    draggable: true,
                    throttleDrag: 0,
                    resizable: false,
                    throttleResize: 1,
                    keepRatio: false,
                    scalable: true,
                    throttleScale: 0,
                    rotatable: true,
                    throttleRotate: 0,
                    pinchable: true, // ["draggable", "resizable", "scalable", "rotatable"]
                    origin: false,
                }
            }
        },

in vue dev tools it shows null, I'm assuming it is running before the component is rendered or etc. any way to achieve the required functionality?

usmanibrahim74 avatar Jul 06 '20 15:07 usmanibrahim74

https://github.com/probil/vue-moveable/issues/28#issuecomment-550036539

CesarGomezTissini avatar Jul 09 '20 17:07 CesarGomezTissini