Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sensorEvent property to 'drag:stop' and 'drag:stopped' event #457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bahung1221
Copy link
Contributor

@bahung1221 bahung1221 commented Nov 4, 2020

This PR implements or fixes:

Add sensorEvent property to drag:stop and drag:stopped event, that was described in the documentation (extended from DragEvent) but was missing (undefined) on drag:stop and drag:stopped event.

This PR closes the following issues

#324

Does this PR require the Docs to be updated?

No

Does this PR require new tests?

No. If we need a test to guarantee that all events have enough properties, we should include all events, not just drag:stop 馃

This branch been tested on

Browsers:

  • Chrome version
  • Firefox version
  • Safari version
  • IE / Edge version
  • iOS Browser version
  • Android Browser version

@bahung1221 bahung1221 added the enhancement improve upon existing code label Nov 4, 2020
sourceContainer: this.sourceContainer,
sensorEvent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified the code here because drag:stopped also needs this fix.

@zjffun zjffun changed the title Add sensorEvent property to 'drag:stop' event Add sensorEvent property to 'drag:stop' and 'drag:stopped' event Nov 7, 2020
@zjffun
Copy link
Contributor

zjffun commented Nov 7, 2020

Thank you. @tsov This PR is ready to merge.

@zjffun zjffun added the ready-to-merge Pull requests that ready to merge label Sep 4, 2021
@Irina-Intuiface
Copy link

When will this be available? It seems it has been ready for more than a year now

@felsspat
Copy link

felsspat commented Nov 8, 2023

And it has been another year, I still can't access the sensor event in drag:stop or sortable:sort.

@felsspat
Copy link

felsspat commented Nov 8, 2023

I forked this (non-public) and added the change myself, I can confirm that it works and that I can now access sensorEvent:

  const dragStopEvent = new DragStopEvent({
      source: this.source,
      originalSource: this.originalSource,
      sensorEvent: event ? getSensorEvent(event) : null,
      sourceContainer: this.sourceContainer,
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve upon existing code ready-to-merge Pull requests that ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants