Skip to content

(Sporadic) Error in Gesto.move component on rotating/scaling (Cannot read properties of undefined (reading 'prevClients') #930

@HolgerSeith

Description

@HolgerSeith

Environments

  • Framework name: React
  • Framework version: 18.2
  • Moveable Component version: 0.50.7
  • Testable Address(optional): unfortunately none

Description

(Thanks alot for your amazing library!)

We get the following sparadic (does not occur each time) error on rotating or scaling. (Seems to happen if you execute rotating / scaling several times)
Similar error is described here: #695 (we have no edge dragging active)
Wo do not have any clue what the problem is or how to fix/workaround it.

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'prevClients') at Gesto.move (d:\dev\application\node_modules\gesto\src\Gesto.ts:161:9) at setCustomDrag (d:\dev\application\node_modules\react-moveable\src\gesto\CustomGesto.ts:12:5) at fillTransformEvent (d:\dev\application\node_modules\react-moveable\src\gesto\GestoUtils.ts:462:5) at dragControl (d:\dev\application\node_modules\react-moveable\src\ables\Scalable.ts:375:16) at trigger (d:\dev\application\node_modules\react-moveable\src\gesto\getAbleGesto.ts:89:9) at <anonymous> (d:\dev\application\node_modules\react-moveable\src\gesto\getAbleGesto.ts:134:51) at <anonymous> (d:\dev\application\node_modules\react-moveable\src\gesto\getAbleGesto.ts:134:9) at triggerAble (d:\dev\application\node_modules\react-moveable\src\gesto\getAbleGesto.ts:116:5) at <anonymous> (d:\dev\application\node_modules\react-moveable\src\gesto\getAbleGesto.ts:296:17) at <anonymous> (d:\dev\application\node_modules\@scena\event-emitter\src\EventEmitter.ts:150:13) at __proto.emit (d:\dev\application\node_modules\@scena\event-emitter\src\EventEmitter.ts:149:9) at Gesto._this.onDrag (d:\dev\application\node_modules\gesto\src\Gesto.ts:409:17)

Configuration of Moveable:

      <Moveable
        ref={moveableRef}
        origin={true}
        pinchOutside={false}
        pinchable={false}
        snappable={true}
        draggable={true}
        scalable={true}
        target={targetRef}
        keepRatio={keepRatio}
        rotatable={true}
        isDisplaySnapDigit={false}
        isDisplayInnerSnapDigit={false}
        snapDirections={{
          top: true, left: true, bottom: true, right: true, center: true, middle: true,
        }}
	       onDragEnd={
          (e) => {
            if (!e.isDrag) {
              return;
            }
              ...
             }	
		...
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingchecking

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions