This commit is contained in:
Anton Lavrenov 2017-08-25 14:00:58 +02:00
parent 460feab0ae
commit 13a21e0e0a
9 changed files with 37 additions and 40 deletions

View File

@ -8,6 +8,7 @@ var jsdoc = require('gulp-jsdoc3');
var connect = require('gulp-connect'); var connect = require('gulp-connect');
var jscpd = require('gulp-jscpd'); var jscpd = require('gulp-jscpd');
var eslint = require('gulp-eslint'); var eslint = require('gulp-eslint');
var gutil = require('gulp-util');
var fs = require('fs'); var fs = require('fs');
var NodeParams = fs var NodeParams = fs
@ -103,11 +104,10 @@ gulp.task('build', function() {
return build() return build()
.pipe(rename('konva.js')) .pipe(rename('konva.js'))
.pipe(gulp.dest('./')) .pipe(gulp.dest('./'))
.pipe( .pipe(uglify({ output: { comments: /^!|@preserve|@license|@cc_on/i } }))
uglify({ .on('error', function(err) {
preserveComments: 'some' gutil.log(gutil.colors.red('[Error]'), err.toString());
}) })
)
.pipe(rename('konva.min.js')) .pipe(rename('konva.min.js'))
.pipe(gulp.dest('./')); .pipe(gulp.dest('./'));
}); });

View File

