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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.1.0 #3

Merged
merged 5 commits into from
Jul 9, 2023
Merged

v0.1.0 #3

merged 5 commits into from
Jul 9, 2023

Conversation

niklasramo
Copy link
Owner

@niklasramo niklasramo commented Jul 8, 2023

Summary

  • Refactored API (quite many breaking changes).
  • Improved TS typing.
  • Updated docs and dependencies.
  • Updated logo.
  • Added some initial tests (although tests in general are still a work in progress).
  • Fixed an issue with auto-scrolling where it could not always detect the end of the scroll.

Breaking changes

  • All clientX and clientY properties across the API are now named simply x and y instead.
  • BaseControllerSensor -> BaseMotionSensor.
  • KeyboardControllerSensor -> KeyboardMotionSensor .
  • BaseSensor.isActive/PointerSensor.isActive are removed, note that this affects to all classes that inherit from them. You can now instead use BaseSensor.drag/PointerSensor.drag property to check if drag is active. If it's null drag is inactive, otherwise it's active.
  • BaseSensor.clientX and BaseSensor.clientY are now moved within a new public BaseSensor.drag property, which is an object containing those two porperties when drag is active. When drag is not active BaseSensor.drag is null.
  • PointerSensor's pointerId, pointerType, clientX and clientY properties are now moved within PointerSensor.drag property when drag is active. When drag is not active PointerSensor.drag property is null.
  • BaseMotionSensor.speed and BaseMotionSensor.direction are now protected properties instead of public properties and prefixed with an underscore.
  • BaseMotionSensor.timeand BaseMotionSensor.deltaTime properties are now moved within BaseMotionSensor.drag property when drag is active.
  • Draggable settings renamed:
    • getElementStartPosition -> getStartPosition.
    • setElementPosition -> setPosition.
    • getElementPositionChange -> getPositionChange.
  • draggable.use method functionality changed a bit. Typing is better now, but plugin has more responsibility.
  • draggable.plugins property is now a plain object instead of a Map.
  • draggable.synchronize() -> draggable.updatePosition().

@niklasramo niklasramo changed the title v0.0.3 v0.1.0 Jul 8, 2023
@niklasramo niklasramo merged commit 64aad6e into main Jul 9, 2023
@niklasramo niklasramo deleted the dev branch July 9, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant