Moveable: Moveable of Resizable strange behavior

Created on 7 Aug 2019  路  8Comments  路  Source: daybrush/moveable

Hi @daybrush

Moveable's Resizable doesn't seem to be normal

The image below is the Resizable of the sketch

480

What do you thknk? 馃

Feature complete solved

Most helpful comment

@monsterooo
Moveable 0.7.0 is released. It can be used as follows.
```js
on("resize", ({ direction, delta }) => {
width += delta;
height += delta;
left += direction[0] < 0 ? delta[0] : 0;
top += direction[1] < 0 ? delta[1] : 0;
});

All 8 comments

I just watched the demo.

I think I should take a closer look at how to achieve

@monsterooo
Thank you for writing issues.

Aug-07-2019 13-09-36

The demo and the problem I think is central alignment.
It's obviously resize, but the other side also increases.

I will add direction property in the next version.
direction is the position where you pressed the control.

The direction will soon allow you to write the code as follows:
```js
on("resize", ({ direction, delta }) => {
width += delta;
height += delta;
left += direction[0] < 0 ? delta[0] : 0;
top += direction[1] < 0 ? delta[1] : 0;
});

@monsterooo
Moveable 0.7.0 is released. It can be used as follows.
```js
on("resize", ({ direction, delta }) => {
width += delta;
height += delta;
left += direction[0] < 0 ? delta[0] : 0;
top += direction[1] < 0 ? delta[1] : 0;
});

Hi, @daybrush I use react-moveable library.

image

There is no direction

馃憖

@monsterooo
oh, react-moveable 0.10.4 released.
Use this version. thank you :)

Hi @daybrush Are you Korean?

@monsterooo
Yes. If you have personal questions, contact me.
https://twitter.com/daybrush
[email protected]

Is it also possible to make the onScale and onScaleGroup functionality like the Sketch example given above?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prasanthLalapeta picture prasanthLalapeta  路  4Comments

adityakrshnn picture adityakrshnn  路  6Comments

ajinkya-dev picture ajinkya-dev  路  3Comments

darsodango picture darsodango  路  3Comments

abinhho picture abinhho  路  5Comments