React leaflet adding layer that covers whole map and accepts leaflet mouse events - leaflet

I have many markers on map with event listeners added to them. I also have a control on map that enables placing other shapes (circles) when map is clicked in the position of a click. The problem now is that clicking on position on the map where marker placed when control is enabled also triggers marker click event. Is there a solution in react-leaflet to add some pane on top of all other panes and layers so events are triggered only on that pane. The key thing here is that pane itself does not have leaflet event handlers, hence can not pass latLng to event callback. It only provides DOM mouseEvent but not LeafletMouseEvent that I need.

Related

Need to disable deleting a marker layer in leaflet

I am working with a leaflet map that uses a custom image, draws rectangles on it with markers and tooltips at the center of each rectangle.
It includes a toolbar that sets a delete mode. In the delete mode, the click event on the rectangle changes the rectangle color and adds it to a list to delete. But the rectangle is not deleted.
However, the markers are deleted when clicked on. How do I disable this deletion?
I searched the Leaflet documentation looking for an option to disable deleting the marker: I couldn't find one.
Debugging in the browser, I see that after the handler I added for the onclick event on the marker, another handler is executed in leaflet that deletes the marker.
I've pored over the configuration settings for the map, but don't see where the delete is disabled for the rectangles.

Leaflet map contextmenu position

In leaflet map, on mouse right click, context menu is display right side to the cursor on map. Now our application is made compatible with right to left layout (for arabic). We need to display the context menu left side to the cursor now. We are using "leaft-contextmenu". Is there any simple way to achieve this?

Mapbox toggle layers > double click required to hide layer?

I have followed the mapbox toggle layers demo (https://www.mapbox.com/mapbox-gl-js/example/toggle-layers/) on my map project.
In order to turn a layer 'off', I need to click twice on the actual button - once to select, and then a second time to actually hide the layer.
The demo map only requires a single click to show/hide layers.
How can I fix this?
My map is at: https://qlddogs.com.au/maptest2.html

Rotate Element on AbsolutePanel in GWT

I have an AbsolutePanel on which the widgets are placed. Now when mouse wheel moment happens, I want to move elements one by one forward. So how to calculate that x,y,z position and place the element at the center of AbsolutePanel.
Try port a JavaScript 3D carousel to GWT.
Use FocusPanel.
A simple panel that makes its contents focusable,
and adds the ability to catch mouse and keyboard events.
No need to implement or create new classes(panels,I saw in previous question :)) which implements handlers.
Just add your childs to focuspanel.
Focus Panel implements all the mouse keyword events
FocusPanel panel = new FocusPanel(child);//Child will be your panel or widget.
Here is a nice Roughian example.

Get click position on a canvas in a handler of a context-menu

I have an Eclipse RCP-Application, where a menu-contribution is registered, so that a context-menu will automatically be shown, when the user right-clicks on a special canvas in a defined view.
Now in some handlers I want to be able, to get the mouse coordinates, where the user clicked on the canvas, when the context-menu was shown. These handlers will be executed by commands, defined in this context-menu.
The ExecutionEvent in the execute-method of the handler doesn't provide this information.
How do I get the cursor position, the user clicked, to open the context-menu?
If the context menu is opened via a mouse event, then ExecutionEvent.getTrigger() will be the SWT MouseDown event, which includes the correct coordinates.