Sha256: 9718dfa559aacd16019f8ef808cb32b8159214a836895377bb8bf491fc3e7ca7

Contents?: true

Size: 410 Bytes

Versions: 3

Compression:

Stored size: 410 Bytes

Contents

/*
 * L.Handler.DoubleClickZoom is used internally by L.Map to add double-click zooming.
 */

L.Map.DoubleClickZoom = L.Handler.extend({
	addHooks: function () {
		this._map.on('dblclick', this._onDoubleClick);
		// TODO remove 3d argument?
	},

	removeHooks: function () {
		this._map.off('dblclick', this._onDoubleClick);
	},

	_onDoubleClick: function (e) {
		this.setView(e.latlng, this._zoom + 1);
	}
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
leaflet-ruby-0.3.beta4 lib/leaflet/src/map/handler/Map.DoubleClickZoom.js
leaflet-ruby-0.3.beta3 lib/leaflet/src/map/handler/Map.DoubleClickZoom.js
leaflet-ruby-0.3.beta1 lib/leaflet/src/map/handler/Map.DoubleClickZoom.js