How to remove origin red dot ?
vaynevayne opened this issue · comments
vaynevayne commented
Environments
- Framework name: moveable
- Framework version: 0.53.0
- Moveable Component version:
- Testable Address(optional):
Description
const moveableRef = new Moveable(this.minimapContainerDom, {
target: this.viewportDom,
draggable: true,
snappable: true, // 搭配bounds使用
// scalable: true, // 暂不支持
bounds: {
left: 0,
top: 0,
right: 0,
bottom: 0,
position: 'css',
},
});
moveableRef
.on('dragStart', () => {
this.options.refresh = false;
})
.on('drag', (e) => {
const camera = this.context.canvas.getCamera();
const zoom = Math.pow(2, camera.getZoom());
camera.pan(e.delta[0] / this.ratio / zoom, e.delta[1] / this.ratio / zoom);
e.target.style.transform = e.transform;
})
.on('dragEnd', () => {
this.options.refresh = rawRefresh;
});
Justin Kannekens commented
You can set origin={false}
https://daybrush.com/moveable/release/latest/doc/Moveable.html#origin