moveable
moveable copied to clipboard
onScaleGroupEnd e.events only contains bool values
Environments
- Framework name: react
- Framework version: 16.13.1
- Moveable Component version: 0.39.1
- Testable Address(optional):
Description
The events array for the onScaleGroupEnd event only contains bools for the number of objects in the group instead of the individual events. All of the other GroupEnd events seem to contain an array of events.
onScaleGroupEnd={e => {
...
}}
e: {
clientX: 1301
clientY: 364
currentTarget: MoveableGroup {props: {…}, context: {…}, refs: {…}, updater: {…}, state: {…}, …}
datas: {}
events: (2) [true, true]
inputEvent: MouseEvent {isTrusted: true, screenX: 1301, screenY: 435, clientX: 1301, clientY: 364, …},
...
}
I think this change on the Scalable would correct the issue.
dragControlEnd(moveable: MoveableManagerInterface<ScalableProps>, e: any) {
const { datas, isDrag } = e;
if (!datas.isScale) {
return false;
}
datas.isScale = false;
const params = fillEndParams<OnScaleEnd>(moveable, e, {})
triggerEvent(moveable, "onScaleEnd", params);
return params;
},
@Caarnus
@moveable/helper0.0.4lit-moveable0.13.4moveable0.36.4preact-moveable0.38.4react-compat-moveable0.24.4react-moveable0.39.4svelte-moveable0.28.4vue-moveable2.0.0-beta.41vue3-moveable0.11.4ngx-moveable0.33.4
moveable's new version is released. Check it again.