Sha256: 9ff5ee2af2400e8b4c9b34d911b5ea04a5a27a9faaf96af8dd6e8aaf5c4c2d61

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

L.Map.include({
	openPopup: function (popup) {
		this.closePopup();
		this._popup = popup;
		this.addLayer(popup);
		this.fire('popupopen', { popup: this._popup });
	
		return this;
	},

	closePopup: function () {
		if (this._popup) {
			this.removeLayer(this._popup);
			this.fire('popupclose', { popup: this._popup });
			this._popup = null;
		}
		return this;
	}
});

Version data entries

3 entries across 3 versions & 1 rubygems

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