build and update docs

This commit is contained in:
Anton Lavrenov 2017-03-20 06:53:11 -05:00
parent eec50d149b
commit 41c7fa3df0
3 changed files with 36 additions and 17 deletions

View File

@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [Not released][Not released] ## [Not released][Not released]
### Added
- support for `lineDashOffset` property for `Konva.Shape`.
## [1.4.0][2017-02-07] ## [1.4.0][2017-02-07]
## Added ## Added

View File

@ -2,10 +2,10 @@
* Konva JavaScript Framework v1.4.0 * Konva JavaScript Framework v1.4.0
* http://konvajs.github.io/ * http://konvajs.github.io/
* Licensed under the MIT or GPL Version 2 licenses. * Licensed under the MIT or GPL Version 2 licenses.
* Date: Fri Feb 24 2017 * Date: Mon Mar 20 2017
* *
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS) * Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva) * Modified work Copyright (C) 2014 - 2017 by Anton Lavrenov (Konva)
* *
* @license * @license
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -197,11 +197,12 @@
var ua = userAgent.toLowerCase(), var ua = userAgent.toLowerCase(),
// jQuery UA regex // jQuery UA regex
match = /(chrome)[ \/]([\w.]+)/.exec(ua) || match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) ||
(ua.indexOf('compatible') < 0 && ua.indexOf('compatible') < 0 &&
/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)) || [], /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[],
// adding mobile flag as well // adding mobile flag as well
mobile = !!userAgent.match( mobile = !!userAgent.match(
/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i
@ -227,7 +228,7 @@
? window ? window
: typeof WorkerGlobalScope !== 'undefined' ? self : {}; : typeof WorkerGlobalScope !== 'undefined' ? self : {};
Konva.UA = Konva._parseUA((glob.navigator && glob.navigator.userAgent) || ''); Konva.UA = Konva._parseUA(glob.navigator && glob.navigator.userAgent || '');
if (glob.Konva) { if (glob.Konva) {
console.error( console.error(
@ -1527,6 +1528,7 @@
'shadowOffsetX', 'shadowOffsetX',
'shadowOffsetY', 'shadowOffsetY',
'lineCap', 'lineCap',
'lineDashOffset',
'lineJoin', 'lineJoin',
'lineWidth', 'lineWidth',
'miterLimit', 'miterLimit',
@ -2075,6 +2077,7 @@
this._applyLineCap(shape); this._applyLineCap(shape);
if (dash && shape.dashEnabled()) { if (dash && shape.dashEnabled()) {
this.setLineDash(dash); this.setLineDash(dash);
this.setAttr('lineDashOffset', shape.dashOffset());
} }
this.setAttr('lineWidth', shape.strokeWidth()); this.setAttr('lineWidth', shape.strokeWidth());
@ -8808,6 +8811,21 @@
* line.dash([10, 20, 0.001, 20]); * line.dash([10, 20, 0.001, 20]);
*/ */
Konva.Factory.addGetterSetter(Konva.Shape, 'dashOffset', 0);
/**
* get/set dash offset for stroke.
* @name dash
* @method
* @memberof Konva.Shape.prototype
* @param {Number} dash offset
* @returns {Number}
* @example
* // apply dashed stroke that is 10px long and 5 pixels apart with an offset of 5px
* line.dash([10, 5]);
* line.dashOffset(5);
*/
Konva.Factory.addGetterSetter(Konva.Shape, 'shadowColor'); Konva.Factory.addGetterSetter(Konva.Shape, 'shadowColor');
/** /**
@ -11488,8 +11506,6 @@
); );
} }
this.lastBatchDrawTime = now();
if (!this.batchAnim.isRunning()) { if (!this.batchAnim.isRunning()) {
this.batchAnim.start(); this.batchAnim.start();
} }

14
konva.min.js vendored

File diff suppressed because one or more lines are too long