Refactor user interactions. Fixes #2 #9
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactored all interactions to use pointer events instead of mouse and
touch events. Implemented pinch zooming for multi-touch enabled
devices and re-implemented pan support for pointer events.
The
EventListener
class has been refactored to allow defining an elementper event. It also allows defining options on initialization or when
adding events.
Events specific to Puzzle were moved out of index and into the Puzzle
class. Other miscellaneous interactions were better organized into other
files.
Modifier selection now provides haptic feedback on touch devices. The
concept of toggling a modifier has been introduced, which can allow for
the toggling of modifier state based on interaction. For example, middle
clicking on a modifier with a mouse will toggle it as will triggering a
pointer down on a modifier followed by a pointer leave. For now, this
behavior is only used to toggle the rotation direction of the rotate
modifier, but it could be used for other things in the future.
The header/footer drop-shadows now correctly always overlay the canvas
area.