mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
build
This commit is contained in:
parent
f68500ab85
commit
fbebc3fad2
@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
* Make events work on some CSS transforms
|
||||
* Fix caching on float dimensions
|
||||
* Fix `mouseleave` event on stage.
|
||||
|
||||
## 4.0.18 - 2019-11-20
|
||||
|
||||
|
13
konva.js
13
konva.js
@ -5197,22 +5197,27 @@
|
||||
* // remember to redraw layer if you changed something
|
||||
* layer.draw();
|
||||
*/
|
||||
Container.prototype.add = function (child) {
|
||||
Container.prototype.add = function () {
|
||||
var children = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
children[_i] = arguments[_i];
|
||||
}
|
||||
if (arguments.length > 1) {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
this.add(arguments[i]);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
var child = arguments[0];
|
||||
if (child.getParent()) {
|
||||
child.moveTo(this);
|
||||
return this;
|
||||
}
|
||||
var children = this.children;
|
||||
var _children = this.children;
|
||||
this._validateAdd(child);
|
||||
child.index = children.length;
|
||||
child.index = _children.length;
|
||||
child.parent = this;
|
||||
children.push(child);
|
||||
_children.push(child);
|
||||
this._fire('add', {
|
||||
child: child
|
||||
});
|
||||
|
2
konva.min.js
vendored
2
konva.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user