@wcardinal/wcardinal-ui 0.310.0 → 0.311.0
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/types/wcardinal/ui/shape/e-shape-points-formatters.d.ts +9 -0
- package/dist/types/wcardinal/ui/shape/e-shape-points-style.d.ts +11 -1
- package/dist/types/wcardinal/ui/shape/index.d.ts +2 -0
- package/dist/wcardinal/ui/shape/e-shape-points-formatters.js +33 -0
- package/dist/wcardinal/ui/shape/e-shape-points-formatters.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-points-style.js +16 -1
- package/dist/wcardinal/ui/shape/e-shape-points-style.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +2 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-line-points.js +2 -7
- package/dist/wcardinal/ui/shape/variant/e-shape-line-points.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +395 -354
- package/dist/wcardinal-ui.js +395 -354
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.311.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -1369,6 +1369,17 @@ var DASHED = 128;
|
|
|
1369
1369
|
var DASHED_DENSELY = 256;
|
|
1370
1370
|
var DASHED_LOOSELY = 512;
|
|
1371
1371
|
var CURVE = 1024;
|
|
1372
|
+
var FORMATTER_SHIFT = 10;
|
|
1373
|
+
var FORMATTER_MASK = 0xffc00;
|
|
1374
|
+
var FORMATTER_EXTENSION_LOWEST = 512;
|
|
1375
|
+
var FORMATTER_EXTENSION_HIGHEST = 1023;
|
|
1376
|
+
var FORMATTER_CURVE = 1;
|
|
1377
|
+
/**
|
|
1378
|
+
* EShape point style.
|
|
1379
|
+
*
|
|
1380
|
+
* * Bits 0 to 9: Bit field of styles.
|
|
1381
|
+
* * Bits 10 to 19: Formatter ID.
|
|
1382
|
+
*/
|
|
1372
1383
|
var EShapePointsStyle = {
|
|
1373
1384
|
NONE: 0,
|
|
1374
1385
|
CLOSED: CLOSED,
|
|
@@ -1397,7 +1408,11 @@ var EShapePointsStyle = {
|
|
|
1397
1408
|
/** @deprecated in favor of EShapeStrokeStyle. */
|
|
1398
1409
|
DASHED_MASK: DASHED | DASHED_DENSELY | DASHED_LOOSELY,
|
|
1399
1410
|
CURVE: CURVE,
|
|
1400
|
-
|
|
1411
|
+
FORMATTER_SHIFT: FORMATTER_SHIFT,
|
|
1412
|
+
FORMATTER_MASK: FORMATTER_MASK,
|
|
1413
|
+
FORMATTER_EXTENSION_LOWEST: FORMATTER_EXTENSION_LOWEST,
|
|
1414
|
+
FORMATTER_EXTENSION_HIGHEST: FORMATTER_EXTENSION_HIGHEST,
|
|
1415
|
+
FORMATTER_CURVE: FORMATTER_CURVE
|
|
1401
1416
|
};
|
|
1402
1417
|
|
|
1403
1418
|
var buildColor = function (color, alpha, voffset, vcount, colors) {
|
|
@@ -18237,6 +18252,366 @@ var toIndexOf = function (array, value) {
|
|
|
18237
18252
|
return -1;
|
|
18238
18253
|
};
|
|
18239
18254
|
|
|
18255
|
+
/*
|
|
18256
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
18257
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
18258
|
+
*/
|
|
18259
|
+
var toPointsBoundary = function (values, result) {
|
|
18260
|
+
var valuesLength = values.length;
|
|
18261
|
+
if (2 <= valuesLength) {
|
|
18262
|
+
var xmin = values[0];
|
|
18263
|
+
var ymin = values[1];
|
|
18264
|
+
var xmax = xmin;
|
|
18265
|
+
var ymax = ymin;
|
|
18266
|
+
for (var i = 2, imax = values.length; i < imax; i += 2) {
|
|
18267
|
+
var x = values[i];
|
|
18268
|
+
var y = values[i + 1];
|
|
18269
|
+
xmin = Math.min(xmin, x);
|
|
18270
|
+
ymin = Math.min(ymin, y);
|
|
18271
|
+
xmax = Math.max(xmax, x);
|
|
18272
|
+
ymax = Math.max(ymax, y);
|
|
18273
|
+
}
|
|
18274
|
+
result[0] = xmin;
|
|
18275
|
+
result[1] = ymin;
|
|
18276
|
+
result[2] = xmax;
|
|
18277
|
+
result[3] = ymax;
|
|
18278
|
+
}
|
|
18279
|
+
else {
|
|
18280
|
+
result[0] = 0;
|
|
18281
|
+
result[1] = 0;
|
|
18282
|
+
result[2] = 0;
|
|
18283
|
+
result[3] = 0;
|
|
18284
|
+
}
|
|
18285
|
+
return result;
|
|
18286
|
+
};
|
|
18287
|
+
|
|
18288
|
+
/*
|
|
18289
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
18290
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
18291
|
+
*/
|
|
18292
|
+
var EShapePointsMarkerBase = /** @class */ (function () {
|
|
18293
|
+
function EShapePointsMarkerBase(parent) {
|
|
18294
|
+
var _this = this;
|
|
18295
|
+
this._parent = parent;
|
|
18296
|
+
this._lockCount = 0;
|
|
18297
|
+
this._isTypeChanged = false;
|
|
18298
|
+
this._isSizeChanged = false;
|
|
18299
|
+
this._isFillChanged = false;
|
|
18300
|
+
this._type = EShapePointsMarkerType.NONE;
|
|
18301
|
+
this._size = new pixi_js.ObservablePoint(function () {
|
|
18302
|
+
_this.onSizeChange();
|
|
18303
|
+
}, undefined, EShapeDefaults.SIZE_X * 0.15, EShapeDefaults.SIZE_Y * 0.15);
|
|
18304
|
+
this._fill = this.newFill();
|
|
18305
|
+
this._transformId = 0;
|
|
18306
|
+
}
|
|
18307
|
+
EShapePointsMarkerBase.prototype.newFill = function () {
|
|
18308
|
+
return new EShapeFillImpl(this, true, EShapeDefaults.FILL_COLOR, 1);
|
|
18309
|
+
};
|
|
18310
|
+
EShapePointsMarkerBase.prototype.lock = function () {
|
|
18311
|
+
this._lockCount += 1;
|
|
18312
|
+
if (this._lockCount === 1) {
|
|
18313
|
+
this._isTypeChanged = false;
|
|
18314
|
+
this._isSizeChanged = false;
|
|
18315
|
+
this._isFillChanged = false;
|
|
18316
|
+
}
|
|
18317
|
+
return this;
|
|
18318
|
+
};
|
|
18319
|
+
EShapePointsMarkerBase.prototype.unlock = function () {
|
|
18320
|
+
this._lockCount -= 1;
|
|
18321
|
+
if (this._lockCount === 0) {
|
|
18322
|
+
if (this._isTypeChanged) {
|
|
18323
|
+
this.onTypeChange();
|
|
18324
|
+
}
|
|
18325
|
+
else if (this._isSizeChanged) {
|
|
18326
|
+
this.onSizeChange();
|
|
18327
|
+
}
|
|
18328
|
+
else if (this._isFillChanged) {
|
|
18329
|
+
this.onFillChange();
|
|
18330
|
+
}
|
|
18331
|
+
this._isTypeChanged = false;
|
|
18332
|
+
this._isSizeChanged = false;
|
|
18333
|
+
this._isFillChanged = false;
|
|
18334
|
+
}
|
|
18335
|
+
return this;
|
|
18336
|
+
};
|
|
18337
|
+
Object.defineProperty(EShapePointsMarkerBase.prototype, "type", {
|
|
18338
|
+
get: function () {
|
|
18339
|
+
return this._type;
|
|
18340
|
+
},
|
|
18341
|
+
set: function (type) {
|
|
18342
|
+
if (this._type !== type) {
|
|
18343
|
+
this._type = type;
|
|
18344
|
+
this.onTypeChange();
|
|
18345
|
+
}
|
|
18346
|
+
},
|
|
18347
|
+
enumerable: false,
|
|
18348
|
+
configurable: true
|
|
18349
|
+
});
|
|
18350
|
+
EShapePointsMarkerBase.prototype.onTypeChange = function () {
|
|
18351
|
+
if (0 < this._lockCount) {
|
|
18352
|
+
this._isTypeChanged = true;
|
|
18353
|
+
return;
|
|
18354
|
+
}
|
|
18355
|
+
this._parent.onTypeChange();
|
|
18356
|
+
};
|
|
18357
|
+
Object.defineProperty(EShapePointsMarkerBase.prototype, "size", {
|
|
18358
|
+
get: function () {
|
|
18359
|
+
return this._size;
|
|
18360
|
+
},
|
|
18361
|
+
enumerable: false,
|
|
18362
|
+
configurable: true
|
|
18363
|
+
});
|
|
18364
|
+
EShapePointsMarkerBase.prototype.onSizeChange = function () {
|
|
18365
|
+
if (0 < this._lockCount) {
|
|
18366
|
+
this._isSizeChanged = true;
|
|
18367
|
+
return;
|
|
18368
|
+
}
|
|
18369
|
+
this._parent.onSizeChange();
|
|
18370
|
+
};
|
|
18371
|
+
Object.defineProperty(EShapePointsMarkerBase.prototype, "transform", {
|
|
18372
|
+
get: function () {
|
|
18373
|
+
return this.updateTransform();
|
|
18374
|
+
},
|
|
18375
|
+
enumerable: false,
|
|
18376
|
+
configurable: true
|
|
18377
|
+
});
|
|
18378
|
+
EShapePointsMarkerBase.prototype.updateTransform = function () {
|
|
18379
|
+
var result = this._transform;
|
|
18380
|
+
if (result == null) {
|
|
18381
|
+
result = new pixi_js.Matrix();
|
|
18382
|
+
this._transform = result;
|
|
18383
|
+
}
|
|
18384
|
+
var parentParent = this._parent.parent;
|
|
18385
|
+
var id = parentParent.id;
|
|
18386
|
+
if (this._transformId !== id) {
|
|
18387
|
+
this._transformId = id;
|
|
18388
|
+
var formatted = parentParent.formatted;
|
|
18389
|
+
if (2 <= formatted.length) {
|
|
18390
|
+
this.toTransform(formatted.values, result);
|
|
18391
|
+
}
|
|
18392
|
+
else {
|
|
18393
|
+
result.identity();
|
|
18394
|
+
}
|
|
18395
|
+
}
|
|
18396
|
+
return result;
|
|
18397
|
+
};
|
|
18398
|
+
EShapePointsMarkerBase.prototype.toTransformMatrix = function (x0, y0, x1, y1, result) {
|
|
18399
|
+
var dx = x0 - x1;
|
|
18400
|
+
var dy = y0 - y1;
|
|
18401
|
+
var n = dx * dx + dy * dy;
|
|
18402
|
+
if (0.00001 < n) {
|
|
18403
|
+
var f = 1 / Math.sqrt(n);
|
|
18404
|
+
var nx = dx * f;
|
|
18405
|
+
var ny = dy * f;
|
|
18406
|
+
result.set(ny, -nx, -nx, -ny, x0, y0);
|
|
18407
|
+
}
|
|
18408
|
+
else {
|
|
18409
|
+
result.set(1, 0, 0, 1, x0, y0);
|
|
18410
|
+
}
|
|
18411
|
+
return result;
|
|
18412
|
+
};
|
|
18413
|
+
Object.defineProperty(EShapePointsMarkerBase.prototype, "fill", {
|
|
18414
|
+
get: function () {
|
|
18415
|
+
return this._fill;
|
|
18416
|
+
},
|
|
18417
|
+
enumerable: false,
|
|
18418
|
+
configurable: true
|
|
18419
|
+
});
|
|
18420
|
+
EShapePointsMarkerBase.prototype.onFillChange = function () {
|
|
18421
|
+
if (0 < this._lockCount) {
|
|
18422
|
+
this._isFillChanged = true;
|
|
18423
|
+
return;
|
|
18424
|
+
}
|
|
18425
|
+
this._parent.onFillChange();
|
|
18426
|
+
};
|
|
18427
|
+
EShapePointsMarkerBase.prototype.updateUploaded = function () {
|
|
18428
|
+
this.onFillChange();
|
|
18429
|
+
};
|
|
18430
|
+
EShapePointsMarkerBase.prototype.copy = function (source) {
|
|
18431
|
+
var size = source.size;
|
|
18432
|
+
this.set(source.type, size.x, size.y);
|
|
18433
|
+
return this;
|
|
18434
|
+
};
|
|
18435
|
+
EShapePointsMarkerBase.prototype.set = function (type, sizeX, sizeY) {
|
|
18436
|
+
this.lock();
|
|
18437
|
+
if (type != null) {
|
|
18438
|
+
this.type = type;
|
|
18439
|
+
}
|
|
18440
|
+
this.size.set(sizeX, sizeY);
|
|
18441
|
+
this.unlock();
|
|
18442
|
+
return this;
|
|
18443
|
+
};
|
|
18444
|
+
EShapePointsMarkerBase.prototype.serialize = function (manager) {
|
|
18445
|
+
var size = this._size;
|
|
18446
|
+
var fillId = this._fill.serialize(manager);
|
|
18447
|
+
return manager.addResource("[".concat(this._type, ",").concat(size.x, ",").concat(size.y, ",").concat(fillId, "]"));
|
|
18448
|
+
};
|
|
18449
|
+
EShapePointsMarkerBase.prototype.deserialize = function (resourceId, manager) {
|
|
18450
|
+
var resources = manager.resources;
|
|
18451
|
+
if (0 <= resourceId && resourceId < resources.length) {
|
|
18452
|
+
var parsed = manager.getExtension(resourceId);
|
|
18453
|
+
if (parsed == null) {
|
|
18454
|
+
parsed = JSON.parse(resources[resourceId]);
|
|
18455
|
+
manager.setExtension(resourceId, parsed);
|
|
18456
|
+
}
|
|
18457
|
+
this.lock();
|
|
18458
|
+
this.type = parsed[0];
|
|
18459
|
+
this._size.set(parsed[1], parsed[2]);
|
|
18460
|
+
this._fill.deserialize(parsed[3], manager);
|
|
18461
|
+
this.unlock();
|
|
18462
|
+
}
|
|
18463
|
+
};
|
|
18464
|
+
return EShapePointsMarkerBase;
|
|
18465
|
+
}());
|
|
18466
|
+
|
|
18467
|
+
var EShapePointsMarkerHead = /** @class */ (function (_super) {
|
|
18468
|
+
__extends(EShapePointsMarkerHead, _super);
|
|
18469
|
+
function EShapePointsMarkerHead() {
|
|
18470
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
18471
|
+
}
|
|
18472
|
+
EShapePointsMarkerHead.prototype.toTransform = function (values, result) {
|
|
18473
|
+
var valuesLength = values.length;
|
|
18474
|
+
if (4 <= valuesLength) {
|
|
18475
|
+
return this.toTransformMatrix(values[valuesLength - 2], values[valuesLength - 1], values[valuesLength - 4], values[valuesLength - 3], result);
|
|
18476
|
+
}
|
|
18477
|
+
else {
|
|
18478
|
+
result.identity();
|
|
18479
|
+
}
|
|
18480
|
+
return result;
|
|
18481
|
+
};
|
|
18482
|
+
return EShapePointsMarkerHead;
|
|
18483
|
+
}(EShapePointsMarkerBase));
|
|
18484
|
+
|
|
18485
|
+
var EShapePointsMarkerTail = /** @class */ (function (_super) {
|
|
18486
|
+
__extends(EShapePointsMarkerTail, _super);
|
|
18487
|
+
function EShapePointsMarkerTail() {
|
|
18488
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
18489
|
+
}
|
|
18490
|
+
EShapePointsMarkerTail.prototype.toTransform = function (values, result) {
|
|
18491
|
+
var valuesLength = values.length;
|
|
18492
|
+
if (4 <= valuesLength) {
|
|
18493
|
+
return this.toTransformMatrix(values[0], values[1], values[2], values[3], result);
|
|
18494
|
+
}
|
|
18495
|
+
else {
|
|
18496
|
+
result.identity();
|
|
18497
|
+
}
|
|
18498
|
+
return result;
|
|
18499
|
+
};
|
|
18500
|
+
return EShapePointsMarkerTail;
|
|
18501
|
+
}(EShapePointsMarkerBase));
|
|
18502
|
+
|
|
18503
|
+
/*
|
|
18504
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
18505
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
18506
|
+
*/
|
|
18507
|
+
var EShapePointsMarkerContainerImpl = /** @class */ (function () {
|
|
18508
|
+
function EShapePointsMarkerContainerImpl(parent) {
|
|
18509
|
+
this._parent = parent;
|
|
18510
|
+
this._lockCount = 0;
|
|
18511
|
+
this._isTypeChanged = false;
|
|
18512
|
+
this._isSizeChanged = false;
|
|
18513
|
+
this._isFillChanged = false;
|
|
18514
|
+
this._head = new EShapePointsMarkerHead(this);
|
|
18515
|
+
this._tail = new EShapePointsMarkerTail(this);
|
|
18516
|
+
}
|
|
18517
|
+
EShapePointsMarkerContainerImpl.prototype.lock = function () {
|
|
18518
|
+
this._lockCount += 1;
|
|
18519
|
+
if (this._lockCount === 1) {
|
|
18520
|
+
this._isTypeChanged = false;
|
|
18521
|
+
this._isSizeChanged = false;
|
|
18522
|
+
this._isFillChanged = false;
|
|
18523
|
+
}
|
|
18524
|
+
return this;
|
|
18525
|
+
};
|
|
18526
|
+
EShapePointsMarkerContainerImpl.prototype.unlock = function () {
|
|
18527
|
+
this._lockCount -= 1;
|
|
18528
|
+
if (this._lockCount === 0) {
|
|
18529
|
+
if (this._isTypeChanged) {
|
|
18530
|
+
this.onTypeChange();
|
|
18531
|
+
}
|
|
18532
|
+
else if (this._isSizeChanged) {
|
|
18533
|
+
this.onSizeChange();
|
|
18534
|
+
}
|
|
18535
|
+
else if (this._isFillChanged) {
|
|
18536
|
+
this.onFillChange();
|
|
18537
|
+
}
|
|
18538
|
+
this._isTypeChanged = false;
|
|
18539
|
+
this._isSizeChanged = false;
|
|
18540
|
+
this._isFillChanged = false;
|
|
18541
|
+
}
|
|
18542
|
+
return this;
|
|
18543
|
+
};
|
|
18544
|
+
Object.defineProperty(EShapePointsMarkerContainerImpl.prototype, "parent", {
|
|
18545
|
+
get: function () {
|
|
18546
|
+
return this._parent;
|
|
18547
|
+
},
|
|
18548
|
+
enumerable: false,
|
|
18549
|
+
configurable: true
|
|
18550
|
+
});
|
|
18551
|
+
Object.defineProperty(EShapePointsMarkerContainerImpl.prototype, "head", {
|
|
18552
|
+
get: function () {
|
|
18553
|
+
return this._head;
|
|
18554
|
+
},
|
|
18555
|
+
enumerable: false,
|
|
18556
|
+
configurable: true
|
|
18557
|
+
});
|
|
18558
|
+
Object.defineProperty(EShapePointsMarkerContainerImpl.prototype, "tail", {
|
|
18559
|
+
get: function () {
|
|
18560
|
+
return this._tail;
|
|
18561
|
+
},
|
|
18562
|
+
enumerable: false,
|
|
18563
|
+
configurable: true
|
|
18564
|
+
});
|
|
18565
|
+
EShapePointsMarkerContainerImpl.prototype.onTypeChange = function () {
|
|
18566
|
+
if (0 < this._lockCount) {
|
|
18567
|
+
this._isTypeChanged = true;
|
|
18568
|
+
return;
|
|
18569
|
+
}
|
|
18570
|
+
this._parent.onMarkerTypeChange();
|
|
18571
|
+
};
|
|
18572
|
+
EShapePointsMarkerContainerImpl.prototype.onSizeChange = function () {
|
|
18573
|
+
if (0 < this._lockCount) {
|
|
18574
|
+
this._isSizeChanged = true;
|
|
18575
|
+
return;
|
|
18576
|
+
}
|
|
18577
|
+
this._parent.onMarkerSizeChange();
|
|
18578
|
+
};
|
|
18579
|
+
EShapePointsMarkerContainerImpl.prototype.onFillChange = function () {
|
|
18580
|
+
if (0 < this._lockCount) {
|
|
18581
|
+
this._isFillChanged = true;
|
|
18582
|
+
return;
|
|
18583
|
+
}
|
|
18584
|
+
this._parent.onMarkerFillChange();
|
|
18585
|
+
};
|
|
18586
|
+
EShapePointsMarkerContainerImpl.prototype.copy = function (source) {
|
|
18587
|
+
this.lock();
|
|
18588
|
+
this._head.copy(source.head);
|
|
18589
|
+
this._tail.copy(source.tail);
|
|
18590
|
+
this.unlock();
|
|
18591
|
+
return this;
|
|
18592
|
+
};
|
|
18593
|
+
EShapePointsMarkerContainerImpl.prototype.serialize = function (manager) {
|
|
18594
|
+
var headId = this._head.serialize(manager);
|
|
18595
|
+
var tailId = this._tail.serialize(manager);
|
|
18596
|
+
return manager.addResource("[".concat(headId, ",").concat(tailId, "]"));
|
|
18597
|
+
};
|
|
18598
|
+
EShapePointsMarkerContainerImpl.prototype.deserialize = function (resourceId, manager) {
|
|
18599
|
+
var resources = manager.resources;
|
|
18600
|
+
if (0 <= resourceId && resourceId < resources.length) {
|
|
18601
|
+
var parsed = manager.getExtension(resourceId);
|
|
18602
|
+
if (parsed == null) {
|
|
18603
|
+
parsed = JSON.parse(resources[resourceId]);
|
|
18604
|
+
manager.setExtension(resourceId, parsed);
|
|
18605
|
+
}
|
|
18606
|
+
this.lock();
|
|
18607
|
+
this._head.deserialize(parsed[0], manager);
|
|
18608
|
+
this._tail.deserialize(parsed[1], manager);
|
|
18609
|
+
this.unlock();
|
|
18610
|
+
}
|
|
18611
|
+
};
|
|
18612
|
+
return EShapePointsMarkerContainerImpl;
|
|
18613
|
+
}());
|
|
18614
|
+
|
|
18240
18615
|
/*
|
|
18241
18616
|
* Copyright (C) 2019 Toshiba Corporation
|
|
18242
18617
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -18632,360 +19007,30 @@ var eShapePointsFormatterCurve = function (length, values, segments, style, resu
|
|
|
18632
19007
|
* Copyright (C) 2019 Toshiba Corporation
|
|
18633
19008
|
* SPDX-License-Identifier: Apache-2.0
|
|
18634
19009
|
*/
|
|
18635
|
-
var
|
|
18636
|
-
|
|
18637
|
-
if (2 <= valuesLength) {
|
|
18638
|
-
var xmin = values[0];
|
|
18639
|
-
var ymin = values[1];
|
|
18640
|
-
var xmax = xmin;
|
|
18641
|
-
var ymax = ymin;
|
|
18642
|
-
for (var i = 2, imax = values.length; i < imax; i += 2) {
|
|
18643
|
-
var x = values[i];
|
|
18644
|
-
var y = values[i + 1];
|
|
18645
|
-
xmin = Math.min(xmin, x);
|
|
18646
|
-
ymin = Math.min(ymin, y);
|
|
18647
|
-
xmax = Math.max(xmax, x);
|
|
18648
|
-
ymax = Math.max(ymax, y);
|
|
18649
|
-
}
|
|
18650
|
-
result[0] = xmin;
|
|
18651
|
-
result[1] = ymin;
|
|
18652
|
-
result[2] = xmax;
|
|
18653
|
-
result[3] = ymax;
|
|
19010
|
+
var EShapePointsFormatters = /** @class */ (function () {
|
|
19011
|
+
function EShapePointsFormatters() {
|
|
18654
19012
|
}
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
result[2] = 0;
|
|
18659
|
-
result[3] = 0;
|
|
18660
|
-
}
|
|
18661
|
-
return result;
|
|
18662
|
-
};
|
|
18663
|
-
|
|
18664
|
-
/*
|
|
18665
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
18666
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18667
|
-
*/
|
|
18668
|
-
var EShapePointsMarkerBase = /** @class */ (function () {
|
|
18669
|
-
function EShapePointsMarkerBase(parent) {
|
|
18670
|
-
var _this = this;
|
|
18671
|
-
this._parent = parent;
|
|
18672
|
-
this._lockCount = 0;
|
|
18673
|
-
this._isTypeChanged = false;
|
|
18674
|
-
this._isSizeChanged = false;
|
|
18675
|
-
this._isFillChanged = false;
|
|
18676
|
-
this._type = EShapePointsMarkerType.NONE;
|
|
18677
|
-
this._size = new pixi_js.ObservablePoint(function () {
|
|
18678
|
-
_this.onSizeChange();
|
|
18679
|
-
}, undefined, EShapeDefaults.SIZE_X * 0.15, EShapeDefaults.SIZE_Y * 0.15);
|
|
18680
|
-
this._fill = this.newFill();
|
|
18681
|
-
this._transformId = 0;
|
|
18682
|
-
}
|
|
18683
|
-
EShapePointsMarkerBase.prototype.newFill = function () {
|
|
18684
|
-
return new EShapeFillImpl(this, true, EShapeDefaults.FILL_COLOR, 1);
|
|
18685
|
-
};
|
|
18686
|
-
EShapePointsMarkerBase.prototype.lock = function () {
|
|
18687
|
-
this._lockCount += 1;
|
|
18688
|
-
if (this._lockCount === 1) {
|
|
18689
|
-
this._isTypeChanged = false;
|
|
18690
|
-
this._isSizeChanged = false;
|
|
18691
|
-
this._isFillChanged = false;
|
|
18692
|
-
}
|
|
18693
|
-
return this;
|
|
18694
|
-
};
|
|
18695
|
-
EShapePointsMarkerBase.prototype.unlock = function () {
|
|
18696
|
-
this._lockCount -= 1;
|
|
18697
|
-
if (this._lockCount === 0) {
|
|
18698
|
-
if (this._isTypeChanged) {
|
|
18699
|
-
this.onTypeChange();
|
|
18700
|
-
}
|
|
18701
|
-
else if (this._isSizeChanged) {
|
|
18702
|
-
this.onSizeChange();
|
|
18703
|
-
}
|
|
18704
|
-
else if (this._isFillChanged) {
|
|
18705
|
-
this.onFillChange();
|
|
18706
|
-
}
|
|
18707
|
-
this._isTypeChanged = false;
|
|
18708
|
-
this._isSizeChanged = false;
|
|
18709
|
-
this._isFillChanged = false;
|
|
18710
|
-
}
|
|
18711
|
-
return this;
|
|
18712
|
-
};
|
|
18713
|
-
Object.defineProperty(EShapePointsMarkerBase.prototype, "type", {
|
|
18714
|
-
get: function () {
|
|
18715
|
-
return this._type;
|
|
18716
|
-
},
|
|
18717
|
-
set: function (type) {
|
|
18718
|
-
if (this._type !== type) {
|
|
18719
|
-
this._type = type;
|
|
18720
|
-
this.onTypeChange();
|
|
18721
|
-
}
|
|
18722
|
-
},
|
|
18723
|
-
enumerable: false,
|
|
18724
|
-
configurable: true
|
|
18725
|
-
});
|
|
18726
|
-
EShapePointsMarkerBase.prototype.onTypeChange = function () {
|
|
18727
|
-
if (0 < this._lockCount) {
|
|
18728
|
-
this._isTypeChanged = true;
|
|
18729
|
-
return;
|
|
18730
|
-
}
|
|
18731
|
-
this._parent.onTypeChange();
|
|
18732
|
-
};
|
|
18733
|
-
Object.defineProperty(EShapePointsMarkerBase.prototype, "size", {
|
|
18734
|
-
get: function () {
|
|
18735
|
-
return this._size;
|
|
18736
|
-
},
|
|
18737
|
-
enumerable: false,
|
|
18738
|
-
configurable: true
|
|
18739
|
-
});
|
|
18740
|
-
EShapePointsMarkerBase.prototype.onSizeChange = function () {
|
|
18741
|
-
if (0 < this._lockCount) {
|
|
18742
|
-
this._isSizeChanged = true;
|
|
18743
|
-
return;
|
|
18744
|
-
}
|
|
18745
|
-
this._parent.onSizeChange();
|
|
18746
|
-
};
|
|
18747
|
-
Object.defineProperty(EShapePointsMarkerBase.prototype, "transform", {
|
|
18748
|
-
get: function () {
|
|
18749
|
-
return this.updateTransform();
|
|
18750
|
-
},
|
|
18751
|
-
enumerable: false,
|
|
18752
|
-
configurable: true
|
|
18753
|
-
});
|
|
18754
|
-
EShapePointsMarkerBase.prototype.updateTransform = function () {
|
|
18755
|
-
var result = this._transform;
|
|
18756
|
-
if (result == null) {
|
|
18757
|
-
result = new pixi_js.Matrix();
|
|
18758
|
-
this._transform = result;
|
|
18759
|
-
}
|
|
18760
|
-
var parentParent = this._parent.parent;
|
|
18761
|
-
var id = parentParent.id;
|
|
18762
|
-
if (this._transformId !== id) {
|
|
18763
|
-
this._transformId = id;
|
|
18764
|
-
var formatted = parentParent.formatted;
|
|
18765
|
-
if (2 <= formatted.length) {
|
|
18766
|
-
this.toTransform(formatted.values, result);
|
|
18767
|
-
}
|
|
18768
|
-
else {
|
|
18769
|
-
result.identity();
|
|
18770
|
-
}
|
|
18771
|
-
}
|
|
18772
|
-
return result;
|
|
18773
|
-
};
|
|
18774
|
-
EShapePointsMarkerBase.prototype.toTransformMatrix = function (x0, y0, x1, y1, result) {
|
|
18775
|
-
var dx = x0 - x1;
|
|
18776
|
-
var dy = y0 - y1;
|
|
18777
|
-
var n = dx * dx + dy * dy;
|
|
18778
|
-
if (0.00001 < n) {
|
|
18779
|
-
var f = 1 / Math.sqrt(n);
|
|
18780
|
-
var nx = dx * f;
|
|
18781
|
-
var ny = dy * f;
|
|
18782
|
-
result.set(ny, -nx, -nx, -ny, x0, y0);
|
|
18783
|
-
}
|
|
18784
|
-
else {
|
|
18785
|
-
result.set(1, 0, 0, 1, x0, y0);
|
|
18786
|
-
}
|
|
18787
|
-
return result;
|
|
18788
|
-
};
|
|
18789
|
-
Object.defineProperty(EShapePointsMarkerBase.prototype, "fill", {
|
|
18790
|
-
get: function () {
|
|
18791
|
-
return this._fill;
|
|
18792
|
-
},
|
|
18793
|
-
enumerable: false,
|
|
18794
|
-
configurable: true
|
|
18795
|
-
});
|
|
18796
|
-
EShapePointsMarkerBase.prototype.onFillChange = function () {
|
|
18797
|
-
if (0 < this._lockCount) {
|
|
18798
|
-
this._isFillChanged = true;
|
|
18799
|
-
return;
|
|
18800
|
-
}
|
|
18801
|
-
this._parent.onFillChange();
|
|
18802
|
-
};
|
|
18803
|
-
EShapePointsMarkerBase.prototype.updateUploaded = function () {
|
|
18804
|
-
this.onFillChange();
|
|
18805
|
-
};
|
|
18806
|
-
EShapePointsMarkerBase.prototype.copy = function (source) {
|
|
18807
|
-
var size = source.size;
|
|
18808
|
-
this.set(source.type, size.x, size.y);
|
|
18809
|
-
return this;
|
|
18810
|
-
};
|
|
18811
|
-
EShapePointsMarkerBase.prototype.set = function (type, sizeX, sizeY) {
|
|
18812
|
-
this.lock();
|
|
18813
|
-
if (type != null) {
|
|
18814
|
-
this.type = type;
|
|
19013
|
+
EShapePointsFormatters.set = function (id, formatter) {
|
|
19014
|
+
if (this.FORMATTERS == null) {
|
|
19015
|
+
this.FORMATTERS = this.newFormatters();
|
|
18815
19016
|
}
|
|
18816
|
-
this.
|
|
18817
|
-
this.unlock();
|
|
18818
|
-
return this;
|
|
19017
|
+
this.FORMATTERS.set(id, formatter);
|
|
18819
19018
|
};
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
return manager.addResource("[".concat(this._type, ",").concat(size.x, ",").concat(size.y, ",").concat(fillId, "]"));
|
|
18824
|
-
};
|
|
18825
|
-
EShapePointsMarkerBase.prototype.deserialize = function (resourceId, manager) {
|
|
18826
|
-
var resources = manager.resources;
|
|
18827
|
-
if (0 <= resourceId && resourceId < resources.length) {
|
|
18828
|
-
var parsed = manager.getExtension(resourceId);
|
|
18829
|
-
if (parsed == null) {
|
|
18830
|
-
parsed = JSON.parse(resources[resourceId]);
|
|
18831
|
-
manager.setExtension(resourceId, parsed);
|
|
18832
|
-
}
|
|
18833
|
-
this.lock();
|
|
18834
|
-
this.type = parsed[0];
|
|
18835
|
-
this._size.set(parsed[1], parsed[2]);
|
|
18836
|
-
this._fill.deserialize(parsed[3], manager);
|
|
18837
|
-
this.unlock();
|
|
19019
|
+
EShapePointsFormatters.get = function (index) {
|
|
19020
|
+
if (this.FORMATTERS == null) {
|
|
19021
|
+
this.FORMATTERS = this.newFormatters();
|
|
18838
19022
|
}
|
|
19023
|
+
return this.FORMATTERS.get(index);
|
|
18839
19024
|
};
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
var EShapePointsMarkerHead = /** @class */ (function (_super) {
|
|
18844
|
-
__extends(EShapePointsMarkerHead, _super);
|
|
18845
|
-
function EShapePointsMarkerHead() {
|
|
18846
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18847
|
-
}
|
|
18848
|
-
EShapePointsMarkerHead.prototype.toTransform = function (values, result) {
|
|
18849
|
-
var valuesLength = values.length;
|
|
18850
|
-
if (4 <= valuesLength) {
|
|
18851
|
-
return this.toTransformMatrix(values[valuesLength - 2], values[valuesLength - 1], values[valuesLength - 4], values[valuesLength - 3], result);
|
|
18852
|
-
}
|
|
18853
|
-
else {
|
|
18854
|
-
result.identity();
|
|
18855
|
-
}
|
|
18856
|
-
return result;
|
|
19025
|
+
EShapePointsFormatters.find = function (style) {
|
|
19026
|
+
return this.get((style & EShapePointsStyle.FORMATTER_MASK) >> EShapePointsStyle.FORMATTER_SHIFT);
|
|
18857
19027
|
};
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
var EShapePointsMarkerTail = /** @class */ (function (_super) {
|
|
18862
|
-
__extends(EShapePointsMarkerTail, _super);
|
|
18863
|
-
function EShapePointsMarkerTail() {
|
|
18864
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18865
|
-
}
|
|
18866
|
-
EShapePointsMarkerTail.prototype.toTransform = function (values, result) {
|
|
18867
|
-
var valuesLength = values.length;
|
|
18868
|
-
if (4 <= valuesLength) {
|
|
18869
|
-
return this.toTransformMatrix(values[0], values[1], values[2], values[3], result);
|
|
18870
|
-
}
|
|
18871
|
-
else {
|
|
18872
|
-
result.identity();
|
|
18873
|
-
}
|
|
19028
|
+
EShapePointsFormatters.newFormatters = function () {
|
|
19029
|
+
var result = new Map();
|
|
19030
|
+
result.set(EShapePointsStyle.FORMATTER_CURVE, eShapePointsFormatterCurve);
|
|
18874
19031
|
return result;
|
|
18875
19032
|
};
|
|
18876
|
-
return
|
|
18877
|
-
}(EShapePointsMarkerBase));
|
|
18878
|
-
|
|
18879
|
-
/*
|
|
18880
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
18881
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18882
|
-
*/
|
|
18883
|
-
var EShapePointsMarkerContainerImpl = /** @class */ (function () {
|
|
18884
|
-
function EShapePointsMarkerContainerImpl(parent) {
|
|
18885
|
-
this._parent = parent;
|
|
18886
|
-
this._lockCount = 0;
|
|
18887
|
-
this._isTypeChanged = false;
|
|
18888
|
-
this._isSizeChanged = false;
|
|
18889
|
-
this._isFillChanged = false;
|
|
18890
|
-
this._head = new EShapePointsMarkerHead(this);
|
|
18891
|
-
this._tail = new EShapePointsMarkerTail(this);
|
|
18892
|
-
}
|
|
18893
|
-
EShapePointsMarkerContainerImpl.prototype.lock = function () {
|
|
18894
|
-
this._lockCount += 1;
|
|
18895
|
-
if (this._lockCount === 1) {
|
|
18896
|
-
this._isTypeChanged = false;
|
|
18897
|
-
this._isSizeChanged = false;
|
|
18898
|
-
this._isFillChanged = false;
|
|
18899
|
-
}
|
|
18900
|
-
return this;
|
|
18901
|
-
};
|
|
18902
|
-
EShapePointsMarkerContainerImpl.prototype.unlock = function () {
|
|
18903
|
-
this._lockCount -= 1;
|
|
18904
|
-
if (this._lockCount === 0) {
|
|
18905
|
-
if (this._isTypeChanged) {
|
|
18906
|
-
this.onTypeChange();
|
|
18907
|
-
}
|
|
18908
|
-
else if (this._isSizeChanged) {
|
|
18909
|
-
this.onSizeChange();
|
|
18910
|
-
}
|
|
18911
|
-
else if (this._isFillChanged) {
|
|
18912
|
-
this.onFillChange();
|
|
18913
|
-
}
|
|
18914
|
-
this._isTypeChanged = false;
|
|
18915
|
-
this._isSizeChanged = false;
|
|
18916
|
-
this._isFillChanged = false;
|
|
18917
|
-
}
|
|
18918
|
-
return this;
|
|
18919
|
-
};
|
|
18920
|
-
Object.defineProperty(EShapePointsMarkerContainerImpl.prototype, "parent", {
|
|
18921
|
-
get: function () {
|
|
18922
|
-
return this._parent;
|
|
18923
|
-
},
|
|
18924
|
-
enumerable: false,
|
|
18925
|
-
configurable: true
|
|
18926
|
-
});
|
|
18927
|
-
Object.defineProperty(EShapePointsMarkerContainerImpl.prototype, "head", {
|
|
18928
|
-
get: function () {
|
|
18929
|
-
return this._head;
|
|
18930
|
-
},
|
|
18931
|
-
enumerable: false,
|
|
18932
|
-
configurable: true
|
|
18933
|
-
});
|
|
18934
|
-
Object.defineProperty(EShapePointsMarkerContainerImpl.prototype, "tail", {
|
|
18935
|
-
get: function () {
|
|
18936
|
-
return this._tail;
|
|
18937
|
-
},
|
|
18938
|
-
enumerable: false,
|
|
18939
|
-
configurable: true
|
|
18940
|
-
});
|
|
18941
|
-
EShapePointsMarkerContainerImpl.prototype.onTypeChange = function () {
|
|
18942
|
-
if (0 < this._lockCount) {
|
|
18943
|
-
this._isTypeChanged = true;
|
|
18944
|
-
return;
|
|
18945
|
-
}
|
|
18946
|
-
this._parent.onMarkerTypeChange();
|
|
18947
|
-
};
|
|
18948
|
-
EShapePointsMarkerContainerImpl.prototype.onSizeChange = function () {
|
|
18949
|
-
if (0 < this._lockCount) {
|
|
18950
|
-
this._isSizeChanged = true;
|
|
18951
|
-
return;
|
|
18952
|
-
}
|
|
18953
|
-
this._parent.onMarkerSizeChange();
|
|
18954
|
-
};
|
|
18955
|
-
EShapePointsMarkerContainerImpl.prototype.onFillChange = function () {
|
|
18956
|
-
if (0 < this._lockCount) {
|
|
18957
|
-
this._isFillChanged = true;
|
|
18958
|
-
return;
|
|
18959
|
-
}
|
|
18960
|
-
this._parent.onMarkerFillChange();
|
|
18961
|
-
};
|
|
18962
|
-
EShapePointsMarkerContainerImpl.prototype.copy = function (source) {
|
|
18963
|
-
this.lock();
|
|
18964
|
-
this._head.copy(source.head);
|
|
18965
|
-
this._tail.copy(source.tail);
|
|
18966
|
-
this.unlock();
|
|
18967
|
-
return this;
|
|
18968
|
-
};
|
|
18969
|
-
EShapePointsMarkerContainerImpl.prototype.serialize = function (manager) {
|
|
18970
|
-
var headId = this._head.serialize(manager);
|
|
18971
|
-
var tailId = this._tail.serialize(manager);
|
|
18972
|
-
return manager.addResource("[".concat(headId, ",").concat(tailId, "]"));
|
|
18973
|
-
};
|
|
18974
|
-
EShapePointsMarkerContainerImpl.prototype.deserialize = function (resourceId, manager) {
|
|
18975
|
-
var resources = manager.resources;
|
|
18976
|
-
if (0 <= resourceId && resourceId < resources.length) {
|
|
18977
|
-
var parsed = manager.getExtension(resourceId);
|
|
18978
|
-
if (parsed == null) {
|
|
18979
|
-
parsed = JSON.parse(resources[resourceId]);
|
|
18980
|
-
manager.setExtension(resourceId, parsed);
|
|
18981
|
-
}
|
|
18982
|
-
this.lock();
|
|
18983
|
-
this._head.deserialize(parsed[0], manager);
|
|
18984
|
-
this._tail.deserialize(parsed[1], manager);
|
|
18985
|
-
this.unlock();
|
|
18986
|
-
}
|
|
18987
|
-
};
|
|
18988
|
-
return EShapePointsMarkerContainerImpl;
|
|
19033
|
+
return EShapePointsFormatters;
|
|
18989
19034
|
}());
|
|
18990
19035
|
|
|
18991
19036
|
/*
|
|
@@ -19200,12 +19245,7 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
19200
19245
|
if (this._formattedId !== id) {
|
|
19201
19246
|
this._formattedId = id;
|
|
19202
19247
|
var style = this._style;
|
|
19203
|
-
var formatter = this._formatter;
|
|
19204
|
-
if (formatter == null) {
|
|
19205
|
-
if (style & EShapePointsStyle.CURVE) {
|
|
19206
|
-
formatter = eShapePointsFormatterCurve;
|
|
19207
|
-
}
|
|
19208
|
-
}
|
|
19248
|
+
var formatter = this._formatter || EShapePointsFormatters.find(style);
|
|
19209
19249
|
if (formatter != null) {
|
|
19210
19250
|
if (result == null) {
|
|
19211
19251
|
result = {
|
|
@@ -93828,6 +93868,7 @@ exports.EShapeButtonRuntimeAction = EShapeButtonRuntimeAction;
|
|
|
93828
93868
|
exports.EShapeButtonRuntimeActionToggle = EShapeButtonRuntimeActionToggle;
|
|
93829
93869
|
exports.EShapeCapabilities = EShapeCapabilities;
|
|
93830
93870
|
exports.EShapeCapability = EShapeCapability;
|
|
93871
|
+
exports.EShapeCapabilityContainerImpl = EShapeCapabilityContainerImpl;
|
|
93831
93872
|
exports.EShapeCircle = EShapeCircle;
|
|
93832
93873
|
exports.EShapeConnectorBodies = EShapeConnectorBodies;
|
|
93833
93874
|
exports.EShapeConnectorBodyImpl = EShapeConnectorBodyImpl;
|