@inweb/viewer-visualize 25.12.1 → 25.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/viewer-visualize.js
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
const {handler: handler, thisArg: thisArg} = command;
|
|
41
41
|
const result = handler.apply(thisArg, [ viewer, ...args ]);
|
|
42
|
-
viewer === null || viewer ===
|
|
42
|
+
viewer === null || viewer === undefined ? undefined : viewer.emit({
|
|
43
43
|
type: "command",
|
|
44
44
|
data: id,
|
|
45
45
|
args: args
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
modelItr.delete();
|
|
441
|
-
(_a = visViewer.clearViewExtentsCache) === null || _a ===
|
|
441
|
+
(_a = visViewer.clearViewExtentsCache) === null || _a === undefined ? undefined : _a.call(visViewer);
|
|
442
442
|
viewer.update();
|
|
443
443
|
}
|
|
444
444
|
commands("VisualizeJS").registerCommand("applyModelTransform", applyModelTransform);
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
var _a;
|
|
552
552
|
if (!viewer.visualizeJs)
|
|
553
553
|
return "";
|
|
554
|
-
return ((_a = viewer.canvas) === null || _a ===
|
|
554
|
+
return ((_a = viewer.canvas) === null || _a === undefined ? undefined : _a.toDataURL(type, encoderOptions)) || "";
|
|
555
555
|
}
|
|
556
556
|
commands("VisualizeJS").registerCommand("createPreview", createPreview);
|
|
557
557
|
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
const visLib = viewer.visLib();
|
|
1011
1011
|
const visViewer = visLib.getViewer();
|
|
1012
1012
|
const selectionSet = new visLib.OdTvSelectionSet();
|
|
1013
|
-
handles === null || handles ===
|
|
1013
|
+
handles === null || handles === undefined ? undefined : handles.forEach((handle) => {
|
|
1014
1014
|
const entityId = visViewer.getEntityByOriginalHandle(handle + "");
|
|
1015
1015
|
if (!entityId.isNull())
|
|
1016
1016
|
selectionSet.appendEntity(entityId);
|
|
@@ -1126,7 +1126,7 @@
|
|
|
1126
1126
|
if (!entityId.isNull())
|
|
1127
1127
|
selectionSet.appendEntity(entityId);
|
|
1128
1128
|
});
|
|
1129
|
-
(_a = visViewer.zoomToObjects) === null || _a ===
|
|
1129
|
+
(_a = visViewer.zoomToObjects) === null || _a === undefined ? undefined : _a.call(visViewer, selectionSet);
|
|
1130
1130
|
viewer.deviceAutoRegeneration();
|
|
1131
1131
|
viewer.update();
|
|
1132
1132
|
viewer.emitEvent({ type: "zoom" });
|
|
@@ -1162,7 +1162,7 @@
|
|
|
1162
1162
|
return;
|
|
1163
1163
|
const visViewer = viewer.visViewer();
|
|
1164
1164
|
const selectionSet = visViewer.getSelected();
|
|
1165
|
-
(_a = visViewer.zoomToObjects) === null || _a ===
|
|
1165
|
+
(_a = visViewer.zoomToObjects) === null || _a === undefined ? undefined : _a.call(visViewer, selectionSet);
|
|
1166
1166
|
viewer.deviceAutoRegeneration();
|
|
1167
1167
|
viewer.update();
|
|
1168
1168
|
viewer.emitEvent({ type: "zoom" });
|
|
@@ -1244,7 +1244,7 @@
|
|
|
1244
1244
|
modelPtr.delete();
|
|
1245
1245
|
}
|
|
1246
1246
|
modelItr.delete();
|
|
1247
|
-
(_a = visViewer.clearViewExtentsCache) === null || _a ===
|
|
1247
|
+
(_a = visViewer.clearViewExtentsCache) === null || _a === undefined ? undefined : _a.call(visViewer);
|
|
1248
1248
|
viewer.update();
|
|
1249
1249
|
}
|
|
1250
1250
|
commands("VisualizeJS").registerCommand("autoTransformAllModelsToCentralPoint", autoTransformAllModelsToCentralPoint);
|
|
@@ -1270,7 +1270,7 @@
|
|
|
1270
1270
|
hasRequiredGlobal = 1;
|
|
1271
1271
|
(function (exports) {
|
|
1272
1272
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1273
|
-
exports._registerNode = exports.Konva = exports.glob =
|
|
1273
|
+
exports._registerNode = exports.Konva = exports.glob = undefined;
|
|
1274
1274
|
const PI_OVER_180 = Math.PI / 180;
|
|
1275
1275
|
function detectBrowser() {
|
|
1276
1276
|
return (typeof window !== 'undefined' &&
|
|
@@ -1286,7 +1286,7 @@
|
|
|
1286
1286
|
: {};
|
|
1287
1287
|
exports.Konva = {
|
|
1288
1288
|
_global: exports.glob,
|
|
1289
|
-
version: '9.3.
|
|
1289
|
+
version: '9.3.18',
|
|
1290
1290
|
isBrowser: detectBrowser(),
|
|
1291
1291
|
isUnminified: /param/.test(function (param) { }.toString()),
|
|
1292
1292
|
dblClickWindow: 400,
|
|
@@ -1318,7 +1318,7 @@
|
|
|
1318
1318
|
},
|
|
1319
1319
|
isTransforming() {
|
|
1320
1320
|
var _a;
|
|
1321
|
-
return (_a = exports.Konva['Transformer']) === null || _a ===
|
|
1321
|
+
return (_a = exports.Konva['Transformer']) === null || _a === undefined ? undefined : _a.isTransforming();
|
|
1322
1322
|
},
|
|
1323
1323
|
isDragReady() {
|
|
1324
1324
|
return !!exports.Konva['DD'].node;
|
|
@@ -1347,7 +1347,7 @@
|
|
|
1347
1347
|
hasRequiredUtil = 1;
|
|
1348
1348
|
(function (exports) {
|
|
1349
1349
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1350
|
-
exports.Util = exports.Transform =
|
|
1350
|
+
exports.Util = exports.Transform = undefined;
|
|
1351
1351
|
const Global_1 = requireGlobal();
|
|
1352
1352
|
class Transform {
|
|
1353
1353
|
constructor(m = [1, 0, 0, 1, 0, 0]) {
|
|
@@ -1496,7 +1496,7 @@
|
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
exports.Transform = Transform;
|
|
1499
|
-
|
|
1499
|
+
const OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {
|
|
1500
1500
|
aliceblue: [240, 248, 255],
|
|
1501
1501
|
antiquewhite: [250, 235, 215],
|
|
1502
1502
|
aqua: [0, 255, 255],
|
|
@@ -1646,7 +1646,8 @@
|
|
|
1646
1646
|
whitesmoke: [245, 245, 245],
|
|
1647
1647
|
yellow: [255, 255, 0],
|
|
1648
1648
|
yellowgreen: [154, 205, 5],
|
|
1649
|
-
}, RGB_REGEX = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)
|
|
1649
|
+
}, RGB_REGEX = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;
|
|
1650
|
+
let animQueue = [];
|
|
1650
1651
|
const req = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) ||
|
|
1651
1652
|
function (f) {
|
|
1652
1653
|
setTimeout(f, 60);
|
|
@@ -2043,19 +2044,19 @@
|
|
|
2043
2044
|
return pc;
|
|
2044
2045
|
},
|
|
2045
2046
|
_prepareArrayForTween(startArray, endArray, isClosed) {
|
|
2046
|
-
|
|
2047
|
+
const start = [], end = [];
|
|
2047
2048
|
if (startArray.length > endArray.length) {
|
|
2048
2049
|
const temp = endArray;
|
|
2049
2050
|
endArray = startArray;
|
|
2050
2051
|
startArray = temp;
|
|
2051
2052
|
}
|
|
2052
|
-
for (n = 0; n < startArray.length; n += 2) {
|
|
2053
|
+
for (let n = 0; n < startArray.length; n += 2) {
|
|
2053
2054
|
start.push({
|
|
2054
2055
|
x: startArray[n],
|
|
2055
2056
|
y: startArray[n + 1],
|
|
2056
2057
|
});
|
|
2057
2058
|
}
|
|
2058
|
-
for (n = 0; n < endArray.length; n += 2) {
|
|
2059
|
+
for (let n = 0; n < endArray.length; n += 2) {
|
|
2059
2060
|
end.push({
|
|
2060
2061
|
x: endArray[n],
|
|
2061
2062
|
y: endArray[n + 1],
|
|
@@ -2224,8 +2225,8 @@
|
|
|
2224
2225
|
function getNumberOrArrayOfNumbersValidator(noOfElements) {
|
|
2225
2226
|
if (Global_1.Konva.isUnminified) {
|
|
2226
2227
|
return function (val, attr) {
|
|
2227
|
-
|
|
2228
|
-
|
|
2228
|
+
let isNumber = Util_1.Util._isNumber(val);
|
|
2229
|
+
let isValidArray = Util_1.Util._isArray(val) && val.length == noOfElements;
|
|
2229
2230
|
if (!isNumber && !isValidArray) {
|
|
2230
2231
|
Util_1.Util.warn(_formatValue(val) +
|
|
2231
2232
|
' is a not valid value for "' +
|
|
@@ -2241,8 +2242,8 @@
|
|
|
2241
2242
|
function getNumberOrAutoValidator() {
|
|
2242
2243
|
if (Global_1.Konva.isUnminified) {
|
|
2243
2244
|
return function (val, attr) {
|
|
2244
|
-
|
|
2245
|
-
|
|
2245
|
+
var isNumber = Util_1.Util._isNumber(val);
|
|
2246
|
+
var isAuto = val === 'auto';
|
|
2246
2247
|
if (!(isNumber || isAuto)) {
|
|
2247
2248
|
Util_1.Util.warn(_formatValue(val) +
|
|
2248
2249
|
' is a not valid value for "' +
|
|
@@ -2271,7 +2272,7 @@
|
|
|
2271
2272
|
return function (val, attr) {
|
|
2272
2273
|
const isString = Util_1.Util._isString(val);
|
|
2273
2274
|
const isGradient = Object.prototype.toString.call(val) === '[object CanvasGradient]' ||
|
|
2274
|
-
(val && val
|
|
2275
|
+
(val && val['addColorStop']);
|
|
2275
2276
|
if (!(isString || isGradient)) {
|
|
2276
2277
|
Util_1.Util.warn(_formatValue(val) +
|
|
2277
2278
|
' is a not valid value for "' +
|
|
@@ -2326,7 +2327,7 @@
|
|
|
2326
2327
|
function getBooleanValidator() {
|
|
2327
2328
|
if (Global_1.Konva.isUnminified) {
|
|
2328
2329
|
return function (val, attr) {
|
|
2329
|
-
|
|
2330
|
+
var isBool = val === true || val === false;
|
|
2330
2331
|
if (!isBool) {
|
|
2331
2332
|
Util_1.Util.warn(_formatValue(val) +
|
|
2332
2333
|
' is a not valid value for "' +
|
|
@@ -2364,10 +2365,11 @@
|
|
|
2364
2365
|
hasRequiredFactory = 1;
|
|
2365
2366
|
(function (exports) {
|
|
2366
2367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2367
|
-
exports.Factory =
|
|
2368
|
+
exports.Factory = undefined;
|
|
2368
2369
|
const Util_1 = requireUtil();
|
|
2369
2370
|
const Validators_1 = requireValidators();
|
|
2370
|
-
const GET = 'get'
|
|
2371
|
+
const GET = 'get';
|
|
2372
|
+
const SET = 'set';
|
|
2371
2373
|
exports.Factory = {
|
|
2372
2374
|
addGetterSetter(constructor, attr, def, validator, after) {
|
|
2373
2375
|
exports.Factory.addGetter(constructor, attr, def);
|
|
@@ -2375,7 +2377,7 @@
|
|
|
2375
2377
|
exports.Factory.addOverloadedGetterSetter(constructor, attr);
|
|
2376
2378
|
},
|
|
2377
2379
|
addGetter(constructor, attr, def) {
|
|
2378
|
-
|
|
2380
|
+
var method = GET + Util_1.Util._capitalize(attr);
|
|
2379
2381
|
constructor.prototype[method] =
|
|
2380
2382
|
constructor.prototype[method] ||
|
|
2381
2383
|
function () {
|
|
@@ -2384,13 +2386,13 @@
|
|
|
2384
2386
|
};
|
|
2385
2387
|
},
|
|
2386
2388
|
addSetter(constructor, attr, validator, after) {
|
|
2387
|
-
|
|
2389
|
+
var method = SET + Util_1.Util._capitalize(attr);
|
|
2388
2390
|
if (!constructor.prototype[method]) {
|
|
2389
2391
|
exports.Factory.overWriteSetter(constructor, attr, validator, after);
|
|
2390
2392
|
}
|
|
2391
2393
|
},
|
|
2392
2394
|
overWriteSetter(constructor, attr, validator, after) {
|
|
2393
|
-
|
|
2395
|
+
var method = SET + Util_1.Util._capitalize(attr);
|
|
2394
2396
|
constructor.prototype[method] = function (val) {
|
|
2395
2397
|
if (validator && val !== undefined && val !== null) {
|
|
2396
2398
|
val = validator.call(this, val, attr);
|
|
@@ -2403,25 +2405,25 @@
|
|
|
2403
2405
|
};
|
|
2404
2406
|
},
|
|
2405
2407
|
addComponentsGetterSetter(constructor, attr, components, validator, after) {
|
|
2406
|
-
|
|
2408
|
+
const len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr);
|
|
2407
2409
|
constructor.prototype[getter] = function () {
|
|
2408
2410
|
const ret = {};
|
|
2409
|
-
for (n = 0; n < len; n++) {
|
|
2410
|
-
component = components[n];
|
|
2411
|
+
for (let n = 0; n < len; n++) {
|
|
2412
|
+
const component = components[n];
|
|
2411
2413
|
ret[component] = this.getAttr(attr + capitalize(component));
|
|
2412
2414
|
}
|
|
2413
2415
|
return ret;
|
|
2414
2416
|
};
|
|
2415
2417
|
const basicValidator = (0, Validators_1.getComponentValidator)(components);
|
|
2416
2418
|
constructor.prototype[setter] = function (val) {
|
|
2417
|
-
|
|
2419
|
+
const oldVal = this.attrs[attr];
|
|
2418
2420
|
if (validator) {
|
|
2419
|
-
val = validator.call(this, val);
|
|
2421
|
+
val = validator.call(this, val, attr);
|
|
2420
2422
|
}
|
|
2421
2423
|
if (basicValidator) {
|
|
2422
2424
|
basicValidator.call(this, val, attr);
|
|
2423
2425
|
}
|
|
2424
|
-
for (key in val) {
|
|
2426
|
+
for (const key in val) {
|
|
2425
2427
|
if (!val.hasOwnProperty(key)) {
|
|
2426
2428
|
continue;
|
|
2427
2429
|
}
|
|
@@ -2441,7 +2443,7 @@
|
|
|
2441
2443
|
exports.Factory.addOverloadedGetterSetter(constructor, attr);
|
|
2442
2444
|
},
|
|
2443
2445
|
addOverloadedGetterSetter(constructor, attr) {
|
|
2444
|
-
|
|
2446
|
+
var capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;
|
|
2445
2447
|
constructor.prototype[attr] = function () {
|
|
2446
2448
|
if (arguments.length) {
|
|
2447
2449
|
this[setter](arguments[0]);
|
|
@@ -2501,13 +2503,13 @@
|
|
|
2501
2503
|
if (hasRequiredContext) return Context;
|
|
2502
2504
|
hasRequiredContext = 1;
|
|
2503
2505
|
Object.defineProperty(Context, "__esModule", { value: true });
|
|
2504
|
-
Context.HitContext = Context.SceneContext = Context.Context =
|
|
2506
|
+
Context.HitContext = Context.SceneContext = Context.Context = undefined;
|
|
2505
2507
|
const Util_1 = requireUtil();
|
|
2506
2508
|
const Global_1 = requireGlobal();
|
|
2507
2509
|
function simplifyArray(arr) {
|
|
2508
|
-
|
|
2509
|
-
for (n = 0; n < len; n++) {
|
|
2510
|
-
val = arr[n];
|
|
2510
|
+
const retArr = [], len = arr.length, util = Util_1.Util;
|
|
2511
|
+
for (let n = 0; n < len; n++) {
|
|
2512
|
+
let val = arr[n];
|
|
2511
2513
|
if (util._isNumber(val)) {
|
|
2512
2514
|
val = Math.round(val * 1000) / 1000;
|
|
2513
2515
|
}
|
|
@@ -2990,7 +2992,7 @@
|
|
|
2990
2992
|
}
|
|
2991
2993
|
_applyShadow(shape) {
|
|
2992
2994
|
var _a, _b, _c;
|
|
2993
|
-
const color = (_a = shape.getShadowRGBA()) !== null && _a !==
|
|
2995
|
+
const color = (_a = shape.getShadowRGBA()) !== null && _a !== undefined ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== undefined ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== undefined ? _c : {
|
|
2994
2996
|
x: 0,
|
|
2995
2997
|
y: 0,
|
|
2996
2998
|
}, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;
|
|
@@ -3049,7 +3051,7 @@
|
|
|
3049
3051
|
if (hasRequiredCanvas) return Canvas;
|
|
3050
3052
|
hasRequiredCanvas = 1;
|
|
3051
3053
|
Object.defineProperty(Canvas, "__esModule", { value: true });
|
|
3052
|
-
Canvas.HitCanvas = Canvas.SceneCanvas = Canvas.Canvas =
|
|
3054
|
+
Canvas.HitCanvas = Canvas.SceneCanvas = Canvas.Canvas = undefined;
|
|
3053
3055
|
const Util_1 = requireUtil();
|
|
3054
3056
|
const Context_1 = requireContext();
|
|
3055
3057
|
const Global_1 = requireGlobal();
|
|
@@ -3175,7 +3177,7 @@
|
|
|
3175
3177
|
hasRequiredDragAndDrop = 1;
|
|
3176
3178
|
(function (exports) {
|
|
3177
3179
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3178
|
-
exports.DD =
|
|
3180
|
+
exports.DD = undefined;
|
|
3179
3181
|
const Global_1 = requireGlobal();
|
|
3180
3182
|
const Util_1 = requireUtil();
|
|
3181
3183
|
exports.DD = {
|
|
@@ -3296,7 +3298,7 @@
|
|
|
3296
3298
|
if (hasRequiredNode) return Node;
|
|
3297
3299
|
hasRequiredNode = 1;
|
|
3298
3300
|
Object.defineProperty(Node, "__esModule", { value: true });
|
|
3299
|
-
Node.Node =
|
|
3301
|
+
Node.Node = undefined;
|
|
3300
3302
|
const Util_1 = requireUtil();
|
|
3301
3303
|
const Factory_1 = requireFactory();
|
|
3302
3304
|
const Canvas_1 = requireCanvas();
|
|
@@ -4201,7 +4203,7 @@
|
|
|
4201
4203
|
var _a, _b;
|
|
4202
4204
|
const m = this._cache.get(TRANSFORM) || new Util_1.Transform();
|
|
4203
4205
|
m.reset();
|
|
4204
|
-
const x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !==
|
|
4206
|
+
const x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== undefined ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== undefined ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;
|
|
4205
4207
|
if (x !== 0 || y !== 0) {
|
|
4206
4208
|
m.translate(x, y);
|
|
4207
4209
|
}
|
|
@@ -4403,7 +4405,7 @@
|
|
|
4403
4405
|
_requestDraw() {
|
|
4404
4406
|
if (Global_1.Konva.autoDrawEnabled) {
|
|
4405
4407
|
const drawNode = this.getLayer() || this.getStage();
|
|
4406
|
-
drawNode === null || drawNode ===
|
|
4408
|
+
drawNode === null || drawNode === undefined ? undefined : drawNode.batchDraw();
|
|
4407
4409
|
}
|
|
4408
4410
|
}
|
|
4409
4411
|
_setAttr(key, val) {
|
|
@@ -4464,13 +4466,13 @@
|
|
|
4464
4466
|
}
|
|
4465
4467
|
_getProtoListeners(eventType) {
|
|
4466
4468
|
var _a, _b, _c;
|
|
4467
|
-
const allListeners = (_a = this._cache.get(ALL_LISTENERS)) !== null && _a !==
|
|
4468
|
-
let events = allListeners === null || allListeners ===
|
|
4469
|
+
const allListeners = (_a = this._cache.get(ALL_LISTENERS)) !== null && _a !== undefined ? _a : {};
|
|
4470
|
+
let events = allListeners === null || allListeners === undefined ? undefined : allListeners[eventType];
|
|
4469
4471
|
if (events === undefined) {
|
|
4470
4472
|
events = [];
|
|
4471
4473
|
let obj = Object.getPrototypeOf(this);
|
|
4472
4474
|
while (obj) {
|
|
4473
|
-
const hierarchyEvents = (_c = (_b = obj.eventListeners) === null || _b ===
|
|
4475
|
+
const hierarchyEvents = (_c = (_b = obj.eventListeners) === null || _b === undefined ? undefined : _b[eventType]) !== null && _c !== undefined ? _c : [];
|
|
4474
4476
|
events.push(...hierarchyEvents);
|
|
4475
4477
|
obj = Object.getPrototypeOf(obj);
|
|
4476
4478
|
}
|
|
@@ -4706,12 +4708,12 @@
|
|
|
4706
4708
|
Factory_1.Factory.addComponentsGetterSetter(Node$1, 'offset', ['x', 'y']);
|
|
4707
4709
|
addGetterSetter(Node$1, 'offsetX', 0, (0, Validators_1.getNumberValidator)());
|
|
4708
4710
|
addGetterSetter(Node$1, 'offsetY', 0, (0, Validators_1.getNumberValidator)());
|
|
4709
|
-
addGetterSetter(Node$1, 'dragDistance',
|
|
4711
|
+
addGetterSetter(Node$1, 'dragDistance', undefined, (0, Validators_1.getNumberValidator)());
|
|
4710
4712
|
addGetterSetter(Node$1, 'width', 0, (0, Validators_1.getNumberValidator)());
|
|
4711
4713
|
addGetterSetter(Node$1, 'height', 0, (0, Validators_1.getNumberValidator)());
|
|
4712
4714
|
addGetterSetter(Node$1, 'listening', true, (0, Validators_1.getBooleanValidator)());
|
|
4713
4715
|
addGetterSetter(Node$1, 'preventDefault', true, (0, Validators_1.getBooleanValidator)());
|
|
4714
|
-
addGetterSetter(Node$1, 'filters',
|
|
4716
|
+
addGetterSetter(Node$1, 'filters', undefined, function (val) {
|
|
4715
4717
|
this._filterUpToDate = false;
|
|
4716
4718
|
return val;
|
|
4717
4719
|
});
|
|
@@ -4736,7 +4738,7 @@
|
|
|
4736
4738
|
if (hasRequiredContainer) return Container;
|
|
4737
4739
|
hasRequiredContainer = 1;
|
|
4738
4740
|
Object.defineProperty(Container, "__esModule", { value: true });
|
|
4739
|
-
Container.Container =
|
|
4741
|
+
Container.Container = undefined;
|
|
4740
4742
|
const Factory_1 = requireFactory();
|
|
4741
4743
|
const Node_1 = requireNode();
|
|
4742
4744
|
const Validators_1 = requireValidators();
|
|
@@ -4893,13 +4895,13 @@
|
|
|
4893
4895
|
if (this.isCached()) {
|
|
4894
4896
|
return;
|
|
4895
4897
|
}
|
|
4896
|
-
(_a = this.children) === null || _a ===
|
|
4898
|
+
(_a = this.children) === null || _a === undefined ? undefined : _a.forEach(function (node) {
|
|
4897
4899
|
node._clearSelfAndDescendantCache(attr);
|
|
4898
4900
|
});
|
|
4899
4901
|
}
|
|
4900
4902
|
_setChildrenIndices() {
|
|
4901
4903
|
var _a;
|
|
4902
|
-
(_a = this.children) === null || _a ===
|
|
4904
|
+
(_a = this.children) === null || _a === undefined ? undefined : _a.forEach(function (child, n) {
|
|
4903
4905
|
child.index = n;
|
|
4904
4906
|
});
|
|
4905
4907
|
this._requestDraw();
|
|
@@ -4970,7 +4972,7 @@
|
|
|
4970
4972
|
context.save();
|
|
4971
4973
|
context._applyGlobalCompositeOperation(this);
|
|
4972
4974
|
}
|
|
4973
|
-
(_a = this.children) === null || _a ===
|
|
4975
|
+
(_a = this.children) === null || _a === undefined ? undefined : _a.forEach(function (child) {
|
|
4974
4976
|
child[drawMethod](canvas, top, bufferCanvas);
|
|
4975
4977
|
});
|
|
4976
4978
|
if (hasComposition) {
|
|
@@ -4992,7 +4994,7 @@
|
|
|
4992
4994
|
height: 0,
|
|
4993
4995
|
};
|
|
4994
4996
|
const that = this;
|
|
4995
|
-
(_a = this.children) === null || _a ===
|
|
4997
|
+
(_a = this.children) === null || _a === undefined ? undefined : _a.forEach(function (child) {
|
|
4996
4998
|
if (!child.visible()) {
|
|
4997
4999
|
return;
|
|
4998
5000
|
}
|
|
@@ -5124,7 +5126,7 @@
|
|
|
5124
5126
|
hasRequiredStage = 1;
|
|
5125
5127
|
(function (exports) {
|
|
5126
5128
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5127
|
-
exports.Stage = exports.stages =
|
|
5129
|
+
exports.Stage = exports.stages = undefined;
|
|
5128
5130
|
const Util_1 = requireUtil();
|
|
5129
5131
|
const Factory_1 = requireFactory();
|
|
5130
5132
|
const Container_1 = requireContainer();
|
|
@@ -5282,8 +5284,8 @@
|
|
|
5282
5284
|
return true;
|
|
5283
5285
|
}
|
|
5284
5286
|
clear() {
|
|
5285
|
-
|
|
5286
|
-
for (n = 0; n < len; n++) {
|
|
5287
|
+
const layers = this.children, len = layers.length;
|
|
5288
|
+
for (let n = 0; n < len; n++) {
|
|
5287
5289
|
layers[n].clear();
|
|
5288
5290
|
}
|
|
5289
5291
|
return this;
|
|
@@ -5361,8 +5363,8 @@
|
|
|
5361
5363
|
if (!pos) {
|
|
5362
5364
|
return null;
|
|
5363
5365
|
}
|
|
5364
|
-
|
|
5365
|
-
for (n = end; n >= 0; n--) {
|
|
5366
|
+
const layers = this.children, len = layers.length, end = len - 1;
|
|
5367
|
+
for (let n = end; n >= 0; n--) {
|
|
5366
5368
|
const shape = layers[n].getIntersection(pos);
|
|
5367
5369
|
if (shape) {
|
|
5368
5370
|
return shape;
|
|
@@ -5675,7 +5677,7 @@
|
|
|
5675
5677
|
});
|
|
5676
5678
|
}
|
|
5677
5679
|
Global_1.Konva['_' + eventType + 'ListenClick'] = false;
|
|
5678
|
-
if (evt.cancelable && eventType !== 'touch') {
|
|
5680
|
+
if (evt.cancelable && eventType !== 'touch' && eventType !== 'pointer') {
|
|
5679
5681
|
evt.preventDefault();
|
|
5680
5682
|
}
|
|
5681
5683
|
}
|
|
@@ -5720,7 +5722,8 @@
|
|
|
5720
5722
|
PointerEvents.releaseCapture(evt.pointerId);
|
|
5721
5723
|
}
|
|
5722
5724
|
setPointersPositions(evt) {
|
|
5723
|
-
|
|
5725
|
+
const contentPosition = this._getContentPosition();
|
|
5726
|
+
let x = null, y = null;
|
|
5724
5727
|
evt = evt ? evt : window.event;
|
|
5725
5728
|
if (evt.touches !== undefined) {
|
|
5726
5729
|
this._pointerPositions = [];
|
|
@@ -5840,7 +5843,7 @@
|
|
|
5840
5843
|
hasRequiredShape = 1;
|
|
5841
5844
|
(function (exports) {
|
|
5842
5845
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5843
|
-
exports.Shape = exports.shapes =
|
|
5846
|
+
exports.Shape = exports.shapes = undefined;
|
|
5844
5847
|
const Global_1 = requireGlobal();
|
|
5845
5848
|
const Util_1 = requireUtil();
|
|
5846
5849
|
const Factory_1 = requireFactory();
|
|
@@ -6073,7 +6076,7 @@
|
|
|
6073
6076
|
}
|
|
6074
6077
|
_useBufferCanvas(forceFill) {
|
|
6075
6078
|
var _a;
|
|
6076
|
-
const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !==
|
|
6079
|
+
const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !== undefined ? _a : true;
|
|
6077
6080
|
if (!perfectDrawEnabled) {
|
|
6078
6081
|
return false;
|
|
6079
6082
|
}
|
|
@@ -6242,16 +6245,16 @@
|
|
|
6242
6245
|
return this;
|
|
6243
6246
|
}
|
|
6244
6247
|
drawHitFromCache(alphaThreshold = 0) {
|
|
6245
|
-
|
|
6248
|
+
const cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight();
|
|
6246
6249
|
hitContext.clear();
|
|
6247
6250
|
hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);
|
|
6248
6251
|
try {
|
|
6249
|
-
hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);
|
|
6250
|
-
hitData = hitImageData.data;
|
|
6251
|
-
len = hitData.length;
|
|
6252
|
-
rgbColorKey = Util_1.Util._hexToRgb(this.colorKey);
|
|
6253
|
-
for (i = 0; i < len; i += 4) {
|
|
6254
|
-
alpha = hitData[i + 3];
|
|
6252
|
+
const hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);
|
|
6253
|
+
const hitData = hitImageData.data;
|
|
6254
|
+
const len = hitData.length;
|
|
6255
|
+
const rgbColorKey = Util_1.Util._hexToRgb(this.colorKey);
|
|
6256
|
+
for (let i = 0; i < len; i += 4) {
|
|
6257
|
+
const alpha = hitData[i + 3];
|
|
6255
6258
|
if (alpha > alphaThreshold) {
|
|
6256
6259
|
hitData[i] = rgbColorKey.r;
|
|
6257
6260
|
hitData[i + 1] = rgbColorKey.g;
|
|
@@ -6393,7 +6396,7 @@
|
|
|
6393
6396
|
if (hasRequiredLayer) return Layer;
|
|
6394
6397
|
hasRequiredLayer = 1;
|
|
6395
6398
|
Object.defineProperty(Layer, "__esModule", { value: true });
|
|
6396
|
-
Layer.Layer =
|
|
6399
|
+
Layer.Layer = undefined;
|
|
6397
6400
|
const Util_1 = requireUtil();
|
|
6398
6401
|
const Container_1 = requireContainer();
|
|
6399
6402
|
const Node_1 = requireNode();
|
|
@@ -6711,7 +6714,7 @@
|
|
|
6711
6714
|
if (hasRequiredFastLayer) return FastLayer;
|
|
6712
6715
|
hasRequiredFastLayer = 1;
|
|
6713
6716
|
Object.defineProperty(FastLayer, "__esModule", { value: true });
|
|
6714
|
-
FastLayer.FastLayer =
|
|
6717
|
+
FastLayer.FastLayer = undefined;
|
|
6715
6718
|
const Util_1 = requireUtil();
|
|
6716
6719
|
const Layer_1 = requireLayer();
|
|
6717
6720
|
const Global_1 = requireGlobal();
|
|
@@ -6736,7 +6739,7 @@
|
|
|
6736
6739
|
if (hasRequiredGroup) return Group;
|
|
6737
6740
|
hasRequiredGroup = 1;
|
|
6738
6741
|
Object.defineProperty(Group, "__esModule", { value: true });
|
|
6739
|
-
Group.Group =
|
|
6742
|
+
Group.Group = undefined;
|
|
6740
6743
|
const Util_1 = requireUtil();
|
|
6741
6744
|
const Container_1 = requireContainer();
|
|
6742
6745
|
const Global_1 = requireGlobal();
|
|
@@ -6762,7 +6765,7 @@
|
|
|
6762
6765
|
if (hasRequiredAnimation) return Animation;
|
|
6763
6766
|
hasRequiredAnimation = 1;
|
|
6764
6767
|
Object.defineProperty(Animation, "__esModule", { value: true });
|
|
6765
|
-
Animation.Animation =
|
|
6768
|
+
Animation.Animation = undefined;
|
|
6766
6769
|
const Global_1 = requireGlobal();
|
|
6767
6770
|
const Util_1 = requireUtil();
|
|
6768
6771
|
const now = (function () {
|
|
@@ -6918,18 +6921,19 @@
|
|
|
6918
6921
|
hasRequiredTween = 1;
|
|
6919
6922
|
(function (exports) {
|
|
6920
6923
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6921
|
-
exports.Easings = exports.Tween =
|
|
6924
|
+
exports.Easings = exports.Tween = undefined;
|
|
6922
6925
|
const Util_1 = requireUtil();
|
|
6923
6926
|
const Animation_1 = requireAnimation();
|
|
6924
6927
|
const Node_1 = requireNode();
|
|
6925
6928
|
const Global_1 = requireGlobal();
|
|
6926
|
-
|
|
6929
|
+
const blacklist = {
|
|
6927
6930
|
node: 1,
|
|
6928
6931
|
duration: 1,
|
|
6929
6932
|
easing: 1,
|
|
6930
6933
|
onFinish: 1,
|
|
6931
6934
|
yoyo: 1,
|
|
6932
|
-
}, PAUSED = 1, PLAYING = 2, REVERSING = 3,
|
|
6935
|
+
}, PAUSED = 1, PLAYING = 2, REVERSING = 3, colorAttrs = ['fill', 'stroke', 'shadowColor'];
|
|
6936
|
+
let idCounter = 0;
|
|
6933
6937
|
class TweenEngine {
|
|
6934
6938
|
constructor(prop, propFunc, func, begin, finish, duration, yoyo) {
|
|
6935
6939
|
this.prop = prop;
|
|
@@ -7046,7 +7050,8 @@
|
|
|
7046
7050
|
}
|
|
7047
7051
|
class Tween {
|
|
7048
7052
|
constructor(config) {
|
|
7049
|
-
|
|
7053
|
+
const that = this, node = config.node, nodeId = node._id, easing = config.easing || exports.Easings.Linear, yoyo = !!config.yoyo;
|
|
7054
|
+
let duration, key;
|
|
7050
7055
|
if (typeof config.duration === 'undefined') {
|
|
7051
7056
|
duration = 0.3;
|
|
7052
7057
|
}
|
|
@@ -7090,12 +7095,13 @@
|
|
|
7090
7095
|
this.onUpdate = config.onUpdate;
|
|
7091
7096
|
}
|
|
7092
7097
|
_addAttr(key, end) {
|
|
7093
|
-
|
|
7094
|
-
|
|
7098
|
+
const node = this.node, nodeId = node._id;
|
|
7099
|
+
let diff, len, trueEnd, trueStart, endRGBA;
|
|
7100
|
+
const tweenId = Tween.tweens[nodeId][key];
|
|
7095
7101
|
if (tweenId) {
|
|
7096
7102
|
delete Tween.attrs[nodeId][tweenId][key];
|
|
7097
7103
|
}
|
|
7098
|
-
start = node.getAttr(key);
|
|
7104
|
+
let start = node.getAttr(key);
|
|
7099
7105
|
if (Util_1.Util._isArray(end)) {
|
|
7100
7106
|
diff = [];
|
|
7101
7107
|
len = Math.max(end.length, start.length);
|
|
@@ -7110,7 +7116,7 @@
|
|
|
7110
7116
|
}
|
|
7111
7117
|
}
|
|
7112
7118
|
if (key.indexOf('fill') === 0) {
|
|
7113
|
-
for (n = 0; n < len; n++) {
|
|
7119
|
+
for (let n = 0; n < len; n++) {
|
|
7114
7120
|
if (n % 2 === 0) {
|
|
7115
7121
|
diff.push(end[n] - start[n]);
|
|
7116
7122
|
}
|
|
@@ -7128,7 +7134,7 @@
|
|
|
7128
7134
|
}
|
|
7129
7135
|
}
|
|
7130
7136
|
else {
|
|
7131
|
-
for (n = 0; n < len; n++) {
|
|
7137
|
+
for (let n = 0; n < len; n++) {
|
|
7132
7138
|
diff.push(end[n] - start[n]);
|
|
7133
7139
|
}
|
|
7134
7140
|
}
|
|
@@ -7156,7 +7162,8 @@
|
|
|
7156
7162
|
Tween.tweens[nodeId][key] = this._id;
|
|
7157
7163
|
}
|
|
7158
7164
|
_tweenFunc(i) {
|
|
7159
|
-
|
|
7165
|
+
const node = this.node, attrs = Tween.attrs[node._id][this._id];
|
|
7166
|
+
let key, attr, start, diff, newVal, n, len, end;
|
|
7160
7167
|
for (key in attrs) {
|
|
7161
7168
|
attr = attrs[key];
|
|
7162
7169
|
start = attr.start;
|
|
@@ -7268,9 +7275,9 @@
|
|
|
7268
7275
|
return this;
|
|
7269
7276
|
}
|
|
7270
7277
|
destroy() {
|
|
7271
|
-
|
|
7278
|
+
const nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId];
|
|
7272
7279
|
this.pause();
|
|
7273
|
-
for (key in attrs) {
|
|
7280
|
+
for (const key in attrs) {
|
|
7274
7281
|
delete Tween.tweens[nodeId][key];
|
|
7275
7282
|
}
|
|
7276
7283
|
delete Tween.attrs[nodeId][thisId];
|
|
@@ -7447,7 +7454,7 @@
|
|
|
7447
7454
|
hasRequired_CoreInternals = 1;
|
|
7448
7455
|
(function (exports) {
|
|
7449
7456
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7450
|
-
exports.Konva =
|
|
7457
|
+
exports.Konva = undefined;
|
|
7451
7458
|
const Global_1 = requireGlobal();
|
|
7452
7459
|
const Util_1 = requireUtil();
|
|
7453
7460
|
const Node_1 = requireNode();
|
|
@@ -7494,7 +7501,7 @@
|
|
|
7494
7501
|
if (hasRequiredArc) return Arc;
|
|
7495
7502
|
hasRequiredArc = 1;
|
|
7496
7503
|
Object.defineProperty(Arc, "__esModule", { value: true });
|
|
7497
|
-
Arc.Arc =
|
|
7504
|
+
Arc.Arc = undefined;
|
|
7498
7505
|
const Factory_1 = requireFactory();
|
|
7499
7506
|
const Shape_1 = requireShape();
|
|
7500
7507
|
const Global_1 = requireGlobal();
|
|
@@ -7564,7 +7571,7 @@
|
|
|
7564
7571
|
if (hasRequiredLine) return Line;
|
|
7565
7572
|
hasRequiredLine = 1;
|
|
7566
7573
|
Object.defineProperty(Line, "__esModule", { value: true });
|
|
7567
|
-
Line.Line =
|
|
7574
|
+
Line.Line = undefined;
|
|
7568
7575
|
const Factory_1 = requireFactory();
|
|
7569
7576
|
const Global_1 = requireGlobal();
|
|
7570
7577
|
const Shape_1 = requireShape();
|
|
@@ -7735,342 +7742,342 @@
|
|
|
7735
7742
|
hasRequiredBezierFunctions = 1;
|
|
7736
7743
|
(function (exports) {
|
|
7737
7744
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7738
|
-
exports.t2length = exports.getQuadraticArcLength = exports.getCubicArcLength = exports.binomialCoefficients = exports.cValues = exports.tValues =
|
|
7745
|
+
exports.t2length = exports.getQuadraticArcLength = exports.getCubicArcLength = exports.binomialCoefficients = exports.cValues = exports.tValues = undefined;
|
|
7739
7746
|
exports.tValues = [
|
|
7740
7747
|
[],
|
|
7741
7748
|
[],
|
|
7742
7749
|
[
|
|
7743
|
-
-0.
|
|
7750
|
+
-0.5773502691896257,
|
|
7744
7751
|
0.5773502691896257645091487805019574556476,
|
|
7745
7752
|
],
|
|
7746
7753
|
[
|
|
7747
|
-
0, -0.
|
|
7754
|
+
0, -0.7745966692414834,
|
|
7748
7755
|
0.7745966692414833770358530799564799221665,
|
|
7749
7756
|
],
|
|
7750
7757
|
[
|
|
7751
|
-
-0.
|
|
7758
|
+
-0.33998104358485626,
|
|
7752
7759
|
0.3399810435848562648026657591032446872005,
|
|
7753
|
-
-0.
|
|
7760
|
+
-0.8611363115940526,
|
|
7754
7761
|
0.8611363115940525752239464888928095050957,
|
|
7755
7762
|
],
|
|
7756
7763
|
[
|
|
7757
|
-
0, -0.
|
|
7764
|
+
0, -0.5384693101056831,
|
|
7758
7765
|
0.5384693101056830910363144207002088049672,
|
|
7759
|
-
-0.
|
|
7766
|
+
-0.906179845938664,
|
|
7760
7767
|
0.9061798459386639927976268782993929651256,
|
|
7761
7768
|
],
|
|
7762
7769
|
[
|
|
7763
7770
|
0.6612093864662645136613995950199053470064,
|
|
7764
|
-
-0.
|
|
7765
|
-
-0.
|
|
7771
|
+
-0.6612093864662645,
|
|
7772
|
+
-0.2386191860831969,
|
|
7766
7773
|
0.2386191860831969086305017216807119354186,
|
|
7767
|
-
-0.
|
|
7774
|
+
-0.932469514203152,
|
|
7768
7775
|
0.9324695142031520278123015544939946091347,
|
|
7769
7776
|
],
|
|
7770
7777
|
[
|
|
7771
7778
|
0, 0.4058451513773971669066064120769614633473,
|
|
7772
|
-
-0.
|
|
7773
|
-
-0.
|
|
7779
|
+
-0.4058451513773972,
|
|
7780
|
+
-0.7415311855993945,
|
|
7774
7781
|
0.7415311855993944398638647732807884070741,
|
|
7775
|
-
-0.
|
|
7782
|
+
-0.9491079123427585,
|
|
7776
7783
|
0.9491079123427585245261896840478512624007,
|
|
7777
7784
|
],
|
|
7778
7785
|
[
|
|
7779
|
-
-0.
|
|
7786
|
+
-0.1834346424956498,
|
|
7780
7787
|
0.1834346424956498049394761423601839806667,
|
|
7781
|
-
-0.
|
|
7788
|
+
-0.525532409916329,
|
|
7782
7789
|
0.5255324099163289858177390491892463490419,
|
|
7783
|
-
-0.
|
|
7790
|
+
-0.7966664774136267,
|
|
7784
7791
|
0.7966664774136267395915539364758304368371,
|
|
7785
|
-
-0.
|
|
7792
|
+
-0.9602898564975363,
|
|
7786
7793
|
0.9602898564975362316835608685694729904282,
|
|
7787
7794
|
],
|
|
7788
7795
|
[
|
|
7789
|
-
0, -0.
|
|
7796
|
+
0, -0.8360311073266358,
|
|
7790
7797
|
0.8360311073266357942994297880697348765441,
|
|
7791
|
-
-0.
|
|
7798
|
+
-0.9681602395076261,
|
|
7792
7799
|
0.9681602395076260898355762029036728700494,
|
|
7793
|
-
-0.
|
|
7800
|
+
-0.3242534234038089,
|
|
7794
7801
|
0.3242534234038089290385380146433366085719,
|
|
7795
|
-
-0.
|
|
7802
|
+
-0.6133714327005904,
|
|
7796
7803
|
0.6133714327005903973087020393414741847857,
|
|
7797
7804
|
],
|
|
7798
7805
|
[
|
|
7799
|
-
-0.
|
|
7806
|
+
-0.14887433898163122,
|
|
7800
7807
|
0.1488743389816312108848260011297199846175,
|
|
7801
|
-
-0.
|
|
7808
|
+
-0.4333953941292472,
|
|
7802
7809
|
0.4333953941292471907992659431657841622,
|
|
7803
|
-
-0.
|
|
7810
|
+
-0.6794095682990244,
|
|
7804
7811
|
0.6794095682990244062343273651148735757692,
|
|
7805
|
-
-0.
|
|
7812
|
+
-0.8650633666889845,
|
|
7806
7813
|
0.8650633666889845107320966884234930485275,
|
|
7807
|
-
-0.
|
|
7814
|
+
-0.9739065285171717,
|
|
7808
7815
|
0.9739065285171717200779640120844520534282,
|
|
7809
7816
|
],
|
|
7810
7817
|
[
|
|
7811
|
-
0, -0.
|
|
7818
|
+
0, -0.26954315595234496,
|
|
7812
7819
|
0.2695431559523449723315319854008615246796,
|
|
7813
|
-
-0.
|
|
7820
|
+
-0.5190961292068118,
|
|
7814
7821
|
0.5190961292068118159257256694586095544802,
|
|
7815
|
-
-0.
|
|
7822
|
+
-0.7301520055740494,
|
|
7816
7823
|
0.7301520055740493240934162520311534580496,
|
|
7817
|
-
-0.
|
|
7824
|
+
-0.8870625997680953,
|
|
7818
7825
|
0.8870625997680952990751577693039272666316,
|
|
7819
|
-
-0.
|
|
7826
|
+
-0.978228658146057,
|
|
7820
7827
|
0.9782286581460569928039380011228573907714,
|
|
7821
7828
|
],
|
|
7822
7829
|
[
|
|
7823
|
-
-0.
|
|
7830
|
+
-0.1252334085114689,
|
|
7824
7831
|
0.1252334085114689154724413694638531299833,
|
|
7825
|
-
-0.
|
|
7832
|
+
-0.3678314989981802,
|
|
7826
7833
|
0.3678314989981801937526915366437175612563,
|
|
7827
|
-
-0.
|
|
7834
|
+
-0.5873179542866175,
|
|
7828
7835
|
0.587317954286617447296702418940534280369,
|
|
7829
|
-
-0.
|
|
7836
|
+
-0.7699026741943047,
|
|
7830
7837
|
0.7699026741943046870368938332128180759849,
|
|
7831
|
-
-0.
|
|
7838
|
+
-0.9041172563704749,
|
|
7832
7839
|
0.9041172563704748566784658661190961925375,
|
|
7833
|
-
-0.
|
|
7840
|
+
-0.9815606342467192,
|
|
7834
7841
|
0.9815606342467192506905490901492808229601,
|
|
7835
7842
|
],
|
|
7836
7843
|
[
|
|
7837
|
-
0, -0.
|
|
7844
|
+
0, -0.2304583159551348,
|
|
7838
7845
|
0.2304583159551347940655281210979888352115,
|
|
7839
|
-
-0.
|
|
7846
|
+
-0.44849275103644687,
|
|
7840
7847
|
0.4484927510364468528779128521276398678019,
|
|
7841
|
-
-0.
|
|
7848
|
+
-0.6423493394403402,
|
|
7842
7849
|
0.6423493394403402206439846069955156500716,
|
|
7843
|
-
-0.
|
|
7850
|
+
-0.8015780907333099,
|
|
7844
7851
|
0.8015780907333099127942064895828598903056,
|
|
7845
|
-
-0.
|
|
7852
|
+
-0.9175983992229779,
|
|
7846
7853
|
0.9175983992229779652065478365007195123904,
|
|
7847
|
-
-0.
|
|
7854
|
+
-0.9841830547185881,
|
|
7848
7855
|
0.9841830547185881494728294488071096110649,
|
|
7849
7856
|
],
|
|
7850
7857
|
[
|
|
7851
|
-
-0.
|
|
7858
|
+
-0.10805494870734367,
|
|
7852
7859
|
0.1080549487073436620662446502198347476119,
|
|
7853
|
-
-0.
|
|
7860
|
+
-0.31911236892788974,
|
|
7854
7861
|
0.3191123689278897604356718241684754668342,
|
|
7855
|
-
-0.
|
|
7862
|
+
-0.5152486363581541,
|
|
7856
7863
|
0.5152486363581540919652907185511886623088,
|
|
7857
|
-
-0.
|
|
7864
|
+
-0.6872929048116855,
|
|
7858
7865
|
0.6872929048116854701480198030193341375384,
|
|
7859
|
-
-0.
|
|
7866
|
+
-0.827201315069765,
|
|
7860
7867
|
0.8272013150697649931897947426503949610397,
|
|
7861
|
-
-0.
|
|
7868
|
+
-0.9284348836635735,
|
|
7862
7869
|
0.928434883663573517336391139377874264477,
|
|
7863
|
-
-0.
|
|
7870
|
+
-0.9862838086968123,
|
|
7864
7871
|
0.986283808696812338841597266704052801676,
|
|
7865
7872
|
],
|
|
7866
7873
|
[
|
|
7867
|
-
0, -0.
|
|
7874
|
+
0, -0.20119409399743451,
|
|
7868
7875
|
0.2011940939974345223006283033945962078128,
|
|
7869
|
-
-0.
|
|
7876
|
+
-0.3941513470775634,
|
|
7870
7877
|
0.3941513470775633698972073709810454683627,
|
|
7871
|
-
-0.
|
|
7878
|
+
-0.5709721726085388,
|
|
7872
7879
|
0.5709721726085388475372267372539106412383,
|
|
7873
|
-
-0.
|
|
7880
|
+
-0.7244177313601701,
|
|
7874
7881
|
0.7244177313601700474161860546139380096308,
|
|
7875
|
-
-0.
|
|
7882
|
+
-0.8482065834104272,
|
|
7876
7883
|
0.8482065834104272162006483207742168513662,
|
|
7877
|
-
-0.
|
|
7884
|
+
-0.937273392400706,
|
|
7878
7885
|
0.9372733924007059043077589477102094712439,
|
|
7879
|
-
-0.
|
|
7886
|
+
-0.9879925180204854,
|
|
7880
7887
|
0.9879925180204854284895657185866125811469,
|
|
7881
7888
|
],
|
|
7882
7889
|
[
|
|
7883
|
-
-0.
|
|
7890
|
+
-0.09501250983763744,
|
|
7884
7891
|
0.0950125098376374401853193354249580631303,
|
|
7885
|
-
-0.
|
|
7892
|
+
-0.2816035507792589,
|
|
7886
7893
|
0.281603550779258913230460501460496106486,
|
|
7887
|
-
-0.
|
|
7894
|
+
-0.45801677765722737,
|
|
7888
7895
|
0.45801677765722738634241944298357757354,
|
|
7889
|
-
-0.
|
|
7896
|
+
-0.6178762444026438,
|
|
7890
7897
|
0.6178762444026437484466717640487910189918,
|
|
7891
|
-
-0.
|
|
7898
|
+
-0.755404408355003,
|
|
7892
7899
|
0.7554044083550030338951011948474422683538,
|
|
7893
|
-
-0.
|
|
7900
|
+
-0.8656312023878318,
|
|
7894
7901
|
0.8656312023878317438804678977123931323873,
|
|
7895
|
-
-0.
|
|
7902
|
+
-0.9445750230732326,
|
|
7896
7903
|
0.9445750230732325760779884155346083450911,
|
|
7897
|
-
-0.
|
|
7904
|
+
-0.9894009349916499,
|
|
7898
7905
|
0.9894009349916499325961541734503326274262,
|
|
7899
7906
|
],
|
|
7900
7907
|
[
|
|
7901
|
-
0, -0.
|
|
7908
|
+
0, -0.17848418149584785,
|
|
7902
7909
|
0.1784841814958478558506774936540655574754,
|
|
7903
|
-
-0.
|
|
7910
|
+
-0.3512317634538763,
|
|
7904
7911
|
0.3512317634538763152971855170953460050405,
|
|
7905
|
-
-0.
|
|
7912
|
+
-0.5126905370864769,
|
|
7906
7913
|
0.5126905370864769678862465686295518745829,
|
|
7907
|
-
-0.
|
|
7914
|
+
-0.6576711592166907,
|
|
7908
7915
|
0.6576711592166907658503022166430023351478,
|
|
7909
|
-
-0.
|
|
7916
|
+
-0.7815140038968014,
|
|
7910
7917
|
0.7815140038968014069252300555204760502239,
|
|
7911
|
-
-0.
|
|
7918
|
+
-0.8802391537269859,
|
|
7912
7919
|
0.8802391537269859021229556944881556926234,
|
|
7913
|
-
-0.
|
|
7920
|
+
-0.9506755217687678,
|
|
7914
7921
|
0.9506755217687677612227169578958030214433,
|
|
7915
|
-
-0.
|
|
7922
|
+
-0.9905754753144174,
|
|
7916
7923
|
0.9905754753144173356754340199406652765077,
|
|
7917
7924
|
],
|
|
7918
7925
|
[
|
|
7919
|
-
-0.
|
|
7926
|
+
-0.0847750130417353,
|
|
7920
7927
|
0.0847750130417353012422618529357838117333,
|
|
7921
|
-
-0.
|
|
7928
|
+
-0.2518862256915055,
|
|
7922
7929
|
0.2518862256915055095889728548779112301628,
|
|
7923
|
-
-0.
|
|
7930
|
+
-0.41175116146284263,
|
|
7924
7931
|
0.4117511614628426460359317938330516370789,
|
|
7925
|
-
-0.
|
|
7932
|
+
-0.5597708310739475,
|
|
7926
7933
|
0.5597708310739475346078715485253291369276,
|
|
7927
|
-
-0.
|
|
7934
|
+
-0.6916870430603532,
|
|
7928
7935
|
0.6916870430603532078748910812888483894522,
|
|
7929
|
-
-0.
|
|
7936
|
+
-0.8037049589725231,
|
|
7930
7937
|
0.8037049589725231156824174550145907971032,
|
|
7931
|
-
-0.
|
|
7938
|
+
-0.8926024664975557,
|
|
7932
7939
|
0.8926024664975557392060605911271455154078,
|
|
7933
|
-
-0.
|
|
7940
|
+
-0.9558239495713977,
|
|
7934
7941
|
0.9558239495713977551811958929297763099728,
|
|
7935
|
-
-0.
|
|
7942
|
+
-0.9915651684209309,
|
|
7936
7943
|
0.9915651684209309467300160047061507702525,
|
|
7937
7944
|
],
|
|
7938
7945
|
[
|
|
7939
|
-
0, -0.
|
|
7946
|
+
0, -0.16035864564022537,
|
|
7940
7947
|
0.1603586456402253758680961157407435495048,
|
|
7941
|
-
-0.
|
|
7948
|
+
-0.31656409996362983,
|
|
7942
7949
|
0.3165640999636298319901173288498449178922,
|
|
7943
|
-
-0.
|
|
7950
|
+
-0.46457074137596094,
|
|
7944
7951
|
0.4645707413759609457172671481041023679762,
|
|
7945
|
-
-0.
|
|
7952
|
+
-0.600545304661681,
|
|
7946
7953
|
0.6005453046616810234696381649462392798683,
|
|
7947
|
-
-0.
|
|
7954
|
+
-0.7209661773352294,
|
|
7948
7955
|
0.7209661773352293786170958608237816296571,
|
|
7949
|
-
-0.
|
|
7956
|
+
-0.8227146565371428,
|
|
7950
7957
|
0.8227146565371428249789224867127139017745,
|
|
7951
|
-
-0.
|
|
7958
|
+
-0.9031559036148179,
|
|
7952
7959
|
0.9031559036148179016426609285323124878093,
|
|
7953
|
-
-0.
|
|
7960
|
+
-0.96020815213483,
|
|
7954
7961
|
0.960208152134830030852778840687651526615,
|
|
7955
|
-
-0.
|
|
7962
|
+
-0.9924068438435844,
|
|
7956
7963
|
0.9924068438435844031890176702532604935893,
|
|
7957
7964
|
],
|
|
7958
7965
|
[
|
|
7959
|
-
-0.
|
|
7966
|
+
-0.07652652113349734,
|
|
7960
7967
|
0.0765265211334973337546404093988382110047,
|
|
7961
|
-
-0.
|
|
7968
|
+
-0.22778585114164507,
|
|
7962
7969
|
0.227785851141645078080496195368574624743,
|
|
7963
|
-
-0.
|
|
7970
|
+
-0.37370608871541955,
|
|
7964
7971
|
0.3737060887154195606725481770249272373957,
|
|
7965
|
-
-0.
|
|
7972
|
+
-0.5108670019508271,
|
|
7966
7973
|
0.5108670019508270980043640509552509984254,
|
|
7967
|
-
-0.
|
|
7974
|
+
-0.636053680726515,
|
|
7968
7975
|
0.6360536807265150254528366962262859367433,
|
|
7969
|
-
-0.
|
|
7976
|
+
-0.7463319064601508,
|
|
7970
7977
|
0.7463319064601507926143050703556415903107,
|
|
7971
|
-
-0.
|
|
7978
|
+
-0.8391169718222188,
|
|
7972
7979
|
0.8391169718222188233945290617015206853296,
|
|
7973
|
-
-0.
|
|
7980
|
+
-0.912234428251326,
|
|
7974
7981
|
0.9122344282513259058677524412032981130491,
|
|
7975
|
-
-0.
|
|
7982
|
+
-0.9639719272779138,
|
|
7976
7983
|
0.963971927277913791267666131197277221912,
|
|
7977
|
-
-0.
|
|
7984
|
+
-0.9931285991850949,
|
|
7978
7985
|
0.9931285991850949247861223884713202782226,
|
|
7979
7986
|
],
|
|
7980
7987
|
[
|
|
7981
|
-
0, -0.
|
|
7988
|
+
0, -0.1455618541608951,
|
|
7982
7989
|
0.1455618541608950909370309823386863301163,
|
|
7983
|
-
-0.
|
|
7990
|
+
-0.2880213168024011,
|
|
7984
7991
|
0.288021316802401096600792516064600319909,
|
|
7985
|
-
-0.
|
|
7992
|
+
-0.4243421202074388,
|
|
7986
7993
|
0.4243421202074387835736688885437880520964,
|
|
7987
|
-
-0.
|
|
7994
|
+
-0.5516188358872198,
|
|
7988
7995
|
0.551618835887219807059018796724313286622,
|
|
7989
|
-
-0.
|
|
7996
|
+
-0.6671388041974123,
|
|
7990
7997
|
0.667138804197412319305966669990339162597,
|
|
7991
|
-
-0.
|
|
7998
|
+
-0.7684399634756779,
|
|
7992
7999
|
0.7684399634756779086158778513062280348209,
|
|
7993
|
-
-0.
|
|
8000
|
+
-0.8533633645833173,
|
|
7994
8001
|
0.8533633645833172836472506385875676702761,
|
|
7995
|
-
-0.
|
|
8002
|
+
-0.9200993341504008,
|
|
7996
8003
|
0.9200993341504008287901871337149688941591,
|
|
7997
|
-
-0.
|
|
8004
|
+
-0.9672268385663063,
|
|
7998
8005
|
0.9672268385663062943166222149076951614246,
|
|
7999
|
-
-0.
|
|
8006
|
+
-0.9937521706203895,
|
|
8000
8007
|
0.9937521706203895002602420359379409291933,
|
|
8001
8008
|
],
|
|
8002
8009
|
[
|
|
8003
|
-
-0.
|
|
8010
|
+
-0.06973927331972223,
|
|
8004
8011
|
0.0697392733197222212138417961186280818222,
|
|
8005
|
-
-0.
|
|
8012
|
+
-0.20786042668822127,
|
|
8006
8013
|
0.2078604266882212854788465339195457342156,
|
|
8007
|
-
-0.
|
|
8014
|
+
-0.34193582089208424,
|
|
8008
8015
|
0.3419358208920842251581474204273796195591,
|
|
8009
|
-
-0.
|
|
8016
|
+
-0.469355837986757,
|
|
8010
8017
|
0.4693558379867570264063307109664063460953,
|
|
8011
|
-
-0.
|
|
8018
|
+
-0.5876404035069116,
|
|
8012
8019
|
0.5876404035069115929588769276386473488776,
|
|
8013
|
-
-0.
|
|
8020
|
+
-0.6944872631866827,
|
|
8014
8021
|
0.6944872631866827800506898357622567712673,
|
|
8015
|
-
-0.
|
|
8022
|
+
-0.7878168059792081,
|
|
8016
8023
|
0.7878168059792081620042779554083515213881,
|
|
8017
|
-
-0.
|
|
8024
|
+
-0.8658125777203002,
|
|
8018
8025
|
0.8658125777203001365364256370193787290847,
|
|
8019
|
-
-0.
|
|
8026
|
+
-0.926956772187174,
|
|
8020
8027
|
0.9269567721871740005206929392590531966353,
|
|
8021
|
-
-0.
|
|
8028
|
+
-0.9700604978354287,
|
|
8022
8029
|
0.9700604978354287271239509867652687108059,
|
|
8023
|
-
-0.
|
|
8030
|
+
-0.9942945854823992,
|
|
8024
8031
|
0.994294585482399292073031421161298980393,
|
|
8025
8032
|
],
|
|
8026
8033
|
[
|
|
8027
|
-
0, -0.
|
|
8034
|
+
0, -0.1332568242984661,
|
|
8028
8035
|
0.1332568242984661109317426822417661370104,
|
|
8029
|
-
-0.
|
|
8036
|
+
-0.26413568097034495,
|
|
8030
8037
|
0.264135680970344930533869538283309602979,
|
|
8031
|
-
-0.
|
|
8038
|
+
-0.3903010380302908,
|
|
8032
8039
|
0.390301038030290831421488872880605458578,
|
|
8033
|
-
-0.
|
|
8040
|
+
-0.5095014778460075,
|
|
8034
8041
|
0.5095014778460075496897930478668464305448,
|
|
8035
|
-
-0.
|
|
8042
|
+
-0.6196098757636461,
|
|
8036
8043
|
0.6196098757636461563850973116495956533871,
|
|
8037
|
-
-0.
|
|
8044
|
+
-0.7186613631319502,
|
|
8038
8045
|
0.7186613631319501944616244837486188483299,
|
|
8039
|
-
-0.
|
|
8046
|
+
-0.8048884016188399,
|
|
8040
8047
|
0.8048884016188398921511184069967785579414,
|
|
8041
|
-
-0.
|
|
8048
|
+
-0.8767523582704416,
|
|
8042
8049
|
0.8767523582704416673781568859341456716389,
|
|
8043
|
-
-0.
|
|
8050
|
+
-0.9329710868260161,
|
|
8044
8051
|
0.9329710868260161023491969890384229782357,
|
|
8045
|
-
-0.
|
|
8052
|
+
-0.9725424712181152,
|
|
8046
8053
|
0.9725424712181152319560240768207773751816,
|
|
8047
|
-
-0.
|
|
8054
|
+
-0.9947693349975522,
|
|
8048
8055
|
0.9947693349975521235239257154455743605736,
|
|
8049
8056
|
],
|
|
8050
8057
|
[
|
|
8051
|
-
-0.
|
|
8058
|
+
-0.06405689286260563,
|
|
8052
8059
|
0.0640568928626056260850430826247450385909,
|
|
8053
|
-
-0.
|
|
8060
|
+
-0.1911188674736163,
|
|
8054
8061
|
0.1911188674736163091586398207570696318404,
|
|
8055
|
-
-0.
|
|
8062
|
+
-0.3150426796961634,
|
|
8056
8063
|
0.3150426796961633743867932913198102407864,
|
|
8057
|
-
-0.
|
|
8064
|
+
-0.4337935076260451,
|
|
8058
8065
|
0.4337935076260451384870842319133497124524,
|
|
8059
|
-
-0.
|
|
8066
|
+
-0.5454214713888396,
|
|
8060
8067
|
0.5454214713888395356583756172183723700107,
|
|
8061
|
-
-0.
|
|
8068
|
+
-0.6480936519369755,
|
|
8062
8069
|
0.6480936519369755692524957869107476266696,
|
|
8063
|
-
-0.
|
|
8070
|
+
-0.7401241915785544,
|
|
8064
8071
|
0.7401241915785543642438281030999784255232,
|
|
8065
|
-
-0.
|
|
8072
|
+
-0.820001985973903,
|
|
8066
8073
|
0.8200019859739029219539498726697452080761,
|
|
8067
|
-
-0.
|
|
8074
|
+
-0.8864155270044011,
|
|
8068
8075
|
0.8864155270044010342131543419821967550873,
|
|
8069
|
-
-0.
|
|
8076
|
+
-0.9382745520027328,
|
|
8070
8077
|
0.9382745520027327585236490017087214496548,
|
|
8071
|
-
-0.
|
|
8078
|
+
-0.9747285559713095,
|
|
8072
8079
|
0.9747285559713094981983919930081690617411,
|
|
8073
|
-
-0.
|
|
8080
|
+
-0.9951872199970213,
|
|
8074
8081
|
0.9951872199970213601799974097007368118745,
|
|
8075
8082
|
],
|
|
8076
8083
|
];
|
|
@@ -8533,7 +8540,7 @@
|
|
|
8533
8540
|
if (hasRequiredPath) return Path;
|
|
8534
8541
|
hasRequiredPath = 1;
|
|
8535
8542
|
Object.defineProperty(Path, "__esModule", { value: true });
|
|
8536
|
-
Path.Path =
|
|
8543
|
+
Path.Path = undefined;
|
|
8537
8544
|
const Factory_1 = requireFactory();
|
|
8538
8545
|
const Shape_1 = requireShape();
|
|
8539
8546
|
const Global_1 = requireGlobal();
|
|
@@ -8716,8 +8723,8 @@
|
|
|
8716
8723
|
return null;
|
|
8717
8724
|
}
|
|
8718
8725
|
static getPointOnLine(dist, P1x, P1y, P2x, P2y, fromX, fromY) {
|
|
8719
|
-
fromX = fromX !== null && fromX !==
|
|
8720
|
-
fromY = fromY !== null && fromY !==
|
|
8726
|
+
fromX = fromX !== null && fromX !== undefined ? fromX : P1x;
|
|
8727
|
+
fromY = fromY !== null && fromY !== undefined ? fromY : P1y;
|
|
8721
8728
|
const len = this.getLineLength(P1x, P1y, P2x, P2y);
|
|
8722
8729
|
if (len < 1e-10) {
|
|
8723
8730
|
return { x: P1x, y: P1y };
|
|
@@ -9146,7 +9153,7 @@
|
|
|
9146
9153
|
if (hasRequiredArrow) return Arrow;
|
|
9147
9154
|
hasRequiredArrow = 1;
|
|
9148
9155
|
Object.defineProperty(Arrow, "__esModule", { value: true });
|
|
9149
|
-
Arrow.Arrow =
|
|
9156
|
+
Arrow.Arrow = undefined;
|
|
9150
9157
|
const Factory_1 = requireFactory();
|
|
9151
9158
|
const Line_1 = requireLine();
|
|
9152
9159
|
const Validators_1 = requireValidators();
|
|
@@ -9233,9 +9240,9 @@
|
|
|
9233
9240
|
const lineRect = super.getSelfRect();
|
|
9234
9241
|
const offset = this.pointerWidth() / 2;
|
|
9235
9242
|
return {
|
|
9236
|
-
x: lineRect.x
|
|
9243
|
+
x: lineRect.x,
|
|
9237
9244
|
y: lineRect.y - offset,
|
|
9238
|
-
width: lineRect.width
|
|
9245
|
+
width: lineRect.width,
|
|
9239
9246
|
height: lineRect.height + offset * 2,
|
|
9240
9247
|
};
|
|
9241
9248
|
}
|
|
@@ -9258,7 +9265,7 @@
|
|
|
9258
9265
|
if (hasRequiredCircle) return Circle;
|
|
9259
9266
|
hasRequiredCircle = 1;
|
|
9260
9267
|
Object.defineProperty(Circle, "__esModule", { value: true });
|
|
9261
|
-
Circle.Circle =
|
|
9268
|
+
Circle.Circle = undefined;
|
|
9262
9269
|
const Factory_1 = requireFactory();
|
|
9263
9270
|
const Shape_1 = requireShape();
|
|
9264
9271
|
const Validators_1 = requireValidators();
|
|
@@ -9304,7 +9311,7 @@
|
|
|
9304
9311
|
if (hasRequiredEllipse) return Ellipse;
|
|
9305
9312
|
hasRequiredEllipse = 1;
|
|
9306
9313
|
Object.defineProperty(Ellipse, "__esModule", { value: true });
|
|
9307
|
-
Ellipse.Ellipse =
|
|
9314
|
+
Ellipse.Ellipse = undefined;
|
|
9308
9315
|
const Factory_1 = requireFactory();
|
|
9309
9316
|
const Shape_1 = requireShape();
|
|
9310
9317
|
const Validators_1 = requireValidators();
|
|
@@ -9354,7 +9361,7 @@
|
|
|
9354
9361
|
if (hasRequiredImage) return Image$1;
|
|
9355
9362
|
hasRequiredImage = 1;
|
|
9356
9363
|
Object.defineProperty(Image$1, "__esModule", { value: true });
|
|
9357
|
-
Image$1.Image =
|
|
9364
|
+
Image$1.Image = undefined;
|
|
9358
9365
|
const Util_1 = requireUtil();
|
|
9359
9366
|
const Factory_1 = requireFactory();
|
|
9360
9367
|
const Shape_1 = requireShape();
|
|
@@ -9445,11 +9452,11 @@
|
|
|
9445
9452
|
}
|
|
9446
9453
|
getWidth() {
|
|
9447
9454
|
var _a, _b;
|
|
9448
|
-
return (_a = this.attrs.width) !== null && _a !==
|
|
9455
|
+
return (_a = this.attrs.width) !== null && _a !== undefined ? _a : (_b = this.image()) === null || _b === undefined ? undefined : _b.width;
|
|
9449
9456
|
}
|
|
9450
9457
|
getHeight() {
|
|
9451
9458
|
var _a, _b;
|
|
9452
|
-
return (_a = this.attrs.height) !== null && _a !==
|
|
9459
|
+
return (_a = this.attrs.height) !== null && _a !== undefined ? _a : (_b = this.image()) === null || _b === undefined ? undefined : _b.height;
|
|
9453
9460
|
}
|
|
9454
9461
|
static fromURL(url, callback, onError = null) {
|
|
9455
9462
|
const img = Util_1.Util.createImageElement();
|
|
@@ -9485,7 +9492,7 @@
|
|
|
9485
9492
|
if (hasRequiredLabel) return Label;
|
|
9486
9493
|
hasRequiredLabel = 1;
|
|
9487
9494
|
Object.defineProperty(Label, "__esModule", { value: true });
|
|
9488
|
-
Label.Tag = Label.Label =
|
|
9495
|
+
Label.Tag = Label.Label = undefined;
|
|
9489
9496
|
const Factory_1 = requireFactory();
|
|
9490
9497
|
const Shape_1 = requireShape();
|
|
9491
9498
|
const Group_1 = requireGroup();
|
|
@@ -9672,7 +9679,7 @@
|
|
|
9672
9679
|
if (hasRequiredRect) return Rect;
|
|
9673
9680
|
hasRequiredRect = 1;
|
|
9674
9681
|
Object.defineProperty(Rect, "__esModule", { value: true });
|
|
9675
|
-
Rect.Rect =
|
|
9682
|
+
Rect.Rect = undefined;
|
|
9676
9683
|
const Factory_1 = requireFactory();
|
|
9677
9684
|
const Shape_1 = requireShape();
|
|
9678
9685
|
const Global_1 = requireGlobal();
|
|
@@ -9707,7 +9714,7 @@
|
|
|
9707
9714
|
if (hasRequiredRegularPolygon) return RegularPolygon;
|
|
9708
9715
|
hasRequiredRegularPolygon = 1;
|
|
9709
9716
|
Object.defineProperty(RegularPolygon, "__esModule", { value: true });
|
|
9710
|
-
RegularPolygon.RegularPolygon =
|
|
9717
|
+
RegularPolygon.RegularPolygon = undefined;
|
|
9711
9718
|
const Factory_1 = requireFactory();
|
|
9712
9719
|
const Shape_1 = requireShape();
|
|
9713
9720
|
const Validators_1 = requireValidators();
|
|
@@ -9785,7 +9792,7 @@
|
|
|
9785
9792
|
if (hasRequiredRing) return Ring;
|
|
9786
9793
|
hasRequiredRing = 1;
|
|
9787
9794
|
Object.defineProperty(Ring, "__esModule", { value: true });
|
|
9788
|
-
Ring.Ring =
|
|
9795
|
+
Ring.Ring = undefined;
|
|
9789
9796
|
const Factory_1 = requireFactory();
|
|
9790
9797
|
const Shape_1 = requireShape();
|
|
9791
9798
|
const Validators_1 = requireValidators();
|
|
@@ -9831,7 +9838,7 @@
|
|
|
9831
9838
|
if (hasRequiredSprite) return Sprite;
|
|
9832
9839
|
hasRequiredSprite = 1;
|
|
9833
9840
|
Object.defineProperty(Sprite, "__esModule", { value: true });
|
|
9834
|
-
Sprite.Sprite =
|
|
9841
|
+
Sprite.Sprite = undefined;
|
|
9835
9842
|
const Factory_1 = requireFactory();
|
|
9836
9843
|
const Shape_1 = requireShape();
|
|
9837
9844
|
const Animation_1 = requireAnimation();
|
|
@@ -9952,7 +9959,7 @@
|
|
|
9952
9959
|
if (hasRequiredStar) return Star;
|
|
9953
9960
|
hasRequiredStar = 1;
|
|
9954
9961
|
Object.defineProperty(Star, "__esModule", { value: true });
|
|
9955
|
-
Star.Star =
|
|
9962
|
+
Star.Star = undefined;
|
|
9956
9963
|
const Factory_1 = requireFactory();
|
|
9957
9964
|
const Shape_1 = requireShape();
|
|
9958
9965
|
const Validators_1 = requireValidators();
|
|
@@ -10003,7 +10010,7 @@
|
|
|
10003
10010
|
if (hasRequiredText) return Text;
|
|
10004
10011
|
hasRequiredText = 1;
|
|
10005
10012
|
Object.defineProperty(Text, "__esModule", { value: true });
|
|
10006
|
-
Text.Text =
|
|
10013
|
+
Text.Text = undefined;
|
|
10007
10014
|
Text.stringToArray = stringToArray;
|
|
10008
10015
|
const Util_1 = requireUtil();
|
|
10009
10016
|
const Factory_1 = requireFactory();
|
|
@@ -10013,8 +10020,15 @@
|
|
|
10013
10020
|
const Global_2 = requireGlobal();
|
|
10014
10021
|
function stringToArray(string) {
|
|
10015
10022
|
return [...string].reduce((acc, char, index, array) => {
|
|
10016
|
-
if (/\p{
|
|
10017
|
-
|
|
10023
|
+
if (/\p{Emoji}/u.test(char)) {
|
|
10024
|
+
const nextChar = array[index + 1];
|
|
10025
|
+
if (nextChar && /\p{Emoji_Modifier}|\u200D/u.test(nextChar)) {
|
|
10026
|
+
acc.push(char + nextChar);
|
|
10027
|
+
array[index + 1] = '';
|
|
10028
|
+
}
|
|
10029
|
+
else {
|
|
10030
|
+
acc.push(char);
|
|
10031
|
+
}
|
|
10018
10032
|
}
|
|
10019
10033
|
else if (/\p{Regional_Indicator}{2}/u.test(char + (array[index + 1] || ''))) {
|
|
10020
10034
|
acc.push(char + array[index + 1]);
|
|
@@ -10022,7 +10036,7 @@
|
|
|
10022
10036
|
else if (index > 0 && /\p{Mn}|\p{Me}|\p{Mc}/u.test(char)) {
|
|
10023
10037
|
acc[acc.length - 1] += char;
|
|
10024
10038
|
}
|
|
10025
|
-
else {
|
|
10039
|
+
else if (char) {
|
|
10026
10040
|
acc.push(char);
|
|
10027
10041
|
}
|
|
10028
10042
|
return acc;
|
|
@@ -10127,7 +10141,7 @@
|
|
|
10127
10141
|
for (n = 0; n < textArrLen; n++) {
|
|
10128
10142
|
var lineTranslateX = 0;
|
|
10129
10143
|
var lineTranslateY = 0;
|
|
10130
|
-
var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber,
|
|
10144
|
+
var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber, lineWidth;
|
|
10131
10145
|
context.save();
|
|
10132
10146
|
if (align === RIGHT) {
|
|
10133
10147
|
lineTranslateX += totalWidth - width - padding * 2;
|
|
@@ -10145,7 +10159,6 @@
|
|
|
10145
10159
|
const y = translateY + lineTranslateY + yOffset;
|
|
10146
10160
|
context.moveTo(x, y);
|
|
10147
10161
|
spacesNumber = text.split(' ').length - 1;
|
|
10148
|
-
oneWord = spacesNumber === 0;
|
|
10149
10162
|
lineWidth =
|
|
10150
10163
|
align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;
|
|
10151
10164
|
context.lineTo(x + Math.round(lineWidth), y);
|
|
@@ -10161,11 +10174,8 @@
|
|
|
10161
10174
|
const yOffset = Global_1.Konva._fixTextRendering ? -Math.round(fontSize / 4) : 0;
|
|
10162
10175
|
context.moveTo(lineTranslateX, translateY + lineTranslateY + yOffset);
|
|
10163
10176
|
spacesNumber = text.split(' ').length - 1;
|
|
10164
|
-
oneWord = spacesNumber === 0;
|
|
10165
10177
|
lineWidth =
|
|
10166
|
-
align === JUSTIFY && lastLine
|
|
10167
|
-
? totalWidth - padding * 2
|
|
10168
|
-
: width;
|
|
10178
|
+
align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;
|
|
10169
10179
|
context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + yOffset);
|
|
10170
10180
|
context.lineWidth = fontSize / 15;
|
|
10171
10181
|
const gradient = this._getLinearGradient();
|
|
@@ -10246,17 +10256,17 @@
|
|
|
10246
10256
|
_context.restore();
|
|
10247
10257
|
const scaleFactor = fontSize / 100;
|
|
10248
10258
|
return {
|
|
10249
|
-
actualBoundingBoxAscent: (_a = metrics.actualBoundingBoxAscent) !== null && _a !==
|
|
10250
|
-
actualBoundingBoxDescent: (_b = metrics.actualBoundingBoxDescent) !== null && _b !==
|
|
10251
|
-
actualBoundingBoxLeft: (_c = metrics.actualBoundingBoxLeft) !== null && _c !==
|
|
10252
|
-
actualBoundingBoxRight: (_d = metrics.actualBoundingBoxRight) !== null && _d !==
|
|
10253
|
-
alphabeticBaseline: (_e = metrics.alphabeticBaseline) !== null && _e !==
|
|
10254
|
-
emHeightAscent: (_f = metrics.emHeightAscent) !== null && _f !==
|
|
10255
|
-
emHeightDescent: (_g = metrics.emHeightDescent) !== null && _g !==
|
|
10256
|
-
fontBoundingBoxAscent: (_h = metrics.fontBoundingBoxAscent) !== null && _h !==
|
|
10257
|
-
fontBoundingBoxDescent: (_j = metrics.fontBoundingBoxDescent) !== null && _j !==
|
|
10258
|
-
hangingBaseline: (_k = metrics.hangingBaseline) !== null && _k !==
|
|
10259
|
-
ideographicBaseline: (_l = metrics.ideographicBaseline) !== null && _l !==
|
|
10259
|
+
actualBoundingBoxAscent: (_a = metrics.actualBoundingBoxAscent) !== null && _a !== undefined ? _a : 71.58203125 * scaleFactor,
|
|
10260
|
+
actualBoundingBoxDescent: (_b = metrics.actualBoundingBoxDescent) !== null && _b !== undefined ? _b : 0,
|
|
10261
|
+
actualBoundingBoxLeft: (_c = metrics.actualBoundingBoxLeft) !== null && _c !== undefined ? _c : -7.421875 * scaleFactor,
|
|
10262
|
+
actualBoundingBoxRight: (_d = metrics.actualBoundingBoxRight) !== null && _d !== undefined ? _d : 75.732421875 * scaleFactor,
|
|
10263
|
+
alphabeticBaseline: (_e = metrics.alphabeticBaseline) !== null && _e !== undefined ? _e : 0,
|
|
10264
|
+
emHeightAscent: (_f = metrics.emHeightAscent) !== null && _f !== undefined ? _f : 100 * scaleFactor,
|
|
10265
|
+
emHeightDescent: (_g = metrics.emHeightDescent) !== null && _g !== undefined ? _g : -20 * scaleFactor,
|
|
10266
|
+
fontBoundingBoxAscent: (_h = metrics.fontBoundingBoxAscent) !== null && _h !== undefined ? _h : 91 * scaleFactor,
|
|
10267
|
+
fontBoundingBoxDescent: (_j = metrics.fontBoundingBoxDescent) !== null && _j !== undefined ? _j : 21 * scaleFactor,
|
|
10268
|
+
hangingBaseline: (_k = metrics.hangingBaseline) !== null && _k !== undefined ? _k : 72.80000305175781 * scaleFactor,
|
|
10269
|
+
ideographicBaseline: (_l = metrics.ideographicBaseline) !== null && _l !== undefined ? _l : -21 * scaleFactor,
|
|
10260
10270
|
width: metrics.width,
|
|
10261
10271
|
height: fontSize,
|
|
10262
10272
|
};
|
|
@@ -10284,22 +10294,23 @@
|
|
|
10284
10294
|
_getTextWidth(text) {
|
|
10285
10295
|
const letterSpacing = this.letterSpacing();
|
|
10286
10296
|
const length = text.length;
|
|
10287
|
-
return
|
|
10288
|
-
(length ? letterSpacing * (length - 1) : 0));
|
|
10297
|
+
return getDummyContext().measureText(text).width + letterSpacing * length;
|
|
10289
10298
|
}
|
|
10290
10299
|
_setTextData() {
|
|
10291
10300
|
let lines = this.text().split('\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();
|
|
10292
10301
|
this.textArr = [];
|
|
10293
10302
|
getDummyContext().font = this._getContextFont();
|
|
10294
|
-
const additionalWidth = shouldAddEllipsis
|
|
10303
|
+
const additionalWidth = shouldAddEllipsis
|
|
10304
|
+
? this._getTextWidth(ELLIPSIS)
|
|
10305
|
+
: 0;
|
|
10295
10306
|
for (let i = 0, max = lines.length; i < max; ++i) {
|
|
10296
10307
|
let line = lines[i];
|
|
10297
10308
|
let lineWidth = this._getTextWidth(line);
|
|
10298
10309
|
if (fixedWidth && lineWidth > maxWidth) {
|
|
10299
10310
|
while (line.length > 0) {
|
|
10300
|
-
let low = 0, high = line.length, match = '', matchWidth = 0;
|
|
10311
|
+
let low = 0, high = stringToArray(line).length, match = '', matchWidth = 0;
|
|
10301
10312
|
while (low < high) {
|
|
10302
|
-
const mid = (low + high) >>> 1, substr =
|
|
10313
|
+
const mid = (low + high) >>> 1, lineArray = stringToArray(line), substr = lineArray.slice(0, mid + 1).join(''), substrWidth = this._getTextWidth(substr) + additionalWidth;
|
|
10303
10314
|
if (substrWidth <= maxWidth) {
|
|
10304
10315
|
low = mid + 1;
|
|
10305
10316
|
match = substr;
|
|
@@ -10311,20 +10322,22 @@
|
|
|
10311
10322
|
}
|
|
10312
10323
|
if (match) {
|
|
10313
10324
|
if (wrapAtWord) {
|
|
10314
|
-
|
|
10315
|
-
const
|
|
10325
|
+
const lineArray = stringToArray(line);
|
|
10326
|
+
const matchArray = stringToArray(match);
|
|
10327
|
+
const nextChar = lineArray[matchArray.length];
|
|
10316
10328
|
const nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;
|
|
10329
|
+
let wrapIndex;
|
|
10317
10330
|
if (nextIsSpaceOrDash && matchWidth <= maxWidth) {
|
|
10318
|
-
wrapIndex =
|
|
10331
|
+
wrapIndex = matchArray.length;
|
|
10319
10332
|
}
|
|
10320
10333
|
else {
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10334
|
+
const lastSpaceIndex = matchArray.lastIndexOf(SPACE);
|
|
10335
|
+
const lastDashIndex = matchArray.lastIndexOf(DASH);
|
|
10336
|
+
wrapIndex = Math.max(lastSpaceIndex, lastDashIndex) + 1;
|
|
10324
10337
|
}
|
|
10325
10338
|
if (wrapIndex > 0) {
|
|
10326
10339
|
low = wrapIndex;
|
|
10327
|
-
match =
|
|
10340
|
+
match = lineArray.slice(0, low).join('');
|
|
10328
10341
|
matchWidth = this._getTextWidth(match);
|
|
10329
10342
|
}
|
|
10330
10343
|
}
|
|
@@ -10337,8 +10350,8 @@
|
|
|
10337
10350
|
this._tryToAddEllipsisToLastLine();
|
|
10338
10351
|
break;
|
|
10339
10352
|
}
|
|
10340
|
-
|
|
10341
|
-
line =
|
|
10353
|
+
const lineArray = stringToArray(line);
|
|
10354
|
+
line = lineArray.slice(low).join('').trimLeft();
|
|
10342
10355
|
if (line.length > 0) {
|
|
10343
10356
|
lineWidth = this._getTextWidth(line);
|
|
10344
10357
|
if (lineWidth <= maxWidth) {
|
|
@@ -10445,7 +10458,7 @@
|
|
|
10445
10458
|
if (hasRequiredTextPath) return TextPath;
|
|
10446
10459
|
hasRequiredTextPath = 1;
|
|
10447
10460
|
Object.defineProperty(TextPath, "__esModule", { value: true });
|
|
10448
|
-
TextPath.TextPath =
|
|
10461
|
+
TextPath.TextPath = undefined;
|
|
10449
10462
|
const Util_1 = requireUtil();
|
|
10450
10463
|
const Factory_1 = requireFactory();
|
|
10451
10464
|
const Shape_1 = requireShape();
|
|
@@ -10682,8 +10695,8 @@
|
|
|
10682
10695
|
Factory_1.Factory.addGetterSetter(TextPath$1, 'textBaseline', 'middle');
|
|
10683
10696
|
Factory_1.Factory.addGetterSetter(TextPath$1, 'fontVariant', NORMAL);
|
|
10684
10697
|
Factory_1.Factory.addGetterSetter(TextPath$1, 'text', EMPTY_STRING);
|
|
10685
|
-
Factory_1.Factory.addGetterSetter(TextPath$1, 'textDecoration',
|
|
10686
|
-
Factory_1.Factory.addGetterSetter(TextPath$1, 'kerningFunc',
|
|
10698
|
+
Factory_1.Factory.addGetterSetter(TextPath$1, 'textDecoration', '');
|
|
10699
|
+
Factory_1.Factory.addGetterSetter(TextPath$1, 'kerningFunc', undefined);
|
|
10687
10700
|
return TextPath;
|
|
10688
10701
|
}
|
|
10689
10702
|
|
|
@@ -10695,7 +10708,7 @@
|
|
|
10695
10708
|
if (hasRequiredTransformer) return Transformer;
|
|
10696
10709
|
hasRequiredTransformer = 1;
|
|
10697
10710
|
Object.defineProperty(Transformer, "__esModule", { value: true });
|
|
10698
|
-
Transformer.Transformer =
|
|
10711
|
+
Transformer.Transformer = undefined;
|
|
10699
10712
|
const Util_1 = requireUtil();
|
|
10700
10713
|
const Factory_1 = requireFactory();
|
|
10701
10714
|
const Node_1 = requireNode();
|
|
@@ -10795,7 +10808,6 @@
|
|
|
10795
10808
|
'bottom-center',
|
|
10796
10809
|
'bottom-right',
|
|
10797
10810
|
];
|
|
10798
|
-
const MAX_SAFE_INTEGER = 100000000;
|
|
10799
10811
|
function getCenter(shape) {
|
|
10800
10812
|
return {
|
|
10801
10813
|
x: shape.x +
|
|
@@ -10991,8 +11003,8 @@
|
|
|
10991
11003
|
const node = this.getNode();
|
|
10992
11004
|
if (!node) {
|
|
10993
11005
|
return {
|
|
10994
|
-
x: -
|
|
10995
|
-
y: -
|
|
11006
|
+
x: -1e8,
|
|
11007
|
+
y: -1e8,
|
|
10996
11008
|
width: 0,
|
|
10997
11009
|
height: 0,
|
|
10998
11010
|
rotation: 0,
|
|
@@ -11371,12 +11383,12 @@
|
|
|
11371
11383
|
const node = this.getNode();
|
|
11372
11384
|
activeTransformersCount--;
|
|
11373
11385
|
this._fire('transformend', { evt: e, target: node });
|
|
11374
|
-
(_a = this.getLayer()) === null || _a ===
|
|
11386
|
+
(_a = this.getLayer()) === null || _a === undefined ? undefined : _a.batchDraw();
|
|
11375
11387
|
if (node) {
|
|
11376
11388
|
this._nodes.forEach((target) => {
|
|
11377
11389
|
var _a;
|
|
11378
11390
|
target._fire('transformend', { evt: e, target });
|
|
11379
|
-
(_a = target.getLayer()) === null || _a ===
|
|
11391
|
+
(_a = target.getLayer()) === null || _a === undefined ? undefined : _a.batchDraw();
|
|
11380
11392
|
});
|
|
11381
11393
|
}
|
|
11382
11394
|
this._movingAnchorName = null;
|
|
@@ -11489,7 +11501,7 @@
|
|
|
11489
11501
|
.multiply(localTransform);
|
|
11490
11502
|
const attrs = newLocalTransform.decompose();
|
|
11491
11503
|
node.setAttrs(attrs);
|
|
11492
|
-
(_a = node.getLayer()) === null || _a ===
|
|
11504
|
+
(_a = node.getLayer()) === null || _a === undefined ? undefined : _a.batchDraw();
|
|
11493
11505
|
});
|
|
11494
11506
|
this.rotation(Util_1.Util._getRotation(newAttrs.rotation));
|
|
11495
11507
|
this._nodes.forEach((node) => {
|
|
@@ -11604,7 +11616,7 @@
|
|
|
11604
11616
|
styleFunc(node);
|
|
11605
11617
|
});
|
|
11606
11618
|
}
|
|
11607
|
-
(_a = this.getLayer()) === null || _a ===
|
|
11619
|
+
(_a = this.getLayer()) === null || _a === undefined ? undefined : _a.batchDraw();
|
|
11608
11620
|
}
|
|
11609
11621
|
isTransforming() {
|
|
11610
11622
|
return this._transforming;
|
|
@@ -11688,8 +11700,8 @@
|
|
|
11688
11700
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'centeredScaling', false);
|
|
11689
11701
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'ignoreStroke', false);
|
|
11690
11702
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'padding', 0, (0, Validators_1.getNumberValidator)());
|
|
11691
|
-
Factory_1.Factory.addGetterSetter(Transformer$1, 'node');
|
|
11692
11703
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'nodes');
|
|
11704
|
+
Factory_1.Factory.addGetterSetter(Transformer$1, 'node');
|
|
11693
11705
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'boundBoxFunc');
|
|
11694
11706
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'anchorDragBoundFunc');
|
|
11695
11707
|
Factory_1.Factory.addGetterSetter(Transformer$1, 'anchorStyleFunc');
|
|
@@ -11711,7 +11723,7 @@
|
|
|
11711
11723
|
if (hasRequiredWedge) return Wedge;
|
|
11712
11724
|
hasRequiredWedge = 1;
|
|
11713
11725
|
Object.defineProperty(Wedge, "__esModule", { value: true });
|
|
11714
|
-
Wedge.Wedge =
|
|
11726
|
+
Wedge.Wedge = undefined;
|
|
11715
11727
|
const Factory_1 = requireFactory();
|
|
11716
11728
|
const Shape_1 = requireShape();
|
|
11717
11729
|
const Global_1 = requireGlobal();
|
|
@@ -11762,7 +11774,7 @@
|
|
|
11762
11774
|
if (hasRequiredBlur) return Blur;
|
|
11763
11775
|
hasRequiredBlur = 1;
|
|
11764
11776
|
Object.defineProperty(Blur, "__esModule", { value: true });
|
|
11765
|
-
Blur.Blur =
|
|
11777
|
+
Blur.Blur = undefined;
|
|
11766
11778
|
const Factory_1 = requireFactory();
|
|
11767
11779
|
const Node_1 = requireNode();
|
|
11768
11780
|
const Validators_1 = requireValidators();
|
|
@@ -11811,7 +11823,8 @@
|
|
|
11811
11823
|
function filterGaussBlurRGBA(imageData, radius) {
|
|
11812
11824
|
const pixels = imageData.data, width = imageData.width, height = imageData.height;
|
|
11813
11825
|
let x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;
|
|
11814
|
-
|
|
11826
|
+
const div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), mul_sum = mul_table[radius], shg_sum = shg_table[radius];
|
|
11827
|
+
let stackEnd = null, stack = stackStart, stackIn = null, stackOut = null;
|
|
11815
11828
|
for (i = 1; i < div; i++) {
|
|
11816
11829
|
stack = stack.next = new BlurStack();
|
|
11817
11830
|
if (i === radiusPlus1) {
|
|
@@ -12009,13 +12022,13 @@
|
|
|
12009
12022
|
if (hasRequiredBrighten) return Brighten;
|
|
12010
12023
|
hasRequiredBrighten = 1;
|
|
12011
12024
|
Object.defineProperty(Brighten, "__esModule", { value: true });
|
|
12012
|
-
Brighten.Brighten =
|
|
12025
|
+
Brighten.Brighten = undefined;
|
|
12013
12026
|
const Factory_1 = requireFactory();
|
|
12014
12027
|
const Node_1 = requireNode();
|
|
12015
12028
|
const Validators_1 = requireValidators();
|
|
12016
12029
|
const Brighten$1 = function (imageData) {
|
|
12017
|
-
|
|
12018
|
-
for (i = 0; i < len; i += 4) {
|
|
12030
|
+
const brightness = this.brightness() * 255, data = imageData.data, len = data.length;
|
|
12031
|
+
for (let i = 0; i < len; i += 4) {
|
|
12019
12032
|
data[i] += brightness;
|
|
12020
12033
|
data[i + 1] += brightness;
|
|
12021
12034
|
data[i + 2] += brightness;
|
|
@@ -12034,14 +12047,15 @@
|
|
|
12034
12047
|
if (hasRequiredContrast) return Contrast;
|
|
12035
12048
|
hasRequiredContrast = 1;
|
|
12036
12049
|
Object.defineProperty(Contrast, "__esModule", { value: true });
|
|
12037
|
-
Contrast.Contrast =
|
|
12050
|
+
Contrast.Contrast = undefined;
|
|
12038
12051
|
const Factory_1 = requireFactory();
|
|
12039
12052
|
const Node_1 = requireNode();
|
|
12040
12053
|
const Validators_1 = requireValidators();
|
|
12041
12054
|
const Contrast$1 = function (imageData) {
|
|
12042
12055
|
const adjust = Math.pow((this.contrast() + 100) / 100, 2);
|
|
12043
|
-
|
|
12044
|
-
|
|
12056
|
+
const data = imageData.data, nPixels = data.length;
|
|
12057
|
+
let red = 150, green = 150, blue = 150;
|
|
12058
|
+
for (let i = 0; i < nPixels; i += 4) {
|
|
12045
12059
|
red = data[i];
|
|
12046
12060
|
green = data[i + 1];
|
|
12047
12061
|
blue = data[i + 2];
|
|
@@ -12081,13 +12095,14 @@
|
|
|
12081
12095
|
if (hasRequiredEmboss) return Emboss;
|
|
12082
12096
|
hasRequiredEmboss = 1;
|
|
12083
12097
|
Object.defineProperty(Emboss, "__esModule", { value: true });
|
|
12084
|
-
Emboss.Emboss =
|
|
12098
|
+
Emboss.Emboss = undefined;
|
|
12085
12099
|
const Factory_1 = requireFactory();
|
|
12086
12100
|
const Node_1 = requireNode();
|
|
12087
12101
|
const Util_1 = requireUtil();
|
|
12088
12102
|
const Validators_1 = requireValidators();
|
|
12089
12103
|
const Emboss$1 = function (imageData) {
|
|
12090
|
-
|
|
12104
|
+
const strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4;
|
|
12105
|
+
let dirY = 0, dirX = 0, y = h;
|
|
12091
12106
|
switch (direction) {
|
|
12092
12107
|
case 'top-left':
|
|
12093
12108
|
dirY = -1;
|
|
@@ -12183,8 +12198,8 @@
|
|
|
12183
12198
|
Emboss.Emboss = Emboss$1;
|
|
12184
12199
|
Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossStrength', 0.5, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
|
|
12185
12200
|
Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossWhiteLevel', 0.5, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
|
|
12186
|
-
Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossDirection', 'top-left',
|
|
12187
|
-
Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossBlend', false,
|
|
12201
|
+
Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossDirection', 'top-left', undefined, Factory_1.Factory.afterSetFilter);
|
|
12202
|
+
Factory_1.Factory.addGetterSetter(Node_1.Node, 'embossBlend', false, undefined, Factory_1.Factory.afterSetFilter);
|
|
12188
12203
|
return Emboss;
|
|
12189
12204
|
}
|
|
12190
12205
|
|
|
@@ -12196,29 +12211,30 @@
|
|
|
12196
12211
|
if (hasRequiredEnhance) return Enhance;
|
|
12197
12212
|
hasRequiredEnhance = 1;
|
|
12198
12213
|
Object.defineProperty(Enhance, "__esModule", { value: true });
|
|
12199
|
-
Enhance.Enhance =
|
|
12214
|
+
Enhance.Enhance = undefined;
|
|
12200
12215
|
const Factory_1 = requireFactory();
|
|
12201
12216
|
const Node_1 = requireNode();
|
|
12202
12217
|
const Validators_1 = requireValidators();
|
|
12203
12218
|
function remap(fromValue, fromMin, fromMax, toMin, toMax) {
|
|
12204
|
-
|
|
12219
|
+
const fromRange = fromMax - fromMin, toRange = toMax - toMin;
|
|
12205
12220
|
if (fromRange === 0) {
|
|
12206
12221
|
return toMin + toRange / 2;
|
|
12207
12222
|
}
|
|
12208
12223
|
if (toRange === 0) {
|
|
12209
12224
|
return toMin;
|
|
12210
12225
|
}
|
|
12211
|
-
toValue = (fromValue - fromMin) / fromRange;
|
|
12226
|
+
let toValue = (fromValue - fromMin) / fromRange;
|
|
12212
12227
|
toValue = toRange * toValue + toMin;
|
|
12213
12228
|
return toValue;
|
|
12214
12229
|
}
|
|
12215
12230
|
const Enhance$1 = function (imageData) {
|
|
12216
|
-
|
|
12231
|
+
const data = imageData.data, nSubPixels = data.length;
|
|
12232
|
+
let rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b;
|
|
12217
12233
|
const enhanceAmount = this.enhance();
|
|
12218
12234
|
if (enhanceAmount === 0) {
|
|
12219
12235
|
return;
|
|
12220
12236
|
}
|
|
12221
|
-
for (i = 0; i < nSubPixels; i += 4) {
|
|
12237
|
+
for (let i = 0; i < nSubPixels; i += 4) {
|
|
12222
12238
|
r = data[i + 0];
|
|
12223
12239
|
if (r < rMin) {
|
|
12224
12240
|
rMin = r;
|
|
@@ -12273,7 +12289,7 @@
|
|
|
12273
12289
|
bGoalMax = bMax + enhanceAmount * (bMax - bMid);
|
|
12274
12290
|
bGoalMin = bMin + enhanceAmount * (bMin - bMid);
|
|
12275
12291
|
}
|
|
12276
|
-
for (i = 0; i < nSubPixels; i += 4) {
|
|
12292
|
+
for (let i = 0; i < nSubPixels; i += 4) {
|
|
12277
12293
|
data[i + 0] = remap(data[i + 0], rMin, rMax, rGoalMin, rGoalMax);
|
|
12278
12294
|
data[i + 1] = remap(data[i + 1], gMin, gMax, gGoalMin, gGoalMax);
|
|
12279
12295
|
data[i + 2] = remap(data[i + 2], bMin, bMax, bGoalMin, bGoalMax);
|
|
@@ -12292,11 +12308,11 @@
|
|
|
12292
12308
|
if (hasRequiredGrayscale) return Grayscale;
|
|
12293
12309
|
hasRequiredGrayscale = 1;
|
|
12294
12310
|
Object.defineProperty(Grayscale, "__esModule", { value: true });
|
|
12295
|
-
Grayscale.Grayscale =
|
|
12311
|
+
Grayscale.Grayscale = undefined;
|
|
12296
12312
|
const Grayscale$1 = function (imageData) {
|
|
12297
|
-
|
|
12298
|
-
for (i = 0; i < len; i += 4) {
|
|
12299
|
-
brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];
|
|
12313
|
+
const data = imageData.data, len = data.length;
|
|
12314
|
+
for (let i = 0; i < len; i += 4) {
|
|
12315
|
+
const brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];
|
|
12300
12316
|
data[i] = brightness;
|
|
12301
12317
|
data[i + 1] = brightness;
|
|
12302
12318
|
data[i + 2] = brightness;
|
|
@@ -12314,7 +12330,7 @@
|
|
|
12314
12330
|
if (hasRequiredHSL) return HSL;
|
|
12315
12331
|
hasRequiredHSL = 1;
|
|
12316
12332
|
Object.defineProperty(HSL, "__esModule", { value: true });
|
|
12317
|
-
HSL.HSL =
|
|
12333
|
+
HSL.HSL = undefined;
|
|
12318
12334
|
const Factory_1 = requireFactory();
|
|
12319
12335
|
const Node_1 = requireNode();
|
|
12320
12336
|
const Validators_1 = requireValidators();
|
|
@@ -12322,13 +12338,13 @@
|
|
|
12322
12338
|
Factory_1.Factory.addGetterSetter(Node_1.Node, 'saturation', 0, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
|
|
12323
12339
|
Factory_1.Factory.addGetterSetter(Node_1.Node, 'luminance', 0, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
|
|
12324
12340
|
const HSL$1 = function (imageData) {
|
|
12325
|
-
|
|
12341
|
+
const data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127;
|
|
12326
12342
|
const vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);
|
|
12327
12343
|
const rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;
|
|
12328
12344
|
const gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;
|
|
12329
12345
|
const br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;
|
|
12330
12346
|
let r, g, b, a;
|
|
12331
|
-
for (i = 0; i < nPixels; i += 4) {
|
|
12347
|
+
for (let i = 0; i < nPixels; i += 4) {
|
|
12332
12348
|
r = data[i + 0];
|
|
12333
12349
|
g = data[i + 1];
|
|
12334
12350
|
b = data[i + 2];
|
|
@@ -12351,7 +12367,7 @@
|
|
|
12351
12367
|
if (hasRequiredHSV) return HSV;
|
|
12352
12368
|
hasRequiredHSV = 1;
|
|
12353
12369
|
Object.defineProperty(HSV, "__esModule", { value: true });
|
|
12354
|
-
HSV.HSV =
|
|
12370
|
+
HSV.HSV = undefined;
|
|
12355
12371
|
const Factory_1 = requireFactory();
|
|
12356
12372
|
const Node_1 = requireNode();
|
|
12357
12373
|
const Validators_1 = requireValidators();
|
|
@@ -12388,10 +12404,10 @@
|
|
|
12388
12404
|
if (hasRequiredInvert) return Invert;
|
|
12389
12405
|
hasRequiredInvert = 1;
|
|
12390
12406
|
Object.defineProperty(Invert, "__esModule", { value: true });
|
|
12391
|
-
Invert.Invert =
|
|
12407
|
+
Invert.Invert = undefined;
|
|
12392
12408
|
const Invert$1 = function (imageData) {
|
|
12393
|
-
|
|
12394
|
-
for (i = 0; i < len; i += 4) {
|
|
12409
|
+
const data = imageData.data, len = data.length;
|
|
12410
|
+
for (let i = 0; i < len; i += 4) {
|
|
12395
12411
|
data[i] = 255 - data[i];
|
|
12396
12412
|
data[i + 1] = 255 - data[i + 1];
|
|
12397
12413
|
data[i + 2] = 255 - data[i + 2];
|
|
@@ -12409,31 +12425,31 @@
|
|
|
12409
12425
|
if (hasRequiredKaleidoscope) return Kaleidoscope;
|
|
12410
12426
|
hasRequiredKaleidoscope = 1;
|
|
12411
12427
|
Object.defineProperty(Kaleidoscope, "__esModule", { value: true });
|
|
12412
|
-
Kaleidoscope.Kaleidoscope =
|
|
12428
|
+
Kaleidoscope.Kaleidoscope = undefined;
|
|
12413
12429
|
const Factory_1 = requireFactory();
|
|
12414
12430
|
const Node_1 = requireNode();
|
|
12415
12431
|
const Util_1 = requireUtil();
|
|
12416
12432
|
const Validators_1 = requireValidators();
|
|
12417
12433
|
const ToPolar = function (src, dst, opt) {
|
|
12418
|
-
|
|
12419
|
-
let
|
|
12420
|
-
x = xSize - xMid;
|
|
12421
|
-
y = ySize - yMid;
|
|
12422
|
-
rad = Math.sqrt(x * x + y * y);
|
|
12434
|
+
const srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2;
|
|
12435
|
+
let rMax = Math.sqrt(xMid * xMid + yMid * yMid);
|
|
12436
|
+
let x = xSize - xMid;
|
|
12437
|
+
let y = ySize - yMid;
|
|
12438
|
+
const rad = Math.sqrt(x * x + y * y);
|
|
12423
12439
|
rMax = rad > rMax ? rad : rMax;
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
for (theta = 0; theta < tSize; theta += 1) {
|
|
12427
|
-
sin = Math.sin(theta * conversion);
|
|
12428
|
-
cos = Math.cos(theta * conversion);
|
|
12429
|
-
for (radius = 0; radius < rSize; radius += 1) {
|
|
12440
|
+
const rSize = ySize, tSize = xSize;
|
|
12441
|
+
const conversion = ((360 / tSize) * Math.PI) / 180;
|
|
12442
|
+
for (let theta = 0; theta < tSize; theta += 1) {
|
|
12443
|
+
const sin = Math.sin(theta * conversion);
|
|
12444
|
+
const cos = Math.cos(theta * conversion);
|
|
12445
|
+
for (let radius = 0; radius < rSize; radius += 1) {
|
|
12430
12446
|
x = Math.floor(xMid + ((rMax * radius) / rSize) * cos);
|
|
12431
12447
|
y = Math.floor(yMid + ((rMax * radius) / rSize) * sin);
|
|
12432
|
-
i = (y * xSize + x) * 4;
|
|
12433
|
-
r = srcPixels[i + 0];
|
|
12434
|
-
g = srcPixels[i + 1];
|
|
12435
|
-
b = srcPixels[i + 2];
|
|
12436
|
-
a = srcPixels[i + 3];
|
|
12448
|
+
let i = (y * xSize + x) * 4;
|
|
12449
|
+
const r = srcPixels[i + 0];
|
|
12450
|
+
const g = srcPixels[i + 1];
|
|
12451
|
+
const b = srcPixels[i + 2];
|
|
12452
|
+
const a = srcPixels[i + 3];
|
|
12437
12453
|
i = (theta + radius * xSize) * 4;
|
|
12438
12454
|
dstPixels[i + 0] = r;
|
|
12439
12455
|
dstPixels[i + 1] = g;
|
|
@@ -12443,28 +12459,28 @@
|
|
|
12443
12459
|
}
|
|
12444
12460
|
};
|
|
12445
12461
|
const FromPolar = function (src, dst, opt) {
|
|
12446
|
-
|
|
12447
|
-
let
|
|
12448
|
-
x = xSize - xMid;
|
|
12449
|
-
y = ySize - yMid;
|
|
12450
|
-
rad = Math.sqrt(x * x + y * y);
|
|
12462
|
+
const srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2;
|
|
12463
|
+
let rMax = Math.sqrt(xMid * xMid + yMid * yMid);
|
|
12464
|
+
let x = xSize - xMid;
|
|
12465
|
+
let y = ySize - yMid;
|
|
12466
|
+
const rad = Math.sqrt(x * x + y * y);
|
|
12451
12467
|
rMax = rad > rMax ? rad : rMax;
|
|
12452
|
-
|
|
12468
|
+
const rSize = ySize, tSize = xSize, phaseShift = 0;
|
|
12453
12469
|
let x1, y1;
|
|
12454
12470
|
for (x = 0; x < xSize; x += 1) {
|
|
12455
12471
|
for (y = 0; y < ySize; y += 1) {
|
|
12456
|
-
dx = x - xMid;
|
|
12457
|
-
dy = y - yMid;
|
|
12458
|
-
radius = (Math.sqrt(dx * dx + dy * dy) * rSize) / rMax;
|
|
12459
|
-
theta = ((Math.atan2(dy, dx) * 180) / Math.PI + 360 + phaseShift) % 360;
|
|
12472
|
+
const dx = x - xMid;
|
|
12473
|
+
const dy = y - yMid;
|
|
12474
|
+
const radius = (Math.sqrt(dx * dx + dy * dy) * rSize) / rMax;
|
|
12475
|
+
let theta = ((Math.atan2(dy, dx) * 180) / Math.PI + 360 + phaseShift) % 360;
|
|
12460
12476
|
theta = (theta * tSize) / 360;
|
|
12461
12477
|
x1 = Math.floor(theta);
|
|
12462
12478
|
y1 = Math.floor(radius);
|
|
12463
|
-
i = (y1 * xSize + x1) * 4;
|
|
12464
|
-
r = srcPixels[i + 0];
|
|
12465
|
-
g = srcPixels[i + 1];
|
|
12466
|
-
b = srcPixels[i + 2];
|
|
12467
|
-
a = srcPixels[i + 3];
|
|
12479
|
+
let i = (y1 * xSize + x1) * 4;
|
|
12480
|
+
const r = srcPixels[i + 0];
|
|
12481
|
+
const g = srcPixels[i + 1];
|
|
12482
|
+
const b = srcPixels[i + 2];
|
|
12483
|
+
const a = srcPixels[i + 3];
|
|
12468
12484
|
i = (y * xSize + x) * 4;
|
|
12469
12485
|
dstPixels[i + 0] = r;
|
|
12470
12486
|
dstPixels[i + 1] = g;
|
|
@@ -12539,7 +12555,7 @@
|
|
|
12539
12555
|
sectionSize *= 2;
|
|
12540
12556
|
}
|
|
12541
12557
|
}
|
|
12542
|
-
FromPolar(scratchData, imageData, {
|
|
12558
|
+
FromPolar(scratchData, imageData, { });
|
|
12543
12559
|
};
|
|
12544
12560
|
Kaleidoscope.Kaleidoscope = Kaleidoscope$1;
|
|
12545
12561
|
Factory_1.Factory.addGetterSetter(Node_1.Node, 'kaleidoscopePower', 2, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
|
|
@@ -12555,7 +12571,7 @@
|
|
|
12555
12571
|
if (hasRequiredMask) return Mask;
|
|
12556
12572
|
hasRequiredMask = 1;
|
|
12557
12573
|
Object.defineProperty(Mask, "__esModule", { value: true });
|
|
12558
|
-
Mask.Mask =
|
|
12574
|
+
Mask.Mask = undefined;
|
|
12559
12575
|
const Factory_1 = requireFactory();
|
|
12560
12576
|
const Node_1 = requireNode();
|
|
12561
12577
|
const Validators_1 = requireValidators();
|
|
@@ -12686,7 +12702,8 @@
|
|
|
12686
12702
|
return maskResult;
|
|
12687
12703
|
}
|
|
12688
12704
|
const Mask$1 = function (imageData) {
|
|
12689
|
-
|
|
12705
|
+
const threshold = this.threshold();
|
|
12706
|
+
let mask = backgroundMask(imageData, threshold);
|
|
12690
12707
|
if (mask) {
|
|
12691
12708
|
mask = erodeMask(mask, imageData.width, imageData.height);
|
|
12692
12709
|
mask = dilateMask(mask, imageData.width, imageData.height);
|
|
@@ -12708,7 +12725,7 @@
|
|
|
12708
12725
|
if (hasRequiredNoise) return Noise;
|
|
12709
12726
|
hasRequiredNoise = 1;
|
|
12710
12727
|
Object.defineProperty(Noise, "__esModule", { value: true });
|
|
12711
|
-
Noise.Noise =
|
|
12728
|
+
Noise.Noise = undefined;
|
|
12712
12729
|
const Factory_1 = requireFactory();
|
|
12713
12730
|
const Node_1 = requireNode();
|
|
12714
12731
|
const Validators_1 = requireValidators();
|
|
@@ -12733,7 +12750,7 @@
|
|
|
12733
12750
|
if (hasRequiredPixelate) return Pixelate;
|
|
12734
12751
|
hasRequiredPixelate = 1;
|
|
12735
12752
|
Object.defineProperty(Pixelate, "__esModule", { value: true });
|
|
12736
|
-
Pixelate.Pixelate =
|
|
12753
|
+
Pixelate.Pixelate = undefined;
|
|
12737
12754
|
const Factory_1 = requireFactory();
|
|
12738
12755
|
const Util_1 = requireUtil();
|
|
12739
12756
|
const Node_1 = requireNode();
|
|
@@ -12806,13 +12823,13 @@
|
|
|
12806
12823
|
if (hasRequiredPosterize) return Posterize;
|
|
12807
12824
|
hasRequiredPosterize = 1;
|
|
12808
12825
|
Object.defineProperty(Posterize, "__esModule", { value: true });
|
|
12809
|
-
Posterize.Posterize =
|
|
12826
|
+
Posterize.Posterize = undefined;
|
|
12810
12827
|
const Factory_1 = requireFactory();
|
|
12811
12828
|
const Node_1 = requireNode();
|
|
12812
12829
|
const Validators_1 = requireValidators();
|
|
12813
12830
|
const Posterize$1 = function (imageData) {
|
|
12814
|
-
|
|
12815
|
-
for (i = 0; i < len; i += 1) {
|
|
12831
|
+
const levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels;
|
|
12832
|
+
for (let i = 0; i < len; i += 1) {
|
|
12816
12833
|
data[i] = Math.floor(data[i] / scale) * scale;
|
|
12817
12834
|
}
|
|
12818
12835
|
};
|
|
@@ -12829,15 +12846,14 @@
|
|
|
12829
12846
|
if (hasRequiredRGB) return RGB;
|
|
12830
12847
|
hasRequiredRGB = 1;
|
|
12831
12848
|
Object.defineProperty(RGB, "__esModule", { value: true });
|
|
12832
|
-
RGB.RGB =
|
|
12849
|
+
RGB.RGB = undefined;
|
|
12833
12850
|
const Factory_1 = requireFactory();
|
|
12834
12851
|
const Node_1 = requireNode();
|
|
12835
12852
|
const Validators_1 = requireValidators();
|
|
12836
12853
|
const RGB$1 = function (imageData) {
|
|
12837
|
-
|
|
12838
|
-
for (i = 0; i < nPixels; i += 4) {
|
|
12839
|
-
brightness =
|
|
12840
|
-
(0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]) / 255;
|
|
12854
|
+
const data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue();
|
|
12855
|
+
for (let i = 0; i < nPixels; i += 4) {
|
|
12856
|
+
const brightness = (0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]) / 255;
|
|
12841
12857
|
data[i] = brightness * red;
|
|
12842
12858
|
data[i + 1] = brightness * green;
|
|
12843
12859
|
data[i + 2] = brightness * blue;
|
|
@@ -12881,7 +12897,7 @@
|
|
|
12881
12897
|
if (hasRequiredRGBA) return RGBA;
|
|
12882
12898
|
hasRequiredRGBA = 1;
|
|
12883
12899
|
Object.defineProperty(RGBA, "__esModule", { value: true });
|
|
12884
|
-
RGBA.RGBA =
|
|
12900
|
+
RGBA.RGBA = undefined;
|
|
12885
12901
|
const Factory_1 = requireFactory();
|
|
12886
12902
|
const Node_1 = requireNode();
|
|
12887
12903
|
const Validators_1 = requireValidators();
|
|
@@ -12943,13 +12959,13 @@
|
|
|
12943
12959
|
if (hasRequiredSepia) return Sepia;
|
|
12944
12960
|
hasRequiredSepia = 1;
|
|
12945
12961
|
Object.defineProperty(Sepia, "__esModule", { value: true });
|
|
12946
|
-
Sepia.Sepia =
|
|
12962
|
+
Sepia.Sepia = undefined;
|
|
12947
12963
|
const Sepia$1 = function (imageData) {
|
|
12948
|
-
|
|
12949
|
-
for (i = 0; i < nPixels; i += 4) {
|
|
12950
|
-
r = data[i + 0];
|
|
12951
|
-
g = data[i + 1];
|
|
12952
|
-
b = data[i + 2];
|
|
12964
|
+
const data = imageData.data, nPixels = data.length;
|
|
12965
|
+
for (let i = 0; i < nPixels; i += 4) {
|
|
12966
|
+
const r = data[i + 0];
|
|
12967
|
+
const g = data[i + 1];
|
|
12968
|
+
const b = data[i + 2];
|
|
12953
12969
|
data[i + 0] = Math.min(255, r * 0.393 + g * 0.769 + b * 0.189);
|
|
12954
12970
|
data[i + 1] = Math.min(255, r * 0.349 + g * 0.686 + b * 0.168);
|
|
12955
12971
|
data[i + 2] = Math.min(255, r * 0.272 + g * 0.534 + b * 0.131);
|
|
@@ -12967,7 +12983,7 @@
|
|
|
12967
12983
|
if (hasRequiredSolarize) return Solarize;
|
|
12968
12984
|
hasRequiredSolarize = 1;
|
|
12969
12985
|
Object.defineProperty(Solarize, "__esModule", { value: true });
|
|
12970
|
-
Solarize.Solarize =
|
|
12986
|
+
Solarize.Solarize = undefined;
|
|
12971
12987
|
const Solarize$1 = function (imageData) {
|
|
12972
12988
|
const data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4;
|
|
12973
12989
|
let y = h;
|
|
@@ -13006,7 +13022,7 @@
|
|
|
13006
13022
|
if (hasRequiredThreshold) return Threshold;
|
|
13007
13023
|
hasRequiredThreshold = 1;
|
|
13008
13024
|
Object.defineProperty(Threshold, "__esModule", { value: true });
|
|
13009
|
-
Threshold.Threshold =
|
|
13025
|
+
Threshold.Threshold = undefined;
|
|
13010
13026
|
const Factory_1 = requireFactory();
|
|
13011
13027
|
const Node_1 = requireNode();
|
|
13012
13028
|
const Validators_1 = requireValidators();
|
|
@@ -13027,7 +13043,7 @@
|
|
|
13027
13043
|
if (hasRequired_FullInternals) return _FullInternals;
|
|
13028
13044
|
hasRequired_FullInternals = 1;
|
|
13029
13045
|
Object.defineProperty(_FullInternals, "__esModule", { value: true });
|
|
13030
|
-
_FullInternals.Konva =
|
|
13046
|
+
_FullInternals.Konva = undefined;
|
|
13031
13047
|
const _CoreInternals_1 = require_CoreInternals();
|
|
13032
13048
|
const Arc_1 = requireArc();
|
|
13033
13049
|
const Arrow_1 = requireArrow();
|
|
@@ -13197,8 +13213,8 @@
|
|
|
13197
13213
|
const konvaPoints = [];
|
|
13198
13214
|
params.points.forEach((point => konvaPoints.push(point.x, point.y)));
|
|
13199
13215
|
this._ref = new Konva.Line({
|
|
13200
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
13201
|
-
strokeWidth: (_b = params.width) !== null && _b !==
|
|
13216
|
+
stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
|
|
13217
|
+
strokeWidth: (_b = params.width) !== null && _b !== undefined ? _b : 4,
|
|
13202
13218
|
globalCompositeOperation: "source-over",
|
|
13203
13219
|
lineCap: "round",
|
|
13204
13220
|
lineJoin: "round",
|
|
@@ -13305,12 +13321,12 @@
|
|
|
13305
13321
|
x: params.position.x,
|
|
13306
13322
|
y: params.position.y,
|
|
13307
13323
|
text: params.text,
|
|
13308
|
-
fontSize: (_a = params.fontSize) !== null && _a !==
|
|
13324
|
+
fontSize: (_a = params.fontSize) !== null && _a !== undefined ? _a : 34,
|
|
13309
13325
|
fontFamily: this.TEXT_FONT_FAMILY,
|
|
13310
|
-
fill: (_b = params.color) !== null && _b !==
|
|
13326
|
+
fill: (_b = params.color) !== null && _b !== undefined ? _b : "#ff0000",
|
|
13311
13327
|
align: "left",
|
|
13312
13328
|
draggable: true,
|
|
13313
|
-
rotation: (_c = params.rotation) !== null && _c !==
|
|
13329
|
+
rotation: (_c = params.rotation) !== null && _c !== undefined ? _c : 0
|
|
13314
13330
|
});
|
|
13315
13331
|
this._ref.width(this._ref.getTextWidth());
|
|
13316
13332
|
this._ref.on("transform", (e => {
|
|
@@ -13408,15 +13424,15 @@
|
|
|
13408
13424
|
y: 100
|
|
13409
13425
|
};
|
|
13410
13426
|
this._ref = new Konva.Rect({
|
|
13411
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
13412
|
-
strokeWidth: (_b = params.lineWidth) !== null && _b !==
|
|
13427
|
+
stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
|
|
13428
|
+
strokeWidth: (_b = params.lineWidth) !== null && _b !== undefined ? _b : 4,
|
|
13413
13429
|
globalCompositeOperation: "source-over",
|
|
13414
13430
|
lineCap: "round",
|
|
13415
13431
|
lineJoin: "round",
|
|
13416
13432
|
x: params.position.x,
|
|
13417
13433
|
y: params.position.y,
|
|
13418
|
-
width: (_c = params.width) !== null && _c !==
|
|
13419
|
-
height: (_d = params.height) !== null && _d !==
|
|
13434
|
+
width: (_c = params.width) !== null && _c !== undefined ? _c : 200,
|
|
13435
|
+
height: (_d = params.height) !== null && _d !== undefined ? _d : 200,
|
|
13420
13436
|
draggable: true,
|
|
13421
13437
|
strokeScaleEnabled: false
|
|
13422
13438
|
});
|
|
@@ -13526,8 +13542,8 @@
|
|
|
13526
13542
|
y: 25
|
|
13527
13543
|
};
|
|
13528
13544
|
this._ref = new Konva.Ellipse({
|
|
13529
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
13530
|
-
strokeWidth: (_b = params.lineWidth) !== null && _b !==
|
|
13545
|
+
stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
|
|
13546
|
+
strokeWidth: (_b = params.lineWidth) !== null && _b !== undefined ? _b : 4,
|
|
13531
13547
|
globalCompositeOperation: "source-over",
|
|
13532
13548
|
lineCap: "round",
|
|
13533
13549
|
lineJoin: "round",
|
|
@@ -13656,8 +13672,8 @@
|
|
|
13656
13672
|
y: 100
|
|
13657
13673
|
};
|
|
13658
13674
|
this._ref = new Konva.Arrow({
|
|
13659
|
-
stroke: (_a = params.color) !== null && _a !==
|
|
13660
|
-
fill: (_b = params.color) !== null && _b !==
|
|
13675
|
+
stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
|
|
13676
|
+
fill: (_b = params.color) !== null && _b !== undefined ? _b : "#ff0000",
|
|
13661
13677
|
strokeWidth: 4,
|
|
13662
13678
|
globalCompositeOperation: "source-over",
|
|
13663
13679
|
lineCap: "round",
|
|
@@ -13797,8 +13813,8 @@
|
|
|
13797
13813
|
x: params.position.x,
|
|
13798
13814
|
y: params.position.y,
|
|
13799
13815
|
image: this._canvasImage,
|
|
13800
|
-
width: (_a = params.width) !== null && _a !==
|
|
13801
|
-
height: (_b = params.height) !== null && _b !==
|
|
13816
|
+
width: (_a = params.width) !== null && _a !== undefined ? _a : 0,
|
|
13817
|
+
height: (_b = params.height) !== null && _b !== undefined ? _b : 0,
|
|
13802
13818
|
draggable: true
|
|
13803
13819
|
});
|
|
13804
13820
|
this._ref.on("transform", (e => {
|
|
@@ -13908,10 +13924,10 @@
|
|
|
13908
13924
|
this._ref = new Konva.Shape({
|
|
13909
13925
|
x: params.position.x,
|
|
13910
13926
|
y: params.position.y,
|
|
13911
|
-
width: (_a = params.width) !== null && _a !==
|
|
13912
|
-
height: (_b = params.height) !== null && _b !==
|
|
13913
|
-
stroke: (_c = params.color) !== null && _c !==
|
|
13914
|
-
strokeWidth: (_d = params.lineWidth) !== null && _d !==
|
|
13927
|
+
width: (_a = params.width) !== null && _a !== undefined ? _a : 200,
|
|
13928
|
+
height: (_b = params.height) !== null && _b !== undefined ? _b : 200,
|
|
13929
|
+
stroke: (_c = params.color) !== null && _c !== undefined ? _c : "#ff0000",
|
|
13930
|
+
strokeWidth: (_d = params.lineWidth) !== null && _d !== undefined ? _d : 4,
|
|
13915
13931
|
draggable: true,
|
|
13916
13932
|
strokeScaleEnabled: false,
|
|
13917
13933
|
globalCompositeOperation: "source-over",
|
|
@@ -14160,9 +14176,9 @@
|
|
|
14160
14176
|
initialize(container, containerEvents, viewer, worldTransformer) {
|
|
14161
14177
|
if (!Konva) throw new Error('Markup error: Konva is not initialized. Forgot to add <script src="https://unpkg.com/konva@9/konva.min.js"><\/script> to your page?');
|
|
14162
14178
|
this._viewer = viewer;
|
|
14163
|
-
this._worldTransformer = worldTransformer !== null && worldTransformer !==
|
|
14179
|
+
this._worldTransformer = worldTransformer !== null && worldTransformer !== undefined ? worldTransformer : new WorldTransform;
|
|
14164
14180
|
this._container = container;
|
|
14165
|
-
this._containerEvents = containerEvents !== null && containerEvents !==
|
|
14181
|
+
this._containerEvents = containerEvents !== null && containerEvents !== undefined ? containerEvents : [];
|
|
14166
14182
|
this._markupContainer = document.createElement("div");
|
|
14167
14183
|
this._markupContainer.id = "markup-container";
|
|
14168
14184
|
this._markupContainer.style.position = "absolute";
|
|
@@ -14190,9 +14206,9 @@
|
|
|
14190
14206
|
this._viewer.removeEventListener("changeactivedragger", this.changeActiveDragger);
|
|
14191
14207
|
}
|
|
14192
14208
|
this.destroyKonva();
|
|
14193
|
-
(_a = this._resizeObserver) === null || _a ===
|
|
14209
|
+
(_a = this._resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
|
|
14194
14210
|
this._resizeObserver = undefined;
|
|
14195
|
-
(_b = this._markupContainer) === null || _b ===
|
|
14211
|
+
(_b = this._markupContainer) === null || _b === undefined ? undefined : _b.remove();
|
|
14196
14212
|
this._markupContainer = undefined;
|
|
14197
14213
|
this._container = undefined;
|
|
14198
14214
|
this._viewer = undefined;
|
|
@@ -14224,14 +14240,14 @@
|
|
|
14224
14240
|
const hexColor = new MarkupColor(r, g, b).asHex();
|
|
14225
14241
|
this.getObjects().filter((obj => {
|
|
14226
14242
|
var _a;
|
|
14227
|
-
return (_a = obj.setColor) === null || _a ===
|
|
14243
|
+
return (_a = obj.setColor) === null || _a === undefined ? undefined : _a.call(obj, hexColor);
|
|
14228
14244
|
}));
|
|
14229
14245
|
}
|
|
14230
14246
|
colorizeSelectedMarkups(r, g, b) {
|
|
14231
14247
|
const hexColor = new MarkupColor(r, g, b).asHex();
|
|
14232
14248
|
this.getSelectedObjects().filter((obj => {
|
|
14233
14249
|
var _a;
|
|
14234
|
-
return (_a = obj.setColor) === null || _a ===
|
|
14250
|
+
return (_a = obj.setColor) === null || _a === undefined ? undefined : _a.call(obj, hexColor);
|
|
14235
14251
|
}));
|
|
14236
14252
|
}
|
|
14237
14253
|
setViewpoint(viewpoint) {
|
|
@@ -14247,13 +14263,13 @@
|
|
|
14247
14263
|
x: 0,
|
|
14248
14264
|
y: 0
|
|
14249
14265
|
});
|
|
14250
|
-
const markupColor = ((_a = viewpoint.custom_fields) === null || _a ===
|
|
14266
|
+
const markupColor = ((_a = viewpoint.custom_fields) === null || _a === undefined ? undefined : _a.markup_color) || {
|
|
14251
14267
|
r: 255,
|
|
14252
14268
|
g: 0,
|
|
14253
14269
|
b: 0
|
|
14254
14270
|
};
|
|
14255
14271
|
this.setMarkupColor(markupColor.r, markupColor.g, markupColor.b);
|
|
14256
|
-
(_b = viewpoint.lines) === null || _b ===
|
|
14272
|
+
(_b = viewpoint.lines) === null || _b === undefined ? undefined : _b.forEach((line => {
|
|
14257
14273
|
const linePoints = [];
|
|
14258
14274
|
line.points.forEach((point => {
|
|
14259
14275
|
const screenPoint = this._worldTransformer.worldToScreen(point);
|
|
@@ -14262,28 +14278,28 @@
|
|
|
14262
14278
|
}));
|
|
14263
14279
|
this.addLine(linePoints, line.color, line.type, line.width, line.id);
|
|
14264
14280
|
}));
|
|
14265
|
-
(_c = viewpoint.texts) === null || _c ===
|
|
14281
|
+
(_c = viewpoint.texts) === null || _c === undefined ? undefined : _c.forEach((text => {
|
|
14266
14282
|
const screenPoint = this._worldTransformer.worldToScreen(text.position);
|
|
14267
14283
|
this.addText(text.text, screenPoint, text.angle, text.color, text.text_size, text.font_size, text.id);
|
|
14268
14284
|
}));
|
|
14269
|
-
(_d = viewpoint.rectangles) === null || _d ===
|
|
14285
|
+
(_d = viewpoint.rectangles) === null || _d === undefined ? undefined : _d.forEach((rect => {
|
|
14270
14286
|
const screenPoint = this._worldTransformer.worldToScreen(rect.position);
|
|
14271
14287
|
this.addRectangle(screenPoint, rect.width, rect.height, rect.line_width, rect.color, rect.id);
|
|
14272
14288
|
}));
|
|
14273
|
-
(_e = viewpoint.ellipses) === null || _e ===
|
|
14289
|
+
(_e = viewpoint.ellipses) === null || _e === undefined ? undefined : _e.forEach((ellipse => {
|
|
14274
14290
|
const screenPoint = this._worldTransformer.worldToScreen(ellipse.position);
|
|
14275
14291
|
this.addEllipse(screenPoint, ellipse.radius, ellipse.line_width, ellipse.color, ellipse.id);
|
|
14276
14292
|
}));
|
|
14277
|
-
(_f = viewpoint.arrows) === null || _f ===
|
|
14293
|
+
(_f = viewpoint.arrows) === null || _f === undefined ? undefined : _f.forEach((arrow => {
|
|
14278
14294
|
const startPoint = this._worldTransformer.worldToScreen(arrow.start);
|
|
14279
14295
|
const endPoint = this._worldTransformer.worldToScreen(arrow.end);
|
|
14280
14296
|
this.addArrow(startPoint, endPoint, arrow.color, arrow.id);
|
|
14281
14297
|
}));
|
|
14282
|
-
(_g = viewpoint.clouds) === null || _g ===
|
|
14298
|
+
(_g = viewpoint.clouds) === null || _g === undefined ? undefined : _g.forEach((cloud => {
|
|
14283
14299
|
const screenPoint = this._worldTransformer.worldToScreen(cloud.position);
|
|
14284
14300
|
this.addCloud(screenPoint, cloud.width, cloud.height, cloud.line_width, cloud.color, cloud.id);
|
|
14285
14301
|
}));
|
|
14286
|
-
(_h = viewpoint.images) === null || _h ===
|
|
14302
|
+
(_h = viewpoint.images) === null || _h === undefined ? undefined : _h.forEach((image => {
|
|
14287
14303
|
const screenPoint = this._worldTransformer.worldToScreen(image.position);
|
|
14288
14304
|
this.addImage(screenPoint, image.src, image.width, image.height, image.id);
|
|
14289
14305
|
}));
|
|
@@ -14577,7 +14593,7 @@
|
|
|
14577
14593
|
this.removeTextInput();
|
|
14578
14594
|
this.removeImageInput();
|
|
14579
14595
|
this.clearOverlay();
|
|
14580
|
-
(_a = this._konvaStage) === null || _a ===
|
|
14596
|
+
(_a = this._konvaStage) === null || _a === undefined ? undefined : _a.destroy();
|
|
14581
14597
|
this._groupImages = undefined;
|
|
14582
14598
|
this._groupGeometry = undefined;
|
|
14583
14599
|
this._groupTexts = undefined;
|
|
@@ -14827,7 +14843,7 @@
|
|
|
14827
14843
|
}
|
|
14828
14844
|
removeTextInput() {
|
|
14829
14845
|
var _a;
|
|
14830
|
-
(_a = this._textInputRef) === null || _a ===
|
|
14846
|
+
(_a = this._textInputRef) === null || _a === undefined ? undefined : _a.remove();
|
|
14831
14847
|
this._textInputRef = null;
|
|
14832
14848
|
this._textInputPos = null;
|
|
14833
14849
|
this._textInputAngle = 0;
|
|
@@ -14870,14 +14886,14 @@
|
|
|
14870
14886
|
}
|
|
14871
14887
|
removeImageInput() {
|
|
14872
14888
|
var _a;
|
|
14873
|
-
(_a = this._imageInputRef) === null || _a ===
|
|
14889
|
+
(_a = this._imageInputRef) === null || _a === undefined ? undefined : _a.remove();
|
|
14874
14890
|
this._imageInputRef = null;
|
|
14875
14891
|
this._imageInputPos = null;
|
|
14876
14892
|
}
|
|
14877
14893
|
addText(text, position, angle, color, textSize, fontSize, id) {
|
|
14878
14894
|
var _a;
|
|
14879
14895
|
if (!text) return;
|
|
14880
|
-
(_a = this.getSelectedObjects().at(0)) === null || _a ===
|
|
14896
|
+
(_a = this.getSelectedObjects().at(0)) === null || _a === undefined ? undefined : _a.delete();
|
|
14881
14897
|
this.clearSelected();
|
|
14882
14898
|
this.removeTextInput();
|
|
14883
14899
|
const tolerance = 1e-6;
|
|
@@ -14952,7 +14968,7 @@
|
|
|
14952
14968
|
addImage(position, src, width, height, id) {
|
|
14953
14969
|
var _a;
|
|
14954
14970
|
if (!position || !src) return;
|
|
14955
|
-
(_a = this.getSelectedObjects().at(0)) === null || _a ===
|
|
14971
|
+
(_a = this.getSelectedObjects().at(0)) === null || _a === undefined ? undefined : _a.delete();
|
|
14956
14972
|
this.clearSelected();
|
|
14957
14973
|
this.removeImageInput();
|
|
14958
14974
|
const konvaImage = new KonvaImage({
|
|
@@ -15014,7 +15030,7 @@
|
|
|
15014
15030
|
var _a;
|
|
15015
15031
|
const extView = this.m_module.getViewer().getActiveTvExtendedView();
|
|
15016
15032
|
extView.setView(params.position, params.target, params.upVector, params.viewFieldWidth, params.viewFieldHeight, params.perspective);
|
|
15017
|
-
(_a = extView.delete) === null || _a ===
|
|
15033
|
+
(_a = extView.delete) === null || _a === undefined ? undefined : _a.call(extView);
|
|
15018
15034
|
};
|
|
15019
15035
|
this.getViewParams = () => {
|
|
15020
15036
|
var _a;
|
|
@@ -15027,7 +15043,7 @@
|
|
|
15027
15043
|
viewFieldHeight: view.viewFieldHeight,
|
|
15028
15044
|
perspective: view.perspective,
|
|
15029
15045
|
};
|
|
15030
|
-
(_a = view.delete) === null || _a ===
|
|
15046
|
+
(_a = view.delete) === null || _a === undefined ? undefined : _a.call(view);
|
|
15031
15047
|
return obj;
|
|
15032
15048
|
};
|
|
15033
15049
|
this.m_module = module;
|
|
@@ -15260,7 +15276,7 @@
|
|
|
15260
15276
|
deleteAll(objects) {
|
|
15261
15277
|
var _a;
|
|
15262
15278
|
for (const obj of objects) {
|
|
15263
|
-
(_a = obj === null || obj ===
|
|
15279
|
+
(_a = obj === null || obj === undefined ? undefined : obj.delete) === null || _a === undefined ? undefined : _a.call(obj);
|
|
15264
15280
|
}
|
|
15265
15281
|
}
|
|
15266
15282
|
updatePreview() { }
|
|
@@ -15628,7 +15644,7 @@
|
|
|
15628
15644
|
};
|
|
15629
15645
|
this.items = [];
|
|
15630
15646
|
this.canvasEvents.push("resize");
|
|
15631
|
-
this.oldRulerUnit = (_a = subject.options.rulerUnit) !== null && _a !==
|
|
15647
|
+
this.oldRulerUnit = (_a = subject.options.rulerUnit) !== null && _a !== undefined ? _a : "Default";
|
|
15632
15648
|
this.optionsChange = this.optionsChange.bind(this);
|
|
15633
15649
|
}
|
|
15634
15650
|
initialize() {
|
|
@@ -15742,7 +15758,7 @@
|
|
|
15742
15758
|
optionsChange(event) {
|
|
15743
15759
|
var _a;
|
|
15744
15760
|
const options = event.data;
|
|
15745
|
-
const toUnitName = (_a = options.rulerUnit) !== null && _a !==
|
|
15761
|
+
const toUnitName = (_a = options.rulerUnit) !== null && _a !== undefined ? _a : "Default";
|
|
15746
15762
|
if (this.oldRulerUnit === toUnitName)
|
|
15747
15763
|
return;
|
|
15748
15764
|
this.oldRulerUnit = toUnitName;
|
|
@@ -15862,7 +15878,7 @@
|
|
|
15862
15878
|
const model = this.viewer.getActiveModel();
|
|
15863
15879
|
model.removeEntity(this.cameraId);
|
|
15864
15880
|
model.delete();
|
|
15865
|
-
(_a = this.cameraWalker) === null || _a ===
|
|
15881
|
+
(_a = this.cameraWalker) === null || _a === undefined ? undefined : _a.delete();
|
|
15866
15882
|
}
|
|
15867
15883
|
if (this.viewParams) {
|
|
15868
15884
|
this.setViewParams(this.viewParams);
|
|
@@ -16254,7 +16270,7 @@
|
|
|
16254
16270
|
const extView = this.getViewer().getActiveTvExtendedView();
|
|
16255
16271
|
extView.setView(viewParams.position, viewParams.target, viewParams.upVector, viewParams.viewFieldWidth, viewParams.viewFieldHeight, viewParams.perspective);
|
|
16256
16272
|
extView.delete();
|
|
16257
|
-
(_a = this._subject.activeDragger()) === null || _a ===
|
|
16273
|
+
(_a = this._subject.activeDragger()) === null || _a === undefined ? undefined : _a.updatePreview();
|
|
16258
16274
|
}
|
|
16259
16275
|
endAction() {
|
|
16260
16276
|
this._endInteractivity();
|
|
@@ -16363,7 +16379,7 @@
|
|
|
16363
16379
|
deleteAll(objects) {
|
|
16364
16380
|
var _a;
|
|
16365
16381
|
for (const obj of objects) {
|
|
16366
|
-
(_a = obj === null || obj ===
|
|
16382
|
+
(_a = obj === null || obj === undefined ? undefined : obj.delete) === null || _a === undefined ? undefined : _a.call(obj);
|
|
16367
16383
|
}
|
|
16368
16384
|
}
|
|
16369
16385
|
}
|
|
@@ -16449,7 +16465,7 @@
|
|
|
16449
16465
|
targetWithDelta.delete();
|
|
16450
16466
|
position.delete();
|
|
16451
16467
|
positionWithDelta.delete();
|
|
16452
|
-
(_a = this._subject.activeDragger()) === null || _a ===
|
|
16468
|
+
(_a = this._subject.activeDragger()) === null || _a === undefined ? undefined : _a.updatePreview();
|
|
16453
16469
|
this._subject.emitEvent({
|
|
16454
16470
|
type: "pan",
|
|
16455
16471
|
x: absoluteX,
|
|
@@ -16521,7 +16537,7 @@
|
|
|
16521
16537
|
const viewer = this._m_module.getViewer();
|
|
16522
16538
|
viewer.zoomAt(zoomFactor, x, y);
|
|
16523
16539
|
this._subject.deviceAutoRegeneration();
|
|
16524
|
-
(_a = this._subject.activeDragger()) === null || _a ===
|
|
16540
|
+
(_a = this._subject.activeDragger()) === null || _a === undefined ? undefined : _a.updatePreview();
|
|
16525
16541
|
this._subject.emitEvent({
|
|
16526
16542
|
type: "zoomat",
|
|
16527
16543
|
data: zoomFactor,
|
|
@@ -17698,7 +17714,7 @@
|
|
|
17698
17714
|
dispose() {
|
|
17699
17715
|
var _a;
|
|
17700
17716
|
super.dispose();
|
|
17701
|
-
(_a = this.textRef) === null || _a ===
|
|
17717
|
+
(_a = this.textRef) === null || _a === undefined ? undefined : _a.remove();
|
|
17702
17718
|
this.textRef = null;
|
|
17703
17719
|
}
|
|
17704
17720
|
_finishInput() {
|
|
@@ -17706,7 +17722,7 @@
|
|
|
17706
17722
|
if (this.textRef && this.textRef.value.trimLeft()) {
|
|
17707
17723
|
this._updateFrame();
|
|
17708
17724
|
}
|
|
17709
|
-
(_a = this.textRef) === null || _a ===
|
|
17725
|
+
(_a = this.textRef) === null || _a === undefined ? undefined : _a.remove();
|
|
17710
17726
|
this.textRef = null;
|
|
17711
17727
|
}
|
|
17712
17728
|
start(x, y, absoluteX, absoluteY) {
|
|
@@ -17751,7 +17767,7 @@
|
|
|
17751
17767
|
const projMtrx = view.projectionMatrix;
|
|
17752
17768
|
const mtrxNumber = projMtrx.get(1, 1);
|
|
17753
17769
|
const tol = 1.0e-6;
|
|
17754
|
-
if (!(mtrxNumber < tol && mtrxNumber > -
|
|
17770
|
+
if (!(mtrxNumber < tol && mtrxNumber > -1e-6)) {
|
|
17755
17771
|
textScale = 1 / mtrxNumber;
|
|
17756
17772
|
}
|
|
17757
17773
|
const geomData = entityPtr.appendText(this.toGePoint(this.m_center), this.textRef.value.trimLeft());
|
|
@@ -18044,7 +18060,7 @@
|
|
|
18044
18060
|
this.registerDragger("Walk", OdaWalkDragger);
|
|
18045
18061
|
this.canvasEvents = CANVAS_EVENTS.slice();
|
|
18046
18062
|
this.canvaseventlistener = (event) => this.emit(event);
|
|
18047
|
-
this._enableAutoUpdate = (_a = params.enableAutoUpdate) !== null && _a !==
|
|
18063
|
+
this._enableAutoUpdate = (_a = params.enableAutoUpdate) !== null && _a !== undefined ? _a : true;
|
|
18048
18064
|
this._isNeedRender = false;
|
|
18049
18065
|
this._isRunAsyncUpdate = false;
|
|
18050
18066
|
this.render = this.render.bind(this);
|
|
@@ -18082,7 +18098,7 @@
|
|
|
18082
18098
|
* `Viewer.visualize` library you are using.
|
|
18083
18099
|
*/
|
|
18084
18100
|
configure(params) {
|
|
18085
|
-
this._visualizeJsUrl = params.visualizeJsUrl || "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/
|
|
18101
|
+
this._visualizeJsUrl = params.visualizeJsUrl || "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/25.12/Visualize.js";
|
|
18086
18102
|
return this;
|
|
18087
18103
|
}
|
|
18088
18104
|
/**
|
|
@@ -18187,7 +18203,7 @@
|
|
|
18187
18203
|
const visViewer = this.visualizeJs.getViewer();
|
|
18188
18204
|
if (visViewer.isRunningAnimation() || this._isNeedRender) {
|
|
18189
18205
|
visViewer.update();
|
|
18190
|
-
(_a = this._activeDragger) === null || _a ===
|
|
18206
|
+
(_a = this._activeDragger) === null || _a === undefined ? undefined : _a.updatePreview();
|
|
18191
18207
|
this._isNeedRender = !visViewer.getActiveDevice().isValid();
|
|
18192
18208
|
const deltaTime = (time - this._renderTime) / 1000;
|
|
18193
18209
|
this._renderTime = time;
|
|
@@ -18225,8 +18241,8 @@
|
|
|
18225
18241
|
var _a, _b;
|
|
18226
18242
|
if (this._enableAutoUpdate) {
|
|
18227
18243
|
if (force) {
|
|
18228
|
-
(_a = this.visViewer()) === null || _a ===
|
|
18229
|
-
(_b = this.activeDragger()) === null || _b ===
|
|
18244
|
+
(_a = this.visViewer()) === null || _a === undefined ? undefined : _a.update();
|
|
18245
|
+
(_b = this.activeDragger()) === null || _b === undefined ? undefined : _b.updatePreview();
|
|
18230
18246
|
}
|
|
18231
18247
|
else {
|
|
18232
18248
|
this._isNeedRender = true;
|
|
@@ -18303,7 +18319,7 @@
|
|
|
18303
18319
|
*/
|
|
18304
18320
|
visViewer() {
|
|
18305
18321
|
var _a;
|
|
18306
|
-
return (_a = this.visualizeJs) === null || _a ===
|
|
18322
|
+
return (_a = this.visualizeJs) === null || _a === undefined ? undefined : _a.getViewer();
|
|
18307
18323
|
}
|
|
18308
18324
|
// update the VisualizeJS options
|
|
18309
18325
|
syncOpenCloudVisualStyle(isInitializing) {
|
|
@@ -18476,7 +18492,7 @@
|
|
|
18476
18492
|
}
|
|
18477
18493
|
setActiveDragger(name = "") {
|
|
18478
18494
|
var _a;
|
|
18479
|
-
if (((_a = this._activeDragger) === null || _a ===
|
|
18495
|
+
if (((_a = this._activeDragger) === null || _a === undefined ? undefined : _a.name) !== name) {
|
|
18480
18496
|
if (this._activeDragger) {
|
|
18481
18497
|
this._activeDragger.dispose();
|
|
18482
18498
|
this._activeDragger = null;
|
|
@@ -18584,13 +18600,13 @@
|
|
|
18584
18600
|
const projMatrix = this.visViewer().activeView.projectionMatrix;
|
|
18585
18601
|
const tolerance = 1.0e-6;
|
|
18586
18602
|
const x = projMatrix.get(0, 0);
|
|
18587
|
-
if (x > tolerance || x < -
|
|
18603
|
+
if (x > tolerance || x < -1e-6)
|
|
18588
18604
|
result.x = 1 / x;
|
|
18589
18605
|
const y = projMatrix.get(1, 1);
|
|
18590
|
-
if (y > tolerance || y < -
|
|
18606
|
+
if (y > tolerance || y < -1e-6)
|
|
18591
18607
|
result.y = 1 / y;
|
|
18592
18608
|
const z = projMatrix.get(2, 2);
|
|
18593
|
-
if (z > tolerance || z < -
|
|
18609
|
+
if (z > tolerance || z < -1e-6)
|
|
18594
18610
|
result.z = 1 / z;
|
|
18595
18611
|
return result;
|
|
18596
18612
|
}
|
|
@@ -18626,7 +18642,7 @@
|
|
|
18626
18642
|
if (!this.client)
|
|
18627
18643
|
return this;
|
|
18628
18644
|
const abortController = new AbortController();
|
|
18629
|
-
(_a = this._abortControllerForReferences) === null || _a ===
|
|
18645
|
+
(_a = this._abortControllerForReferences) === null || _a === undefined ? undefined : _a.abort();
|
|
18630
18646
|
this._abortControllerForReferences = abortController;
|
|
18631
18647
|
let references = [];
|
|
18632
18648
|
await model
|
|
@@ -18636,7 +18652,7 @@
|
|
|
18636
18652
|
for (const file of references) {
|
|
18637
18653
|
await this.client
|
|
18638
18654
|
.downloadFile(file.id, undefined, abortController.signal)
|
|
18639
|
-
.then((arrayBuffer) => { var _a; return (_a = this.visualizeJs) === null || _a ===
|
|
18655
|
+
.then((arrayBuffer) => { var _a; return (_a = this.visualizeJs) === null || _a === undefined ? undefined : _a.getViewer().addEmbeddedFile(file.name, new Uint8Array(arrayBuffer)); })
|
|
18640
18656
|
.catch((e) => console.error(`Cannot load reference file ${file.name}.`, e));
|
|
18641
18657
|
}
|
|
18642
18658
|
return this;
|
|
@@ -18817,11 +18833,11 @@
|
|
|
18817
18833
|
}
|
|
18818
18834
|
cancel() {
|
|
18819
18835
|
var _a, _b, _c;
|
|
18820
|
-
(_a = this._abortControllerForReferences) === null || _a ===
|
|
18836
|
+
(_a = this._abortControllerForReferences) === null || _a === undefined ? undefined : _a.abort();
|
|
18821
18837
|
this._abortControllerForReferences = undefined;
|
|
18822
|
-
(_b = this._abortController) === null || _b ===
|
|
18838
|
+
(_b = this._abortController) === null || _b === undefined ? undefined : _b.abort();
|
|
18823
18839
|
this._abortController = undefined;
|
|
18824
|
-
(_c = this._abortControllerForRequestMap) === null || _c ===
|
|
18840
|
+
(_c = this._abortControllerForRequestMap) === null || _c === undefined ? undefined : _c.forEach((controller) => controller.abort());
|
|
18825
18841
|
this._abortControllerForRequestMap = undefined;
|
|
18826
18842
|
this.emitEvent({ type: "cancel" });
|
|
18827
18843
|
return this;
|
|
@@ -18894,7 +18910,7 @@
|
|
|
18894
18910
|
var _a;
|
|
18895
18911
|
if (!this.visualizeJs)
|
|
18896
18912
|
return;
|
|
18897
|
-
const draggerName = (_a = this._activeDragger) === null || _a ===
|
|
18913
|
+
const draggerName = (_a = this._activeDragger) === null || _a === undefined ? undefined : _a.name;
|
|
18898
18914
|
this.setActiveDragger();
|
|
18899
18915
|
this.clearSlices();
|
|
18900
18916
|
this.clearOverlay();
|
|
@@ -18976,7 +18992,7 @@
|
|
|
18976
18992
|
return this.getSelected().map((handle) => ({ handle }));
|
|
18977
18993
|
}
|
|
18978
18994
|
setSelection(selection) {
|
|
18979
|
-
this.setSelected(selection === null || selection ===
|
|
18995
|
+
this.setSelected(selection === null || selection === undefined ? undefined : selection.map((component) => component.handle));
|
|
18980
18996
|
}
|
|
18981
18997
|
/**
|
|
18982
18998
|
* Executes the command denoted by the given command. If the command is not found, tries to
|