Skip to content

Commit

Permalink
Add a small buffer to the clipping bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
bbecquet committed Jul 29, 2017
1 parent ad91274 commit 3b9e183
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion dist/leaflet.polylineDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ function interpolateBetweenPoints(ptA, ptB, ratio) {
})();

// enable rotationAngle and rotationOrigin support on L.Marker
/**
* Defines several classes of symbol factories,
* to be used with L.PolylineDecorator
*/

L.Symbol = L.Symbol || {};

/**
Expand Down Expand Up @@ -509,7 +514,7 @@ L.PolylineDecorator = L.FeatureGroup.extend({

var directionPoints = void 0,
symbols = void 0;
var mapBounds = this._map.getBounds();
var mapBounds = this._map.getBounds().pad(0.1);
return this._paths.map(function (path, i) {
directionPoints = _this4._getDirectionPoints(i, pattern)
// filter out invisible points
Expand Down
2 changes: 1 addition & 1 deletion src/L.PolylineDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ L.PolylineDecorator = L.FeatureGroup.extend({
*/
_getPatternLayers: function(pattern) {
let directionPoints, symbols;
const mapBounds = this._map.getBounds();
const mapBounds = this._map.getBounds().pad(0.1);
return this._paths.map((path, i) => {
directionPoints = this._getDirectionPoints(i, pattern)
// filter out invisible points
Expand Down

0 comments on commit 3b9e183

Please sign in to comment.