types fixes, konva-node updates

This commit is contained in:
Anton Lavrenov
2019-07-11 04:59:39 +07:00
parent 8b38345f50
commit b798a56bff
6 changed files with 72 additions and 1393 deletions

View File

@@ -1636,7 +1636,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
return this._getAbsoluteTransform(top);
} else {
// if no argument, we can cache the result
return this._getCache(
return this._getCache(
ABSOLUTE_TRANSFORM,
this._getAbsoluteTransform
) as Transform;
@@ -2409,7 +2409,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
* @param {Element} [container] optional container dom element used only if you're
* creating a stage node
*/
static create(data, container) {
static create(data, container?) {
if (Util._isString(data)) {
data = JSON.parse(data);
}

View File

@@ -1326,7 +1326,7 @@ Factory.addGetterSetter(Shape, 'fillPatternRepeat', 'repeat');
* shape.fillPatternRepeat('repeat-x');
*
* // do not repeat the pattern
* shape.fillPatternRepeat('no repeat');
* shape.fillPatternRepeat('no-repeat');
*/
Factory.addGetterSetter(Shape, 'fillEnabled', true);