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

@@ -62,6 +62,10 @@ setTimeout(function() {
err && console.log(err);
console.log('See out.png');
});
// now try to create image from url
Konva.Image.fromURL(data, () => {
// shoul'd throw
});
}
});
};

View File

@@ -26,6 +26,13 @@ Konva.Util.createCanvasElement = () => {
return node;
};
// create canvas in Node env
Konva.Util.createImageElement = () => {
const node = new canvas.Image();
node.style = {};
return node;
};
// _checkVisibility use dom element, in node we can skip it
Konva.Stage.prototype._checkVisibility = () => {};