Resize event edges/corners
How can i get the edges in which a resize is occurring? eg: Top-left, Bottom Left... is that possible?
@RicardoLimaDev
Is this what you said?

I plan to support this feature in a version that will be released in 8.19.
@RicardoLimaDev
Moveable 0.7.0 is released. edge drag is possible when the edge option is enabled.
new Moveable(document.body, {
resizable: true,
edge: true,
});
@daybrush It seems @RicardoLimaDev says that he would like to detect which control we're dragging using an event metadata.
@outpunk @RicardoLimaDev Maybe you're right. I'll add it to the next feature.
@outpunk @RicardoLimaDev Maybe you're right. I'll add it to the next feature.
Thanks!
@RicardoLimaDev
moveable 0.9.0 is released.
react-moveable 0.12.1 is released.
preact-moveable 0.11.2 is released.
ngx-moveable 0.5.1 is released.
React code is as follows.
onResize={({ direction }) => {
// [1, 1] => right, bottom
// [-1, -1] => left, top
// [0, -1] => center, top
console.log(direction);
}}
Thank you :)
It's also possible to know the direction in the onResizeEnd event?
@kauly
I think onResizeEnd essencially do not have any direction .
I don't know if it is helpful for you, but you can access the last resize event by using lastEvent.
onResizeEnd={(endEvent) => {
if (endEvent.lastEvent == null) {
return;
}
lastEvent.direction
}}