caplin / FlexLayout

Docking Layout Manager for React
MIT License
926 stars 175 forks source link

Panning a MAP in a Floating or Popped Out Window does not work #119

Open PatrickIl opened 4 years ago

PatrickIl commented 4 years ago

HI, I am using react-leaflet map inside a FlexLayout Tab. In the normal mode, not popped out, I can panning or dragging and repositioning the MAP works fine. However, when the TAB is popped out, as you can see in the attached image, the drag or pan, with the mouse does not work. Is there any special setting that I'm missing. I have attached my sandbox project, you can run it from the client folder, first npm install then npm run dev. To reproduce the problem just popout the TAB that contains the MAP, and try dragging the MAP with the mouse. Thanks for your help,

popoutwindow sandbox.zip

nealus commented 4 years ago

The problem is with the drag and drop in the map component using the global document rather than the document of the popout window, some libs have an option to specify the document to use specifically for this case (like ag-grid).

PatrickIl commented 4 years ago

I have just, also, noticed that when the MAP is in popout mode, floating, when you double click on this window's title bar and maximize the window, the MAP does not resize, but after grabbing the window title and moving that window twice (not resizing it, just changing its position, twice) then the MAP resizes. Any hint?