@ -2,7 +2,7 @@
* Konva JavaScript Framework v1.6.8 * Konva JavaScript Framework v1.6.8
* 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: Thu Aug 24 2017 * Date: Fri Aug 25 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 - 2017 by Anton Lavrenov (Konva) * Modified work Copyright (C) 2014 - 2017 by Anton Lavrenov (Konva)
@ -65,14 +65,14 @@
pixelRatio: undefined, pixelRatio: undefined,
/** /**
* Drag distance property. If you start to drag a node you may want to wait until pointer is moved to some distance from start point, * Drag distance property. If you start to drag a node you may want to wait until pointer is moved to some distance from start point,
* only then start dragging. * only then start dragging. Default is 3px.
* @property dragDistance * @property dragDistance
* @default 0 * @default 0
* @memberof Konva * @memberof Konva
* @example * @example
* Konva.dragDistance = 10; * Konva.dragDistance = 10;
*/ */
dragDistance: 0, dragDistance: 3,
/** /**
* Use degree values for angle properties. You may set this property to false if you want to use radiant values. * Use degree values for angle properties. You may set this property to false if you want to use radiant values.
* @property angleDeg * @property angleDeg
@ -196,9 +196,9 @@
_parseUA: function(userAgent) { _parseUA: function(userAgent) {
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)) || [],
@ -4880,7 +4880,7 @@
}; };
})(); })();
(function() { (function(Konva) {
'use strict'; 'use strict';
/** /**
* Brighten Filter. * Brighten Filter.
@ -4924,7 +4924,7 @@
* @param {Number} brightness value between -1 and 1 * @param {Number} brightness value between -1 and 1
* @returns {Number} * @returns {Number}
*/ */
})(); })(Konva);
(function() { (function() {
'use strict'; 'use strict';
@ -4955,7 +4955,7 @@
the Gauss filter the Gauss filter
master repo: https://github.com/pavelpower/kineticjsGaussFilter master repo: https://github.com/pavelpower/kineticjsGaussFilter
*/ */
(function() { (function(Konva) {
'use strict'; 'use strict';
/* /*
@ -5804,7 +5804,7 @@
* @param {Integer} radius * @param {Integer} radius
* @returns {Integer} * @returns {Integer}
*/ */
})(); })(Konva);
/*eslint-disable max-depth */ /*eslint-disable max-depth */
(function() { (function() {
@ -12805,7 +12805,7 @@
Konva.Collection.mapMethods(Konva.Rect); Konva.Collection.mapMethods(Konva.Rect);
})(); })();
(function() { (function(Konva) {
'use strict'; 'use strict';
// the 0.0001 offset fixes a bug in Chrome 27 // the 0.0001 offset fixes a bug in Chrome 27
var PIx2 = Math.PI * 2 - 0.0001, CIRCLE = 'Circle'; var PIx2 = Math.PI * 2 - 0.0001, CIRCLE = 'Circle';
@ -12960,7 +12960,7 @@
*/ */
Konva.Collection.mapMethods(Konva.Circle); Konva.Collection.mapMethods(Konva.Circle);
})(); })(Konva);
(function() { (function() {
'use strict'; 'use strict';
@ -13548,7 +13548,7 @@
Konva.Collection.mapMethods(Konva.Wedge); Konva.Collection.mapMethods(Konva.Wedge);
})(); })();
(function() { (function(Konva) {
'use strict'; 'use strict';
/** /**
* Arc constructor * Arc constructor
@ -13761,7 +13761,7 @@
*/ */
Konva.Collection.mapMethods(Konva.Arc); Konva.Collection.mapMethods(Konva.Arc);
})(); })(Konva);
(function() { (function() {
'use strict'; 'use strict';
@ -17921,7 +17921,7 @@
Konva.Collection.mapMethods(Konva.Tag); Konva.Collection.mapMethods(Konva.Tag);
})(); })();
(function() { (function(Konva) {
'use strict'; 'use strict';
/** /**
* Arrow constructor * Arrow constructor
@ -18114,4 +18114,4 @@
Konva.Factory.addGetterSetter(Konva.Arrow, 'pointerAtBeginning', false); Konva.Factory.addGetterSetter(Konva.Arrow, 'pointerAtBeginning', false);
Konva.Collection.mapMethods(Konva.Arrow); Konva.Collection.mapMethods(Konva.Arrow);
})(); })(Konva);

9
konva.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -196,9 +196,9 @@
_parseUA: function(userAgent) { _parseUA: function(userAgent) {
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)) || [],

View File

@ -2,7 +2,7 @@
the Gauss filter the Gauss filter
master repo: https://github.com/pavelpower/kineticjsGaussFilter master repo: https://github.com/pavelpower/kineticjsGaussFilter
*/ */
(function() { (function(Konva) {
'use strict'; 'use strict';
/* /*
@ -851,4 +851,4 @@
* @param {Integer} radius * @param {Integer} radius
* @returns {Integer} * @returns {Integer}
*/ */
})(); })(Konva);

View File

@ -1,4 +1,4 @@
(function() { (function(Konva) {
'use strict'; 'use strict';
/** /**
* Brighten Filter. * Brighten Filter.
@ -42,4 +42,4 @@
* @param {Number} brightness value between -1 and 1 * @param {Number} brightness value between -1 and 1
* @returns {Number} * @returns {Number}
*/ */
})(); })(Konva);

View File

@ -1,4 +1,4 @@
(function() { (function(Konva) {
'use strict'; 'use strict';
/** /**
* Arc constructor * Arc constructor
@ -142,4 +142,4 @@
*/ */
Konva.Collection.mapMethods(Konva.Arc); Konva.Collection.mapMethods(Konva.Arc);
})(); })(Konva);

View File

@ -1,4 +1,4 @@
(function() { (function(Konva) {
'use strict'; 'use strict';
/** /**
* Arrow constructor * Arrow constructor
@ -122,4 +122,4 @@
Konva.Factory.addGetterSetter(Konva.Arrow, 'pointerAtBeginning', false); Konva.Factory.addGetterSetter(Konva.Arrow, 'pointerAtBeginning', false);
Konva.Collection.mapMethods(Konva.Arrow); Konva.Collection.mapMethods(Konva.Arrow);
})(); })(Konva);

View File

@ -1,4 +1,4 @@
(function() { (function(Konva) {
'use strict'; 'use strict';
// the 0.0001 offset fixes a bug in Chrome 27 // the 0.0001 offset fixes a bug in Chrome 27
var PIx2 = Math.PI * 2 - 0.0001, CIRCLE = 'Circle'; var PIx2 = Math.PI * 2 - 0.0001, CIRCLE = 'Circle';
@ -84,4 +84,4 @@
*/ */
Konva.Collection.mapMethods(Konva.Circle); Konva.Collection.mapMethods(Konva.Circle);
})(); })(Konva);