Closed alexconstantin closed 1 year ago
@alexconstantin
edge and edgeDraggable cannot be used together. use only one.
Or what features do you want?
Hello, @daybrush!
I am trying to reproduce Canva's functionality on this. When I am using all possible values for renderDirections (N, S, E, W + corners), I am using edge = true and edgeDraggable = false, which works fine, because it allows me to resize using the whole line, not just the resize drag. But in the case where I am only using N - S directions, I would like to allow resizing using the whole line, not just the handle (so edge=true, edgeDraggable = false), but for the E and W lines, I would like to keep edge = false, edgeDraggable = true. So basically if an edge has a resize handle, I would expect that I can resize using the whole line, but if it doesn't, I would still like to offer the dragging functionality.
Would it be possible to achieve something like this? Is there a way to pass an array of directions for edge/ edgeDraggable props?
Thank you!
@alexconstantin
I'll add this feature to next release.
@alexconstantin
lit-moveable
0.8.0moveable
0.31.0preact-moveable
0.33.0react-compat-moveable
0.19.0react-moveable
0.34.0svelte-moveable
0.23.0vue-moveable
2.0.0-beta.22vue3-moveable
0.6.0ngx-moveable
0.28.0moveable's new version is released.
use edge as array type.
edge={["n", "s"]}
Works perfectly. Thank you so much!
Hello @daybrush! This issue reappeared in 0.38.1. Please check this code and try dragging using the N or S edge: https://codesandbox.io/s/cocky-dijkstra-hg86m0?file=/src/index.ts
Thank you!
@alexconstantin
@moveable/helper
0.0.4lit-moveable
0.16.0moveable
0.39.0preact-moveable
0.41.0react-compat-moveable
0.27.0react-moveable
0.42.0svelte-moveable
0.31.0vue-moveable
2.0.0-beta.48vue3-moveable
0.14.0ngx-moveable
0.36.0moveable's new version is released.
Thank you! It's working again in 0.39.0
Environments
Description
When having resizable: true, edge: true and edgeDraggable: true, an error is thrown when I try to resize / drag from the edge of the object. How should we handle such cases?
Stack trace: gesto.esm.js:433 Uncaught TypeError: Cannot read properties of undefined (reading 'prevClients') at proto.move (gesto.esm.js:433:29) at setCustomDrag (moveable.esm.js:399:28) at Object.dragControl (moveable.esm.js:5471:38) at eval (moveable.esm.js:8248:35) at Array.filter ()
at triggerAble (moveable.esm.js:8241:28)
at Object.eval [as listener] (moveable.esm.js:8349:22)
at eval (event-emitter.esm.js:87:12)
at Array.forEach ()
at proto.emit (event-emitter.esm.js:86:28)
at Gesto._this.onDrag (gesto.esm.js:302:34)
Thank you!