[Pkg-javascript-commits] [leaflet] 45/301: Localization Support for Zoom Control
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 15da339bbe1b2aaaf0c02c4c7037a146b98073f3
Author: Daniel <danielku15 at coderline.net>
Date: Thu Aug 8 16:16:59 2013 +0200
Localization Support for Zoom Control
---
src/control/Control.Zoom.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/control/Control.Zoom.js b/src/control/Control.Zoom.js
index afb740d..c5b0aba 100644
--- a/src/control/Control.Zoom.js
+++ b/src/control/Control.Zoom.js
@@ -4,8 +4,12 @@
L.Control.Zoom = L.Control.extend({
options: {
- position: 'topleft'
- },
+ position: 'topleft',
+ zoomInText: '+',
+ zoomInTooltip: 'Zoom in',
+ zoomOutText: '-',
+ zoomOutTooltip: 'Zoom out'
+ },
onAdd: function (map) {
var zoomName = 'leaflet-control-zoom',
@@ -14,9 +18,9 @@ L.Control.Zoom = L.Control.extend({
this._map = map;
this._zoomInButton = this._createButton(
- '+', 'Zoom in', zoomName + '-in', container, this._zoomIn, this);
+ this.options.zoomInText, this.options.zoomInTooltip, zoomName + '-in', container, this._zoomIn, this);
this._zoomOutButton = this._createButton(
- '-', 'Zoom out', zoomName + '-out', container, this._zoomOut, this);
+ this.options.zoomOutText, this.options.zoomOutTooltip, zoomName + '-out', container, this._zoomOut, this);
map.on('zoomend zoomlevelschange', this._updateDisabled, this);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list