fix line, fix finger, close #1181, close #1177

This commit is contained in:
Anton Lavrenov
2021-09-22 10:14:38 -05:00
parent a2c40a007a
commit 586ea3d860
8 changed files with 167 additions and 29 deletions

27
test/import-test.mjs Normal file
View File

@@ -0,0 +1,27 @@
function equal(val1, val2, message) {
if (val1 !== val2) {
throw new Error('Not passed: ' + message);
}
}
// try to import only core
import Konva from '../lib/Core.js';
// no external shapes
// equal(Konva.Rect, undefined, 'no external shapes');
import { Rect } from '../lib/shapes/Rect.js';
equal(Rect !== undefined, true, 'Rect is defined');
equal(Konva.Rect, Rect, 'Rect is injected');
import Konva2 from '../lib/index-node.js';
equal(Konva2.Rect, Rect, 'Rect is injected');
equal(Konva2, Konva, 'Same Konva');
// just do a simple action
const stage = new Konva.Stage();
stage.toDataURL();