-
Notifications
You must be signed in to change notification settings - Fork 75
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
Refactor how actions are specified and detected. #603
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2251d58
Refactor how actions are specified and detected.
manthey 5acd17c
Merge branch 'master' into refactor-interactor-actions
manthey 078fb6c
Do less work on mouse moves.
manthey abccfdf
More refactoring of interactor actions.
manthey ef00faa
Add tests for the action utility functions.
manthey 35b1442
Rename event to input in the actions.
manthey 1d400b4
Add a set of defined constants for actions.
manthey 72a4fff
Merge branch 'master' into refactor-interactor-actions
manthey 474190e
I failed to change the zoom action name.
manthey 136e2d5
Merge branch 'master' into refactor-interactor-actions
manthey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
////////////////////////////////////////////////////////////////////////////// | ||
/** | ||
* Common object containing all action types that are provided by the GeoJS | ||
* API. | ||
*/ | ||
////////////////////////////////////////////////////////////////////////////// | ||
var geo_action = { | ||
momentum: 'geo_action_momentum', | ||
pan: 'geo_action_pan', | ||
rotate: 'geo_action_rotate', | ||
select: 'geo_action_select', | ||
unzoomselect: 'geo_action_unzoomselect', | ||
zoom: 'geo_action_zoom', | ||
zoomselect: 'geo_action_zoomselect' | ||
}; | ||
|
||
module.exports = geo_action; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manthey nitpick: we use camelcase style for other event for example
geo_event.worldChanged = 'geo_worldChanged';
Should we change geo_event.actiondown to geo_event.actionDown? (and similarly for others too?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't been consistent:
geo_event.brushend = geo_brushend
, for instance. I can change the actions to camel case or not as you prefer. I'd be tempted to make the events consistent in casing, but that would be a breaking change for not much benefit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to have the consistency IMO but we can file the bug for now and break it when we release 1.0. I would be okay with that. Thoughts?