moveable icon indicating copy to clipboard operation
moveable copied to clipboard

onScaleGroupEnd e.events only contains bool values

Open Caarnus opened this issue 3 years ago • 1 comments

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, …},
   ...
}

Caarnus avatar Oct 03 '22 16:10 Caarnus

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 avatar Oct 03 '22 18:10 Caarnus

@Caarnus

  • @moveable/helper 0.0.4
  • lit-moveable 0.13.4
  • moveable 0.36.4
  • preact-moveable 0.38.4
  • react-compat-moveable 0.24.4
  • react-moveable 0.39.4
  • svelte-moveable 0.28.4
  • vue-moveable 2.0.0-beta.41
  • vue3-moveable 0.11.4
  • ngx-moveable 0.33.4

moveable's new version is released. Check it again.

daybrush avatar Oct 10 '22 18:10 daybrush