main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
705 bytes
|
Rev | Line | |
---|
[d565449] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | const _FullInternals_1 = require("./_FullInternals");
|
---|
| 4 | const Canvas = require("canvas");
|
---|
| 5 | const canvas = Canvas['default'] || Canvas;
|
---|
| 6 | global.DOMMatrix = canvas.DOMMatrix;
|
---|
| 7 | const isNode = typeof global.document === 'undefined';
|
---|
| 8 | if (isNode) {
|
---|
| 9 | _FullInternals_1.Konva.Util['createCanvasElement'] = () => {
|
---|
| 10 | const node = canvas.createCanvas(300, 300);
|
---|
| 11 | if (!node['style']) {
|
---|
| 12 | node['style'] = {};
|
---|
| 13 | }
|
---|
| 14 | return node;
|
---|
| 15 | };
|
---|
| 16 | _FullInternals_1.Konva.Util.createImageElement = () => {
|
---|
| 17 | const node = new canvas.Image();
|
---|
| 18 | return node;
|
---|
| 19 | };
|
---|
| 20 | }
|
---|
| 21 | module.exports = _FullInternals_1.Konva;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.