Skip to content

Implement fast zoom on minus/plus keydown with shiftKey#3024

Merged
mourner merged 3 commits intoLeaflet:masterfrom
yohanboniface:shift-zoom
Nov 14, 2014
Merged

Implement fast zoom on minus/plus keydown with shiftKey#3024
mourner merged 3 commits intoLeaflet:masterfrom
yohanboniface:shift-zoom

Conversation

@yohanboniface
Copy link
Copy Markdown
Member

Goal is to make it consistent with the zoomControl shift+click.

If you think it's a good suggestion, I'm still not sure:

  • if we should also factorize the shiftZoomFactor with zoomControl
  • if not, then if we need a shiftZoomFactor option at all

Thanks for reviewing :)

@mourner
Copy link
Copy Markdown
Member

mourner commented Nov 14, 2014

👍 Though I don't think there's a need to introduce a new option for this — there was never a need to customize shift-double-click on the zoom control so I don't think there will be need for it here. Less unused options -> better.

@yohanboniface
Copy link
Copy Markdown
Member Author

OK, let me fix that then :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more compactly written as ((e.shiftKey ? 3 : 1) * this._zoomKeys[key])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always with style :)

Done.

mourner added a commit that referenced this pull request Nov 14, 2014
Implement fast zoom on minus/plus keydown with shiftKey
@mourner mourner merged commit 3318f8d into Leaflet:master Nov 14, 2014
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.

2 participants