Closed abdul-alhasany closed 2 months ago
Actually, it is not support for that. I will fix the docs soon:
Same as the
action
event, except for the"scale"
option.
Thanks for the response.
What is the reason that they are not called like the rest of events?
The issue I am having is that when setting boundaries limit, translate
works but I am unable to make it work 100% with scale
.
There is always some pixels of the image left outside the canvas because scale
stops before it reaches the boundaries due to the calculations. I wanted to change the logic to make the image fit the canvas if the scale is smaller that the canvas, but not sure how to do it.
I tried to to use some methods like $setTransform
, $moveTo
inside transform
event, but this causes a recursive loop and it did not work
Why? A wheel action does not trigger *down/move/up
events as others.
The direction of the wheel movement can be calculated using event.deltaY
. up
: less than 0, down
: bigger than 0 and move
anytime it is moving.
Describe the bug When using CopperCanvase events
actionstart
,actionmove
andactionend
they are not triggered onscale
. It seems that onlyaction
event is working withscale
. I am scaling using mousewheel and have not tested using touch. I have tested all events withmove
action and they are working as expected.To Reproduce This is the code I am using (vue)
Expected behavior Events to be triggered on
scale
action.Desktop (please complete the following information):
Additional context
actionstart
documentation state thatevent.detail.action
is the same asaction
event which led me to conclude that it should trigger the same for all actions.