parent
4a65730087
commit
222bc47a0d
@ -203,10 +203,12 @@ export var Canvas = Renderer.extend({
|
||||
},
|
||||
|
||||
_extendRedrawBounds: function (layer) {
|
||||
if (layer._pxBounds) {
|
||||
var padding = (layer.options.weight || 0) + 1;
|
||||
this._redrawBounds = this._redrawBounds || new Bounds();
|
||||
this._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));
|
||||
this._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));
|
||||
}
|
||||
},
|
||||
|
||||
_redraw: function () {
|
||||
|
@ -295,7 +295,7 @@ export var Polyline = Path.extend({
|
||||
var i, j, k, len, len2, part,
|
||||
w = this._clickTolerance();
|
||||
|
||||
if (!this._pxBounds.contains(p)) { return false; }
|
||||
if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }
|
||||
|
||||
// hit detection for polylines
|
||||
for (i = 0, len = this._parts.length; i < len; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user