Open Nikcharn opened 8 years ago
Nice reproduction! Well, I suppose we can call it a known bug. It's not on purpose, but after Leaflet changed something in how features are drawn in the map it started happening. It happens when you drag the map so that the shadow rectangle ends up moving outside of the original bounding box of the minimap, so I guess Leaflet has an optimisation to save memory/CPU by not drawing layers outside of a map's bounding box.
We could probably fix it by looking at Leaflet's code and maybe subclassing the drawing layers, but nobody has done the work yet.
We use Your plugin, and have received an issue to fix this problem in our maps. Has there been any work done to correct this?
As I'm sure you can guess from the very late response (sorry about that), there hasn't been any work done in the plugin, no. PRs are of course welcome!
An old thread, but I'm currently considering circumventing this issue, by copying the aiming rectangle element, appending it as a sibling, and setting the style of the new element to the shadow style. Any drawbacks to this and would a PR for this be considered?
You need to update renderer of _shadowRect in _inMiniMapMoving after setBounds
In your demo example, I found bug related to the circumcision of a shadowRect. Or is it so conceived?