mirror of
https://github.com/konvajs/konva.git
synced 2025-12-04 10:58:22 +08:00
fixed up fillStroke() logic in the Shape class
This commit is contained in:
13
dist/kinetic-core.js
vendored
13
dist/kinetic-core.js
vendored
@@ -2173,17 +2173,12 @@ Kinetic.Shape.prototype = {
|
||||
context.fill();
|
||||
}
|
||||
|
||||
var stroke, strokeWidth;
|
||||
if(this.attrs.stroke !== undefined || this.attrs.strokeWidth !== undefined) {
|
||||
if(this.attrs.stroke === undefined) {
|
||||
stroke = 'black';
|
||||
}
|
||||
else if(this.attrs.strokeWidth === undefined) {
|
||||
strokeWidth = 2;
|
||||
}
|
||||
var stroke = this.attrs.stroke !== undefined ? this.attrs.stroke : 'black';
|
||||
var strokeWidth = this.attrs.strokeWidth !== undefined ? this.attrs.strokeWidth : 2;
|
||||
|
||||
context.lineWidth = this.attrs.strokeWidth === undefined ? 1 : this.attrs.strokeWidth;
|
||||
context.strokeStyle = this.attrs.stroke;
|
||||
context.lineWidth = strokeWidth;
|
||||
context.strokeStyle = stroke;
|
||||
context.stroke();
|
||||
}
|
||||
},
|
||||
|
||||
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user