fix docs, fix line calculations, close #829

This commit is contained in:
Anton Lavrenov 2020-01-27 13:28:11 -05:00
parent f379beb968
commit 7f62ccf620
4 changed files with 50 additions and 1333 deletions

1377
konva.js

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
* @param {String} [config.fillPriority] can be color, linear-gradient, radial-graident, or pattern. The default value is color. The fillPriority property makes it really easy to toggle between different fill types. For example, if you want to toggle between a fill color style and a fill pattern style, simply set the fill property and the fillPattern properties, and then use setFillPriority('color') to render the shape with a color fill, or use setFillPriority('pattern') to render the shape with the pattern fill configuration
* @param {String} [config.stroke] stroke color
* @param {Number} [config.strokeWidth] stroke width
* @param {Boolean} [config.hitStrokeWidth] size of the stroke on hit canvas. The default is "auto" - equals to strokeWidth
* @param {Number} [config.hitStrokeWidth] size of the stroke on hit canvas. The default is "auto" - equals to strokeWidth
* @param {Boolean} [config.strokeHitEnabled] flag which enables or disables stroke hit region. The default is true
* @param {Boolean} [config.perfectDrawEnabled] flag which enables or disables using buffer canvas. The default is true
* @param {Boolean} [config.shadowForStrokeEnabled] flag which enables or disables shasow for stroke. The default is true

View File

@ -199,7 +199,7 @@ export class Line<Config extends LineConfig = LineConfig> extends Shape<
points[0],
points[1],
...this._getTensionPoints(),
points[points.length - 2],
points[points.length - 1],
points[points.length - 2]
];
} else {

View File

@ -117,7 +117,7 @@ suite('Image', function() {
imageObj.onload = function() {
var stage = addStage();
var layer = new Konva.Layer();
darth = new Konva.Image({
var darth = new Konva.Image({
x: 200,
y: 75,
image: imageObj,