-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bugs #1
Fix bugs #1
Conversation
Also see IITC-CE#10 |
Leaflet.Canvas-Markers/src/plugin/leaflet.canvas-markers.js Lines 135 to 139 in 153525e
size is already defined.size and m assigned a value but never used.
iconOptions is assigned a value but never used.
self is not needed here as it is only used in the same scope (with the same this ).
|
Leaflet.Canvas-Markers/src/plugin/leaflet.canvas-markers.js Lines 494 to 501 in 153525e
|
`this._markers` is undefined in `_searchPoints`, called from event listeners. Now we check markers existence in the beginning of handlers. Note 1: Could be fixed in some another place: e.g. check `_markers` in `_searchPoints` ...or initialize (empty) `_markers` on CanvasMarkerLayer init Note 2: `!this._map` removed from condition in `_onMouseMove:` 'cause it's never should be true as we detach listeners on remove from map
Concerning last fix (ab64e18): in several places of code there are excessively verbose variant:
Similar excessive patterns present in many places, e.g.
|
Was protected in marker add time, but not on zoom/pan Sample: ``` VM2992:16252 Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state. at NewClass._drawImage (<anonymous>:16252:23) at NewClass._drawMarker (<anonymous>:16239:22) at <anonymous>:16200:22 at Array.forEach (<anonymous>) at NewClass._draw (<anonymous>:16179:16) at NewClass._redraw (<anonymous>:16077:18) at NewClass.fire (<anonymous>:1867:11) at NewClass._move (<anonymous>:5506:9) at NewClass._onZoomTransitionEnd (<anonymous>:5963:8) ```
I suppose there is one more fix needed: invalidate delayed draw queue ( |
Library is not compiled because of a typo. Fixed, plus added extra check to prevent errors.