change some defaults and change messages

This commit is contained in:
Anton Lavrenov
2018-08-13 12:13:29 +07:00
parent f256e05d75
commit 363f9943c5
5 changed files with 22 additions and 21 deletions

View File

@@ -5,6 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [new version][unreleased] ## [new version][unreleased]
### Changed
* Default duration for tweens and `node.to()` methods is now 300ms
## [2.2.1][2018-08-10] ## [2.2.1][2018-08-10]
### Added ### Added

View File

@@ -2,7 +2,7 @@
* Konva JavaScript Framework v2.2.1 * Konva JavaScript Framework v2.2.1
* http://konvajs.github.io/ * http://konvajs.github.io/
* Licensed under the MIT * Licensed under the MIT
* Date: Fri Aug 10 2018 * Date: Mon Aug 13 2018
* *
* 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 - present by Anton Lavrenov (Konva) * Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
@@ -7881,15 +7881,13 @@
for (n = 0; n < len; n++) { for (n = 0; n < len; n++) {
sel = selectorArr[n]; sel = selectorArr[n];
if (!Konva.Util.isValidSelector(sel)) { if (!Konva.Util.isValidSelector(sel)) {
Konva.Util.warn( var message =
'Selector "' + 'Selector "' +
sel + sel +
'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".' '" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".\n' +
); 'If you have a custom shape with such className, please change it to start with upper letter like "Triangle".\n' +
Konva.Util.warn( 'Konva is awesome, right?';
'If you have a custom shape with such className, please change it to start with upper letter like "Triangle".' Konva.Util.warn(message);
);
Konva.Util.warn('Konva is awesome, right?');
} }
// id selector // id selector
if (sel.charAt(0) === '#') { if (sel.charAt(0) === '#') {
@@ -12165,7 +12163,7 @@
key; key;
if (typeof config.duration === 'undefined') { if (typeof config.duration === 'undefined') {
duration = 1; duration = 0.3;
} else if (config.duration === 0) { } else if (config.duration === 0) {
// zero is bad value for duration // zero is bad value for duration
duration = 0.001; duration = 0.001;

4
konva.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -233,15 +233,13 @@
for (n = 0; n < len; n++) { for (n = 0; n < len; n++) {
sel = selectorArr[n]; sel = selectorArr[n];
if (!Konva.Util.isValidSelector(sel)) { if (!Konva.Util.isValidSelector(sel)) {
Konva.Util.warn( var message =
'Selector "' + 'Selector "' +
sel + sel +
'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".' '" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".\n' +
); 'If you have a custom shape with such className, please change it to start with upper letter like "Triangle".\n' +
Konva.Util.warn( 'Konva is awesome, right?';
'If you have a custom shape with such className, please change it to start with upper letter like "Triangle".' Konva.Util.warn(message);
);
Konva.Util.warn('Konva is awesome, right?');
} }
// id selector // id selector
if (sel.charAt(0) === '#') { if (sel.charAt(0) === '#') {

View File

@@ -156,7 +156,7 @@
key; key;
if (typeof config.duration === 'undefined') { if (typeof config.duration === 'undefined') {
duration = 1; duration = 0.3;
} else if (config.duration === 0) { } else if (config.duration === 0) {
// zero is bad value for duration // zero is bad value for duration
duration = 0.001; duration = 0.001;