[d565449] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | exports._registerNode = exports.Konva = exports.glob = void 0;
|
---|
| 4 | const PI_OVER_180 = Math.PI / 180;
|
---|
| 5 | function detectBrowser() {
|
---|
| 6 | return (typeof window !== 'undefined' &&
|
---|
| 7 | ({}.toString.call(window) === '[object Window]' ||
|
---|
| 8 | {}.toString.call(window) === '[object global]'));
|
---|
| 9 | }
|
---|
| 10 | exports.glob = typeof global !== 'undefined'
|
---|
| 11 | ? global
|
---|
| 12 | : typeof window !== 'undefined'
|
---|
| 13 | ? window
|
---|
| 14 | : typeof WorkerGlobalScope !== 'undefined'
|
---|
| 15 | ? self
|
---|
| 16 | : {};
|
---|
| 17 | exports.Konva = {
|
---|
| 18 | _global: exports.glob,
|
---|
| 19 | version: '9.3.14',
|
---|
| 20 | isBrowser: detectBrowser(),
|
---|
| 21 | isUnminified: /param/.test(function (param) { }.toString()),
|
---|
| 22 | dblClickWindow: 400,
|
---|
| 23 | getAngle(angle) {
|
---|
| 24 | return exports.Konva.angleDeg ? angle * PI_OVER_180 : angle;
|
---|
| 25 | },
|
---|
| 26 | enableTrace: false,
|
---|
| 27 | pointerEventsEnabled: true,
|
---|
| 28 | autoDrawEnabled: true,
|
---|
| 29 | hitOnDragEnabled: false,
|
---|
| 30 | capturePointerEventsEnabled: false,
|
---|
| 31 | _mouseListenClick: false,
|
---|
| 32 | _touchListenClick: false,
|
---|
| 33 | _pointerListenClick: false,
|
---|
| 34 | _mouseInDblClickWindow: false,
|
---|
| 35 | _touchInDblClickWindow: false,
|
---|
| 36 | _pointerInDblClickWindow: false,
|
---|
| 37 | _mouseDblClickPointerId: null,
|
---|
| 38 | _touchDblClickPointerId: null,
|
---|
| 39 | _pointerDblClickPointerId: null,
|
---|
| 40 | _fixTextRendering: false,
|
---|
| 41 | pixelRatio: (typeof window !== 'undefined' && window.devicePixelRatio) || 1,
|
---|
| 42 | dragDistance: 3,
|
---|
| 43 | angleDeg: true,
|
---|
| 44 | showWarnings: true,
|
---|
| 45 | dragButtons: [0, 1],
|
---|
| 46 | isDragging() {
|
---|
| 47 | return exports.Konva['DD'].isDragging;
|
---|
| 48 | },
|
---|
| 49 | isTransforming() {
|
---|
| 50 | var _a;
|
---|
| 51 | return (_a = exports.Konva['Transformer']) === null || _a === void 0 ? void 0 : _a.isTransforming();
|
---|
| 52 | },
|
---|
| 53 | isDragReady() {
|
---|
| 54 | return !!exports.Konva['DD'].node;
|
---|
| 55 | },
|
---|
| 56 | releaseCanvasOnDestroy: true,
|
---|
| 57 | document: exports.glob.document,
|
---|
| 58 | _injectGlobal(Konva) {
|
---|
| 59 | exports.glob.Konva = Konva;
|
---|
| 60 | },
|
---|
| 61 | };
|
---|
| 62 | const _registerNode = (NodeClass) => {
|
---|
| 63 | exports.Konva[NodeClass.prototype.getClassName()] = NodeClass;
|
---|
| 64 | };
|
---|
| 65 | exports._registerNode = _registerNode;
|
---|
| 66 | exports.Konva._injectGlobal(exports.Konva);
|
---|