|
3367 | 3367 | if (layers[i].options._leafletLayer) |
3368 | 3368 | boundsRect.bindTooltip(layers[i].options._leafletLayer._title, { sticky: true }); |
3369 | 3369 | this.addLayer(boundsRect); |
3370 | | - boundsRect.on('contextmenu', this._openContextMenu, this); |
3371 | 3370 | j++; |
3372 | 3371 | } |
3373 | 3372 | } |
|
3377 | 3376 | this.clearLayers(); |
3378 | 3377 | this._addBounds(e.target); |
3379 | 3378 | }, |
3380 | | - |
3381 | | - _openContextMenu: function (e) { |
3382 | | - L.DomEvent.stop(e); |
3383 | | - this._map.contextMenu._showAtPoint(e.containerPoint, e, this._map.contextMenu._container); |
3384 | | - }, |
3385 | 3379 | }); |
3386 | 3380 |
|
3387 | 3381 | var debugVectors = function (options) { |
|
3390 | 3384 |
|
3391 | 3385 |
|
3392 | 3386 | var ProjectedExtent = L.Path.extend({ |
3393 | | - |
| 3387 | + options: { |
| 3388 | + className: "mapml-debug-extent", |
| 3389 | + }, |
3394 | 3390 | initialize: function (locations, options) { |
3395 | 3391 | //locations passed in as pcrs coordinates |
3396 | 3392 | this._locations = locations; |
|
4032 | 4028 | _show: function (e) { |
4033 | 4029 | if(this._mapMenuVisible) this._hide(); |
4034 | 4030 | this._clickEvent = e; |
4035 | | - let elem = e.originalEvent.srcElement; |
| 4031 | + let elem = e.originalEvent.target; |
4036 | 4032 | if(elem.closest("fieldset")){ |
4037 | 4033 | elem = elem.closest("fieldset").querySelector("span"); |
4038 | 4034 | if(!elem.layer.validProjection) return; |
4039 | 4035 | this._layerClicked = elem; |
4040 | 4036 | this._showAtPoint(e.containerPoint, e, this._layerMenu); |
4041 | | - } else if(elem.classList.contains("leaflet-container")) { |
| 4037 | + } else if(elem.classList.contains("leaflet-container") || elem.classList.contains("mapml-debug-extent")) { |
4042 | 4038 | this._layerClicked = undefined; |
4043 | 4039 | this._showAtPoint(e.containerPoint, e, this._container); |
4044 | 4040 | } |
|
0 commit comments