aratcliffe / Leaflet.contextmenu

A context menu for Leaflet.
MIT License
368 stars 107 forks source link

releatedtarget 'undefined' return on lines added with GeoJSON #123

Closed volkanciloglu closed 5 years ago

volkanciloglu commented 5 years ago

error result example -> codepen

Click the contextmenu of the lines. You will receive undefined alert.

I have made a few additions to the _show: function () function in src/Map.ContextMenu.js

_show: function (e) {
   // added 
    if (!this._enabled) {   
        return;
    }
   //
    this._showAtPoint (e.containerPoint, e);
},