Skip to content

Commit

Permalink
Changing Canvas size when changing screen size
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 authored and johndoe committed May 3, 2019
1 parent 153525e commit 71eab75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plugin/leaflet.canvas-markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function layerFactory(L) {
}
this._update();
this._clear(); // clear layers in redraw bounds
this._updateCtx();
this._draw(); // draw layers

this._redrawBounds = null;
Expand Down

2 comments on commit 71eab75

@johnd0e
Copy link

@johnd0e johnd0e commented on 71eab75 May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need it for every redraw?
May be we should listed for map's 'resize' event?
Also may be add it to _reset method and reuse _reset() in other places (e.g. onAdd)
But you've removed it in padding-option-branch..

@modos189
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need to get back _reset

Please sign in to comment.