dragmove.js icon indicating copy to clipboard operation
dragmove.js copied to clipboard

Rewrite and refactor the entire script.

Open knadh opened this issue 1 year ago • 2 comments

  • Fully refactor the event handling approach and rewite the script to just have 3 global listeners instead of the earlier approach of having 2 events per item.
  • Maintain items in a WeakMap() instead of a maintaing states in a function per object.
  • Simplify logic for readability.
  • Add remove() to allow the drag/move events on an object to be unregistered.

The new approach should is significantly more memory efficient.

Closes #2.

knadh avatar Apr 13 '24 06:04 knadh

  • Fully refactor the event handling approach and rewite the script to just have 3 global listeners instead of the earlier approach of having 2 events per item.

  • Maintain items in a WeakMap() instead of a maintaing states in a function per object.

  • Simplify logic for readability.

  • Add remove() to allow the drag/move events on an object to be unregistered.

The new approach should is significantly more memory efficient.

Closes #2.

Lemfap avatar Oct 30 '24 21:10 Lemfap

aa6399d254a7d2fccb74bc19b3f55927d4b462da__

Lemfap avatar Oct 30 '24 21:10 Lemfap