mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 16:53:06 +08:00
types fixes, konva-node updates
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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 = () => {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user