diff --git a/konva.js b/konva.js index 4fc97a10..9d6a87de 100644 --- a/konva.js +++ b/konva.js @@ -8,7 +8,7 @@ * Konva JavaScript Framework v4.2.0 * http://konvajs.org/ * Licensed under the MIT - * Date: Sat Mar 14 2020 + * Date: Mon Mar 16 2020 * * Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS) * Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva) @@ -10338,7 +10338,7 @@ * Arrow constructor * @constructor * @memberof Konva - * @augments Konva.Shape + * @augments Konva.Line * @param {Object} config * @param {Array} config.points Flat array of points coordinates. You should define them as [x1, y1, x2, y2, x3, y3]. * @param {Number} [config.tension] Higher values will result in a more curvy line. A value of 0 will result in no interpolation. @@ -10504,7 +10504,7 @@ x: lineRect.x - offset, y: lineRect.y - offset, width: lineRect.width + offset * 2, - height: lineRect.height + offset * 2, + height: lineRect.height + offset * 2 }; }; return Arrow; diff --git a/konva.min.js b/konva.min.js index 0f19e38a..ddb90460 100644 --- a/konva.min.js +++ b/konva.min.js @@ -3,7 +3,7 @@ * Konva JavaScript Framework v4.2.0 * http://konvajs.org/ * Licensed under the MIT - * Date: Sat Mar 14 2020 + * Date: Mon Mar 16 2020 * * Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS) * Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva) diff --git a/src/Canvas.ts b/src/Canvas.ts index cad2e60a..09c677ff 100644 --- a/src/Canvas.ts +++ b/src/Canvas.ts @@ -161,10 +161,10 @@ export class Canvas { * @returns {Number} * @example * // get - * var pixelRatio = canvas.pixelRatio(); + * var pixelRatio = layer.getCanvas.pixelRatio(); * * // set - * canvas.pixelRatio(100); + * layer.getCanvas().pixelRatio(3); */ Factory.addGetterSetter(Canvas, 'pixelRatio', undefined, getNumberValidator()); diff --git a/src/Global.ts b/src/Global.ts index 8c2d134c..8c90eca5 100644 --- a/src/Global.ts +++ b/src/Global.ts @@ -128,12 +128,13 @@ export const Konva = { /** * Global pixel ratio configuration. KonvaJS automatically detect pixel ratio of current device. - * But you may override such property, if you want to use your value. + * But you may override such property, if you want to use your value. Set this value before any components initializations. * @property pixelRatio * @default undefined * @name pixelRatio * @memberof Konva * @example + * // before any Konva code: * Konva.pixelRatio = 1; */ pixelRatio: undefined, diff --git a/src/shapes/Arrow.ts b/src/shapes/Arrow.ts index 7609acc6..44831a4e 100644 --- a/src/shapes/Arrow.ts +++ b/src/shapes/Arrow.ts @@ -18,7 +18,7 @@ export interface ArrowConfig extends LineConfig { * Arrow constructor * @constructor * @memberof Konva - * @augments Konva.Shape + * @augments Konva.Line * @param {Object} config * @param {Array} config.points Flat array of points coordinates. You should define them as [x1, y1, x2, y2, x3, y3]. * @param {Number} [config.tension] Higher values will result in a more curvy line. A value of 0 will result in no interpolation. @@ -119,8 +119,8 @@ export class Arrow extends Line { x: lineRect.x - offset, y: lineRect.y - offset, width: lineRect.width + offset * 2, - height: lineRect.height + offset * 2, - } + height: lineRect.height + offset * 2 + }; } pointerLength: GetSet;