Leaflet.PixiOverlay icon indicating copy to clipboard operation
Leaflet.PixiOverlay copied to clipboard

marker sprite is not clickable after leaflet draw

Open novaknole opened this issue 4 years ago • 4 comments

Hey. Thanks for your help so far.

I am using this plugin and also leaflet-draw plugin. When drawing sprites, each one of them is clickable. Clicks work fine. Now, after I draw leaflet-draw's one of the inputs(let''s say circle) which happens to include some of the marker sprites, those that got included are no more clickable. Nothing at all.

How Do I achieve this so that they are still clickable?

pixiContainer = new PIXI.Container();
    pixiContainer.interactive = true
    pixiContainer.buttonMode = true;
    childrenCont =  new PIXI.Container();

I got this and childrenCont contains all my marker sprites. each sprite has this:

markerSprite.on('click', _self.clickedMarker.bind(this, markerSprite));

novaknole avatar Dec 03 '19 15:12 novaknole

Hey Man, any update or idea ?

novaknole avatar Dec 06 '19 12:12 novaknole

Also wondering how to click a sprite without calculating the mouse position manually.

bradley-varol avatar Nov 10 '20 17:11 bradley-varol

@novaknole, can I know is there any update on this?

vardhan03 avatar May 09 '22 13:05 vardhan03

As I know, each shape created by leaflet-draw is a layer itself. So, when one of the shapes covers the sprites that means, the layer covers the sprites and sprites start nott to get mouse click event. PixiOverlay should be on top of all other layers the catch the mouse click event I think. But I could not find a way to put the PixiOlverlay on top of all layers. Anyone knows how to do that?

nebsar avatar Mar 28 '23 00:03 nebsar