0.1.0
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
andclientY
properties across the API are now named simplyx
andy
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 useBaseSensor.drag
/PointerSensor.drag
property to check if drag is active. If it'snull
drag is inactive, otherwise it's active.BaseSensor.clientX
andBaseSensor.clientY
are now moved within a new publicBaseSensor.drag
property, which is an object containing those two porperties when drag is active. When drag is not activeBaseSensor.drag
isnull
.PointerSensor
'spointerId
,pointerType
,clientX
andclientY
properties are now moved withinPointerSensor.drag
property when drag is active. When drag is not activePointerSensor.drag
property isnull
.BaseMotionSensor.speed
andBaseMotionSensor.direction
are now protected properties instead of public properties and prefixed with an underscore.BaseMotionSensor.time
andBaseMotionSensor.deltaTime
properties are now moved withinBaseMotionSensor.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 aMap
.draggable.synchronize()
->draggable.updatePosition()
.