Skip to content

Commit

Permalink
Fix draggable not having access to event #212
Browse files Browse the repository at this point in the history
Co-authored-by: gubeils
  • Loading branch information
ANovokmet committed Apr 18, 2024
1 parent 4eef43c commit d45d198
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/drag/draggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export class Draggable {
const canResize = this.resizeAllowed;

if (canDrag || canResize) {
const x = this.settings.getX();
const y = this.settings.getY();
const x = this.settings.getX(event);
const y = this.settings.getY(event);
const width = this.settings.getWidth();

this.initialX = offsetEvent.clientX;
Expand Down Expand Up @@ -189,7 +189,7 @@ export class Draggable {

if (this.resizing) {
const mousePos = getRelativePos(this.settings.container, offsetEvent);
const x = this.settings.getX();
const x = this.settings.getX(event);
const width = this.settings.getWidth();

let resultX: number;
Expand Down Expand Up @@ -267,8 +267,8 @@ export class Draggable {
clientY: this.offsetPos.y + event.clientY
};

const x = this.settings.getX();
const y = this.settings.getY();
const x = this.settings.getX(event);
const y = this.settings.getY(event);
const width = this.settings.getWidth();

this.settings.onMouseUp && this.settings.onMouseUp();
Expand Down

0 comments on commit d45d198

Please sign in to comment.