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