@wcardinal/wcardinal-ui 0.200.2 → 0.202.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.
Files changed (225) hide show
  1. package/dist/types/wcardinal/ui/{d-controller-default-command.d.ts → d-controller-command-impl.d.ts} +1 -1
  2. package/dist/types/wcardinal/ui/{d-controller-default-focus.d.ts → d-controller-focus-impl.d.ts} +1 -1
  3. package/dist/types/wcardinal/ui/d-diagram-base.d.ts +1 -0
  4. package/dist/types/wcardinal/ui/d-diagram-canvas-data-impl.d.ts +7 -4
  5. package/dist/types/wcardinal/ui/d-diagram-canvas-data.d.ts +7 -4
  6. package/dist/types/wcardinal/ui/d-diagram-canvas.d.ts +2 -3
  7. package/dist/types/wcardinal/ui/d-diagram-data-extended-impl.d.ts +2 -1
  8. package/dist/types/wcardinal/ui/d-diagram-data-impl.d.ts +7 -4
  9. package/dist/types/wcardinal/ui/d-diagram-data-private-impl.d.ts +2 -1
  10. package/dist/types/wcardinal/ui/d-diagram-data-protected-impl.d.ts +2 -1
  11. package/dist/types/wcardinal/ui/d-diagram-data-remote-impl.d.ts +1 -1
  12. package/dist/types/wcardinal/ui/d-diagram-data-remote.d.ts +1 -1
  13. package/dist/types/wcardinal/ui/d-diagram-data-scoped.d.ts +2 -1
  14. package/dist/types/wcardinal/ui/d-diagram-data.d.ts +5 -2
  15. package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +4 -0
  16. package/dist/types/wcardinal/ui/d-table-body-cell-color.d.ts +1 -1
  17. package/dist/types/wcardinal/ui/d-table-body-cell-options.d.ts +18 -0
  18. package/dist/types/wcardinal/ui/d-table-body-cell-select-dialog.d.ts +1 -1
  19. package/dist/types/wcardinal/ui/d-table-body-cell-select-promise.d.ts +1 -1
  20. package/dist/types/wcardinal/ui/d-table-body-cell-time.d.ts +1 -1
  21. package/dist/types/wcardinal/ui/d-table-body-cells.d.ts +7 -5
  22. package/dist/types/wcardinal/ui/d-table-body-row.d.ts +6 -4
  23. package/dist/types/wcardinal/ui/d-table-body.d.ts +2 -0
  24. package/dist/types/wcardinal/ui/d-table-column-editing.d.ts +16 -0
  25. package/dist/types/wcardinal/ui/d-table-column-formatter.d.ts +1 -0
  26. package/dist/types/wcardinal/ui/d-table-column-getter.d.ts +1 -0
  27. package/dist/types/wcardinal/ui/d-table-column-renderable.d.ts +1 -0
  28. package/dist/types/wcardinal/ui/d-table-column-selecting.d.ts +25 -0
  29. package/dist/types/wcardinal/ui/d-table-column-setter.d.ts +1 -0
  30. package/dist/types/wcardinal/ui/d-table-column-sorting.d.ts +9 -0
  31. package/dist/types/wcardinal/ui/d-table-column-state.d.ts +11 -0
  32. package/dist/types/wcardinal/ui/d-table-column-type.d.ts +18 -0
  33. package/dist/types/wcardinal/ui/d-table-column.d.ts +33 -101
  34. package/dist/types/wcardinal/ui/index.d.ts +12 -2
  35. package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtimes.d.ts +7 -15
  36. package/dist/types/wcardinal/ui/shape/e-shape-data-impl.d.ts +7 -0
  37. package/dist/types/wcardinal/ui/shape/e-shape-data-scoped-impl.d.ts +2 -1
  38. package/dist/types/wcardinal/ui/shape/e-shape-data-scoped.d.ts +2 -1
  39. package/dist/types/wcardinal/ui/shape/e-shape-data-value-formatter.d.ts +1 -0
  40. package/dist/types/wcardinal/ui/shape/e-shape-data-value-impl.d.ts +10 -1
  41. package/dist/types/wcardinal/ui/shape/e-shape-data-value-state.d.ts +32 -0
  42. package/dist/types/wcardinal/ui/shape/e-shape-data-value.d.ts +6 -1
  43. package/dist/types/wcardinal/ui/shape/e-shape-data.d.ts +4 -0
  44. package/dist/types/wcardinal/ui/shape/index.d.ts +2 -0
  45. package/dist/types/wcardinal/ui/shape/variant/build-text.d.ts +2 -1
  46. package/dist/types/wcardinal/ui/shape/variant/builder-text.d.ts +2 -0
  47. package/dist/types/wcardinal/ui/shape/variant/e-shape-embedded-layer.d.ts +1 -1
  48. package/dist/types/wcardinal/ui/shape/variant/e-shape-embedded.d.ts +1 -1
  49. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +2 -4
  50. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.d.ts +2 -0
  51. package/dist/types/wcardinal/ui/theme/white/d-theme-white-table-header-cell.d.ts +2 -0
  52. package/dist/types/wcardinal/ui/util/index.d.ts +3 -0
  53. package/dist/types/wcardinal/ui/util/is-object.d.ts +1 -0
  54. package/dist/types/wcardinal/ui/util/to-cloned.d.ts +1 -0
  55. package/dist/types/wcardinal/ui/util/to-merged.d.ts +1 -0
  56. package/dist/wcardinal/ui/d-application.js +2 -2
  57. package/dist/wcardinal/ui/d-application.js.map +1 -1
  58. package/dist/wcardinal/ui/d-base.js +2 -2
  59. package/dist/wcardinal/ui/d-base.js.map +1 -1
  60. package/dist/wcardinal/ui/{d-controller-default-command.js → d-controller-command-impl.js} +24 -24
  61. package/dist/wcardinal/ui/d-controller-command-impl.js.map +1 -0
  62. package/dist/wcardinal/ui/{d-controller-default-focus.js → d-controller-focus-impl.js} +18 -18
  63. package/dist/wcardinal/ui/d-controller-focus-impl.js.map +1 -0
  64. package/dist/wcardinal/ui/d-controllers.js +2 -2
  65. package/dist/wcardinal/ui/d-controllers.js.map +1 -1
  66. package/dist/wcardinal/ui/d-diagram-base.js.map +1 -1
  67. package/dist/wcardinal/ui/d-diagram-canvas-data-impl.js +50 -16
  68. package/dist/wcardinal/ui/d-diagram-canvas-data-impl.js.map +1 -1
  69. package/dist/wcardinal/ui/d-diagram-canvas-data.js.map +1 -1
  70. package/dist/wcardinal/ui/d-diagram-canvas.js +13 -16
  71. package/dist/wcardinal/ui/d-diagram-canvas.js.map +1 -1
  72. package/dist/wcardinal/ui/d-diagram-data-extended-impl.js +2 -2
  73. package/dist/wcardinal/ui/d-diagram-data-extended-impl.js.map +1 -1
  74. package/dist/wcardinal/ui/d-diagram-data-impl.js +22 -8
  75. package/dist/wcardinal/ui/d-diagram-data-impl.js.map +1 -1
  76. package/dist/wcardinal/ui/d-diagram-data-private-impl.js +2 -2
  77. package/dist/wcardinal/ui/d-diagram-data-private-impl.js.map +1 -1
  78. package/dist/wcardinal/ui/d-diagram-data-protected-impl.js +2 -2
  79. package/dist/wcardinal/ui/d-diagram-data-protected-impl.js.map +1 -1
  80. package/dist/wcardinal/ui/d-diagram-data-remote-impl.js +1 -1
  81. package/dist/wcardinal/ui/d-diagram-data-remote-impl.js.map +1 -1
  82. package/dist/wcardinal/ui/d-diagram-data-remote.js.map +1 -1
  83. package/dist/wcardinal/ui/d-diagram-data-scoped.js.map +1 -1
  84. package/dist/wcardinal/ui/d-diagram-data.js.map +1 -1
  85. package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
  86. package/dist/wcardinal/ui/d-table-body-cell-action-menu.js +1 -3
  87. package/dist/wcardinal/ui/d-table-body-cell-action-menu.js.map +1 -1
  88. package/dist/wcardinal/ui/d-table-body-cell-check.js +2 -4
  89. package/dist/wcardinal/ui/d-table-body-cell-check.js.map +1 -1
  90. package/dist/wcardinal/ui/d-table-body-cell-color.js +17 -19
  91. package/dist/wcardinal/ui/d-table-body-cell-color.js.map +1 -1
  92. package/dist/wcardinal/ui/d-table-body-cell-date.js +1 -3
  93. package/dist/wcardinal/ui/d-table-body-cell-date.js.map +1 -1
  94. package/dist/wcardinal/ui/d-table-body-cell-datetime.js +2 -4
  95. package/dist/wcardinal/ui/d-table-body-cell-datetime.js.map +1 -1
  96. package/dist/wcardinal/ui/d-table-body-cell-index.js +1 -3
  97. package/dist/wcardinal/ui/d-table-body-cell-index.js.map +1 -1
  98. package/dist/wcardinal/ui/d-table-body-cell-input-integer.js +1 -3
  99. package/dist/wcardinal/ui/d-table-body-cell-input-integer.js.map +1 -1
  100. package/dist/wcardinal/ui/d-table-body-cell-input-real.js +1 -3
  101. package/dist/wcardinal/ui/d-table-body-cell-input-real.js.map +1 -1
  102. package/dist/wcardinal/ui/d-table-body-cell-input-text.js +1 -3
  103. package/dist/wcardinal/ui/d-table-body-cell-input-text.js.map +1 -1
  104. package/dist/wcardinal/ui/d-table-body-cell-input-tree.js +1 -3
  105. package/dist/wcardinal/ui/d-table-body-cell-input-tree.js.map +1 -1
  106. package/dist/wcardinal/ui/d-table-body-cell-options.js +6 -0
  107. package/dist/wcardinal/ui/d-table-body-cell-options.js.map +1 -0
  108. package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +1 -3
  109. package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js.map +1 -1
  110. package/dist/wcardinal/ui/d-table-body-cell-select-menu.js +1 -3
  111. package/dist/wcardinal/ui/d-table-body-cell-select-menu.js.map +1 -1
  112. package/dist/wcardinal/ui/d-table-body-cell-select-multiple.js +1 -3
  113. package/dist/wcardinal/ui/d-table-body-cell-select-multiple.js.map +1 -1
  114. package/dist/wcardinal/ui/d-table-body-cell-select-promise.js +1 -3
  115. package/dist/wcardinal/ui/d-table-body-cell-select-promise.js.map +1 -1
  116. package/dist/wcardinal/ui/d-table-body-cell-text.js +1 -3
  117. package/dist/wcardinal/ui/d-table-body-cell-text.js.map +1 -1
  118. package/dist/wcardinal/ui/d-table-body-cell-time.js +1 -3
  119. package/dist/wcardinal/ui/d-table-body-cell-time.js.map +1 -1
  120. package/dist/wcardinal/ui/d-table-body-cell-tree.js +1 -2
  121. package/dist/wcardinal/ui/d-table-body-cell-tree.js.map +1 -1
  122. package/dist/wcardinal/ui/d-table-body-cells.js +13 -5
  123. package/dist/wcardinal/ui/d-table-body-cells.js.map +1 -1
  124. package/dist/wcardinal/ui/d-table-body-row.js +43 -39
  125. package/dist/wcardinal/ui/d-table-body-row.js.map +1 -1
  126. package/dist/wcardinal/ui/d-table-body.js +2 -1
  127. package/dist/wcardinal/ui/d-table-body.js.map +1 -1
  128. package/dist/wcardinal/ui/d-table-column-editing.js +6 -0
  129. package/dist/wcardinal/ui/d-table-column-editing.js.map +1 -0
  130. package/dist/wcardinal/ui/d-table-column-formatter.js +6 -0
  131. package/dist/wcardinal/ui/d-table-column-formatter.js.map +1 -0
  132. package/dist/wcardinal/ui/d-table-column-getter.js +6 -0
  133. package/dist/wcardinal/ui/d-table-column-getter.js.map +1 -0
  134. package/dist/wcardinal/ui/d-table-column-renderable.js +6 -0
  135. package/dist/wcardinal/ui/d-table-column-renderable.js.map +1 -0
  136. package/dist/wcardinal/ui/d-table-column-selecting.js +6 -0
  137. package/dist/wcardinal/ui/d-table-column-selecting.js.map +1 -0
  138. package/dist/wcardinal/ui/d-table-column-setter.js +6 -0
  139. package/dist/wcardinal/ui/d-table-column-setter.js.map +1 -0
  140. package/dist/wcardinal/ui/d-table-column-sorting.js +6 -0
  141. package/dist/wcardinal/ui/d-table-column-sorting.js.map +1 -0
  142. package/dist/wcardinal/ui/d-table-column-state.js +6 -0
  143. package/dist/wcardinal/ui/d-table-column-state.js.map +1 -0
  144. package/dist/wcardinal/ui/d-table-column-type.js +22 -0
  145. package/dist/wcardinal/ui/d-table-column-type.js.map +1 -0
  146. package/dist/wcardinal/ui/d-table-column.js +1 -17
  147. package/dist/wcardinal/ui/d-table-column.js.map +1 -1
  148. package/dist/wcardinal/ui/d-table.js +23 -1
  149. package/dist/wcardinal/ui/d-table.js.map +1 -1
  150. package/dist/wcardinal/ui/index.js +12 -2
  151. package/dist/wcardinal/ui/index.js.map +1 -1
  152. package/dist/wcardinal/ui/shape/action/e-shape-action-expressions.js +2 -0
  153. package/dist/wcardinal/ui/shape/action/e-shape-action-expressions.js.map +1 -1
  154. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write-both.js +2 -2
  155. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write-both.js.map +1 -1
  156. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write-local.js +1 -1
  157. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write-local.js.map +1 -1
  158. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write-remote.js +1 -1
  159. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write-remote.js.map +1 -1
  160. package/dist/wcardinal/ui/shape/action/e-shape-action-runtimes.js +30 -29
  161. package/dist/wcardinal/ui/shape/action/e-shape-action-runtimes.js.map +1 -1
  162. package/dist/wcardinal/ui/shape/action/e-shape-action-value-on-input-actions.js +4 -4
  163. package/dist/wcardinal/ui/shape/action/e-shape-action-value-on-input-actions.js.map +1 -1
  164. package/dist/wcardinal/ui/shape/e-shape-data-impl.js +57 -0
  165. package/dist/wcardinal/ui/shape/e-shape-data-impl.js.map +1 -1
  166. package/dist/wcardinal/ui/shape/e-shape-data-scoped-impl.js +5 -1
  167. package/dist/wcardinal/ui/shape/e-shape-data-scoped-impl.js.map +1 -1
  168. package/dist/wcardinal/ui/shape/e-shape-data-scoped.js.map +1 -1
  169. package/dist/wcardinal/ui/shape/e-shape-data-value-formatter.js +6 -0
  170. package/dist/wcardinal/ui/shape/e-shape-data-value-formatter.js.map +1 -0
  171. package/dist/wcardinal/ui/shape/e-shape-data-value-impl.js +211 -56
  172. package/dist/wcardinal/ui/shape/e-shape-data-value-impl.js.map +1 -1
  173. package/dist/wcardinal/ui/shape/e-shape-data-value-state.js +36 -0
  174. package/dist/wcardinal/ui/shape/e-shape-data-value-state.js.map +1 -0
  175. package/dist/wcardinal/ui/shape/e-shape-data-value.js.map +1 -1
  176. package/dist/wcardinal/ui/shape/e-shape-data.js.map +1 -1
  177. package/dist/wcardinal/ui/shape/e-shape-runtime.js +4 -2
  178. package/dist/wcardinal/ui/shape/e-shape-runtime.js.map +1 -1
  179. package/dist/wcardinal/ui/shape/index.js +2 -0
  180. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  181. package/dist/wcardinal/ui/shape/variant/build-text.js +84 -63
  182. package/dist/wcardinal/ui/shape/variant/build-text.js.map +1 -1
  183. package/dist/wcardinal/ui/shape/variant/builder-text.js +18 -3
  184. package/dist/wcardinal/ui/shape/variant/builder-text.js.map +1 -1
  185. package/dist/wcardinal/ui/shape/variant/deserialize-embedded-layer.js +2 -3
  186. package/dist/wcardinal/ui/shape/variant/deserialize-embedded-layer.js.map +1 -1
  187. package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js +4 -3
  188. package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js.map +1 -1
  189. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +3 -1
  190. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  191. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-layer.js +3 -3
  192. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-layer.js.map +1 -1
  193. package/dist/wcardinal/ui/shape/variant/e-shape-embedded.js +3 -3
  194. package/dist/wcardinal/ui/shape/variant/e-shape-embedded.js.map +1 -1
  195. package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js +1 -1
  196. package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js.map +1 -1
  197. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +4 -18
  198. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
  199. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js +11 -0
  200. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js.map +1 -1
  201. package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js +11 -0
  202. package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js.map +1 -1
  203. package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js +1 -1
  204. package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js.map +1 -1
  205. package/dist/wcardinal/ui/util/index.js +3 -0
  206. package/dist/wcardinal/ui/util/index.js.map +1 -1
  207. package/dist/wcardinal/ui/util/is-object.js +13 -0
  208. package/dist/wcardinal/ui/util/is-object.js.map +1 -0
  209. package/dist/wcardinal/ui/util/to-cloned.js +32 -0
  210. package/dist/wcardinal/ui/util/to-cloned.js.map +1 -0
  211. package/dist/wcardinal/ui/util/to-merged.js +45 -0
  212. package/dist/wcardinal/ui/util/to-merged.js.map +1 -0
  213. package/dist/wcardinal-ui-theme-dark.js +12 -1
  214. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  215. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  216. package/dist/wcardinal-ui-theme-white.js +12 -1
  217. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  218. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  219. package/dist/wcardinal-ui.cjs.js +1451 -1014
  220. package/dist/wcardinal-ui.js +1429 -1014
  221. package/dist/wcardinal-ui.min.js +2 -2
  222. package/dist/wcardinal-ui.min.js.map +1 -1
  223. package/package.json +1 -1
  224. package/dist/wcardinal/ui/d-controller-default-command.js.map +0 -1
  225. package/dist/wcardinal/ui/d-controller-default-focus.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.200.2
2
+ Winter Cardinal UI v0.202.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -508,12 +508,12 @@ var buildTextIndex = function (indices, voffset, ioffset, icount) {
508
508
  iv += 4;
509
509
  }
510
510
  };
511
- var buildTextStep = function (steps, voffset, vcount, textAtlas, textSize, textOutlineWidth, textWeight) {
511
+ var buildTextStep = function (steps, voffset, vcount, textAtlas, textSize, textOutlineWidth, textWeight, scaleX, scaleY) {
512
512
  var is = voffset * 6 - 1;
513
513
  var ismax = (voffset + vcount) * 6 - 1;
514
514
  var scaleInvariant = toScaleInvariant(EShapeStrokeStyle.NONE);
515
515
  if (textAtlas != null) {
516
- var scale = textAtlas.font.size / textSize;
516
+ var scale = textAtlas.font.size / (textSize * (scaleX + scaleY) * 0.5);
517
517
  var position = textWeight === EShapeTextWeight.NORMAL ? 0.0 : 0.05;
518
518
  for (; is < ismax;) {
519
519
  steps[++is] = textOutlineWidth;
@@ -745,19 +745,6 @@ var getTextBBox = function (halign, valign, hoffset, voffset, hpadding, vpadding
745
745
  break;
746
746
  }
747
747
  };
748
- var toNormalized = function (dx, dy, defx, defy, result) {
749
- var d = dx * dx + dy * dy;
750
- if (TEXT_FMIN < d) {
751
- var l = Math.sqrt(d);
752
- var li = 1 / l;
753
- result.set(dx * li, dy * li);
754
- return l;
755
- }
756
- else {
757
- result.set(defx, defy);
758
- return 0;
759
- }
760
- };
761
748
  var rotateAlignHorizontalRight = function (align) {
762
749
  switch (align) {
763
750
  case EShapeTextAlignHorizontal.LEFT:
@@ -825,36 +812,78 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
825
812
  //
826
813
  var sx = sizeX * 0.5;
827
814
  var sy = sizeY * 0.5;
828
- var work = TEXT_WORK_POINT;
829
- work.set(originX - sx, originY - sy);
830
- internalTransform.apply(work, work);
831
- var x0 = work.x;
832
- var y0 = work.y;
833
- work.set(originX + sx, originY - sy);
834
- internalTransform.apply(work, work);
835
- var x1 = work.x;
836
- var y1 = work.y;
837
- work.set(originX + sx, originY + sy);
838
- internalTransform.apply(work, work);
839
- var x2 = work.x;
840
- var y2 = work.y;
815
+ var a = internalTransform.a;
816
+ var b = internalTransform.b;
817
+ var c = internalTransform.c;
818
+ var d = internalTransform.d;
819
+ var tx = internalTransform.tx;
820
+ var ty = internalTransform.ty;
821
+ var ltx = originX - sx;
822
+ var lty = originY - sy;
823
+ var rtx = originX + sx;
824
+ var rty = originY - sy;
825
+ var rbx = originX + sx;
826
+ var rby = originY + sy;
827
+ var x0 = a * ltx + c * lty + tx;
828
+ var y0 = b * ltx + d * lty + ty;
829
+ var x1 = a * rtx + c * rty + tx;
830
+ var y1 = b * rtx + d * rty + ty;
831
+ var x2 = a * rbx + c * rby + tx;
832
+ var y2 = b * rbx + d * rby + ty;
841
833
  var x3 = x0 + (x2 - x1);
842
834
  var y3 = y0 + (y2 - y1);
843
835
  // Horizontal normal
844
836
  var hl = toLength(x0, y0, x1, y1);
845
- toNormalized(internalTransform.a, internalTransform.b, 1, 0, work);
846
- var hnx = work.x;
847
- var hny = work.y;
837
+ var hnl = toLength(0, 0, a, b);
838
+ var hnx = 1;
839
+ var hny = 0;
840
+ if (TEXT_FMIN < hnl) {
841
+ var hnli = 1 / hnl;
842
+ hnx = a * hnli;
843
+ hny = b * hnli;
844
+ }
848
845
  // Vertical normal
849
846
  var vl = toLength(x0, y0, x3, y3);
850
- toNormalized(internalTransform.c, internalTransform.d, 0, 1, work);
851
- var vnx = work.x;
852
- var vny = work.y;
847
+ var vnl = toLength(0, 0, c, d);
848
+ var vnx = 0;
849
+ var vny = 1;
850
+ if (TEXT_FMIN < hnl) {
851
+ var vnli = 1 / vnl;
852
+ vnx = c * vnli;
853
+ vny = d * vnli;
854
+ }
855
+ var work = TEXT_WORK_POINT;
856
+ switch (textDirection) {
857
+ case EShapeTextDirection.LEFT_TO_RIGHT:
858
+ // DO NOTHING
859
+ break;
860
+ case EShapeTextDirection.TOP_TO_BOTTOM:
861
+ work.set(vnx, vny);
862
+ vnx = -hnx;
863
+ vny = -hny;
864
+ hnx = work.x;
865
+ hny = work.y;
866
+ work.x = vnl;
867
+ vnl = hnl;
868
+ hnl = work.x;
869
+ break;
870
+ case EShapeTextDirection.BOTTOM_TO_TOP:
871
+ work.set(vnx, vny);
872
+ vnx = hnx;
873
+ vny = hny;
874
+ hnx = -work.x;
875
+ hny = -work.y;
876
+ work.x = vnl;
877
+ vnl = hnl;
878
+ hnl = work.x;
879
+ break;
880
+ }
853
881
  // Calculate the width / height
854
882
  var width = 0;
855
883
  var height = 0;
856
884
  var heightChar = 0;
857
- var lineHeight = Math.max(0, textSize + textSpacingVertical);
885
+ var textSizeY = textSize * vnl;
886
+ var lineHeight = Math.max(0, textSize + textSpacingVertical) * vnl;
858
887
  var lineWidth = 0;
859
888
  var textAtlasCharacters = textAtlas.characters;
860
889
  var iterator = UtilCharacterIterator.from(textValue);
@@ -882,12 +911,14 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
882
911
  height += lineHeight;
883
912
  }
884
913
  }
885
- var scale = textSize / textAtlas.font.size;
914
+ var scaleZ = textSize / textAtlas.font.size;
915
+ var scaleX = hnl * scaleZ;
916
+ var scaleY = vnl * scaleZ;
886
917
  lineWidth += advancePrevious;
887
- width = Math.max(width, lineWidth) * scale;
918
+ width = Math.max(width, lineWidth) * scaleX;
888
919
  lineWidth = 0;
889
- heightChar *= scale;
890
- height += textSize;
920
+ heightChar *= scaleY;
921
+ height += textSizeY;
891
922
  //
892
923
  var tx0 = 0;
893
924
  var ty0 = 0;
@@ -914,13 +945,6 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
914
945
  }
915
946
  break;
916
947
  case EShapeTextDirection.TOP_TO_BOTTOM:
917
- // Swap normals
918
- work.set(vnx, vny);
919
- vnx = -hnx;
920
- vny = -hny;
921
- hnx = work.x;
922
- hny = work.y;
923
- // Get text bbox
924
948
  getTextBBox(rotateAlignVerticalRight(textAlignVertical), rotateAlignHorizontalRight(textAlignHorizontal), textOffsetVertical, textOffsetHorizontal, textPaddingVertical, textPaddingHorizontal, width, height, x1, y1, x2, y2, x3, y3, x0, y0, hnx, hny, vnx, vny, work);
925
949
  tx0 = work.x;
926
950
  ty0 = work.y;
@@ -941,13 +965,6 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
941
965
  }
942
966
  break;
943
967
  case EShapeTextDirection.BOTTOM_TO_TOP:
944
- // Swap normals
945
- work.set(vnx, vny);
946
- vnx = hnx;
947
- vny = hny;
948
- hnx = -work.x;
949
- hny = -work.y;
950
- // Get text bbox
951
968
  getTextBBox(rotateAlignVerticalLeft(textAlignVertical), rotateAlignHorizontalLeft(textAlignHorizontal), textOffsetVertical, textOffsetHorizontal, textPaddingVertical, textPaddingHorizontal, width, height, x3, y3, x0, y0, x1, y1, x2, y2, hnx, hny, vnx, vny, work);
952
969
  tx0 = work.x;
953
970
  ty0 = work.y;
@@ -979,6 +996,8 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
979
996
  textWorld[5] = vny;
980
997
  textWorld[6] = lineWidthMaximum;
981
998
  textWorld[7] = height;
999
+ textWorld[8] = hnl;
1000
+ textWorld[9] = vnl;
982
1001
  }
983
1002
  else {
984
1003
  textWorld[0] = tx0;
@@ -989,6 +1008,8 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
989
1008
  textWorld[5] = vny;
990
1009
  textWorld[6] = width;
991
1010
  textWorld[7] = height;
1011
+ textWorld[8] = hnl;
1012
+ textWorld[9] = vnl;
992
1013
  }
993
1014
  // Texture
994
1015
  var uvx0 = textureUvs.x0;
@@ -1004,16 +1025,16 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
1004
1025
  // Vertices & UVs
1005
1026
  var lhx = lineHeight * vnx;
1006
1027
  var lhy = lineHeight * vny;
1007
- var snx = scale * hnx;
1008
- var sny = scale * hny;
1009
- var offsetY = (heightChar - textSize) * 0.5;
1028
+ var snx = scaleX * hnx;
1029
+ var sny = scaleX * hny;
1030
+ var offsetY = (heightChar - textSizeY) * 0.5;
1010
1031
  var oyx = offsetY * vnx;
1011
1032
  var oyy = offsetY * vny;
1012
1033
  var offsetItalic = textStyle === EShapeTextStyle.NORMAL ? 0 : textSize * 0.25;
1013
1034
  var bx0 = tx0 - oyx + offsetItalic * snx;
1014
1035
  var by0 = ty0 - oyy + offsetItalic * sny;
1015
- var bx3 = tx0 + oyx + textSize * vnx;
1016
- var by3 = ty0 + oyy + textSize * vny;
1036
+ var bx3 = tx0 + oyx + textSizeY * vnx;
1037
+ var by3 = ty0 + oyy + textSizeY * vny;
1017
1038
  var cx0 = bx0;
1018
1039
  var cy0 = by0;
1019
1040
  var cx3 = bx3;
@@ -1040,11 +1061,11 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
1040
1061
  lineCount += 1;
1041
1062
  if (data) {
1042
1063
  var advance = data.advance;
1043
- if (lineWidthMaximum < (lineWidth + advance) * scale) {
1064
+ if (lineWidthMaximum < (lineWidth + advance) * scaleX) {
1044
1065
  var dots = textAtlasCharacters["..."];
1045
1066
  if (dots) {
1046
1067
  if (1 < lineCount &&
1047
- lineWidthMaximum < (lineWidth + dots.advance) * scale) {
1068
+ lineWidthMaximum < (lineWidth + dots.advance) * scaleX) {
1048
1069
  lineWidth = lineWidthPrevious;
1049
1070
  iv -= 8;
1050
1071
  lineCount -= 1;
@@ -1095,13 +1116,13 @@ var buildTextVertex = function (vertices, uvs, voffset, vcount, originX, originY
1095
1116
  cx3 = bx3;
1096
1117
  cy3 = by3;
1097
1118
  writeCharacterEmpty(vertices, uvs, iv, cx0, cy0, cx3, cy3, uvx0, uvy0, uvx3, uvy3);
1098
- adjustTextAlignment(vertices, hnx, hny, lineCount, iv, width - lineWidth * scale, textDirection, textAlignHorizontal, textAlignVertical);
1119
+ adjustTextAlignment(vertices, hnx, hny, lineCount, iv, width - lineWidth * scaleX, textDirection, textAlignHorizontal, textAlignVertical);
1099
1120
  lineWidth = 0;
1100
1121
  lineCount = 0;
1101
1122
  }
1102
1123
  }
1103
1124
  lineWidth += advancePrevious;
1104
- adjustTextAlignment(vertices, hnx, hny, lineCount, iv, width - lineWidth * scale, textDirection, textAlignHorizontal, textAlignVertical);
1125
+ adjustTextAlignment(vertices, hnx, hny, lineCount, iv, width - lineWidth * scaleX, textDirection, textAlignHorizontal, textAlignVertical);
1105
1126
  for (var ivmax = (voffset + vcount) * 2; iv < ivmax; iv += 2) {
1106
1127
  vertices[iv + 0] = tx0;
1107
1128
  vertices[iv + 1] = ty0;
@@ -4143,7 +4164,9 @@ var EShapeBase = /** @class */ (function (_super) {
4143
4164
  var ty = transform.b * x + transform.d * y + transform.ty - textWorld[1];
4144
4165
  var th = textWorld[2] * tx + textWorld[3] * ty;
4145
4166
  var tv = textWorld[4] * tx + textWorld[5] * ty;
4146
- if (0 <= th && th <= textWorld[6] && 0 <= tv && tv <= textWorld[7]) {
4167
+ var w = textWorld[6];
4168
+ var h = textWorld[7];
4169
+ if (0 <= th && th <= w && 0 <= tv && tv <= h) {
4147
4170
  return this;
4148
4171
  }
4149
4172
  }
@@ -4892,6 +4915,42 @@ var EShapeDataValueScope = {
4892
4915
  PROTECTED: 2
4893
4916
  };
4894
4917
 
4918
+ /*
4919
+ * Copyright (C) 2019 Toshiba Corporation
4920
+ * SPDX-License-Identifier: Apache-2.0
4921
+ */
4922
+ var EShapeDataValueState = {
4923
+ /**
4924
+ * The data status is not known.
4925
+ * This is the default state.
4926
+ */
4927
+ UNKOWN: -1,
4928
+ /**
4929
+ * The request succeeded.
4930
+ */
4931
+ FOUND: 0,
4932
+ /**
4933
+ * The server can not find the requested data.
4934
+ */
4935
+ NOT_FOUND: 1,
4936
+ /**
4937
+ * The settings or something provided by clients are considered incorrect.
4938
+ */
4939
+ BAD_REQUEST: 2,
4940
+ /**
4941
+ * The server has encountered unknown errors.
4942
+ */
4943
+ SERVER_ERROR: 3,
4944
+ /**
4945
+ * The server is not ready to handle the request.
4946
+ */
4947
+ SERVICE_UNAVAILABLE: 4,
4948
+ /**
4949
+ * A client is not allowed to access this data.
4950
+ */
4951
+ FORBIDDEN: 5
4952
+ };
4953
+
4895
4954
  /*
4896
4955
  * Copyright (C) 2019 Toshiba Corporation
4897
4956
  * SPDX-License-Identifier: Apache-2.0
@@ -4902,6 +4961,7 @@ var INDEX_COMPARATOR = function (a, b) {
4902
4961
  var EShapeDataValueImpl = /** @class */ (function () {
4903
4962
  function EShapeDataValueImpl() {
4904
4963
  this.id = "";
4964
+ this.as = "";
4905
4965
  this.type = EShapeDataValueType.NUMBER;
4906
4966
  this.scope = EShapeDataValueScope.PUBLIC;
4907
4967
  this.initial = "";
@@ -4909,6 +4969,7 @@ var EShapeDataValueImpl = /** @class */ (function () {
4909
4969
  this.range = new EShapeDataValueRangeImpl();
4910
4970
  this._value = 0;
4911
4971
  this._time = 0;
4972
+ this._state = EShapeDataValueState.UNKOWN;
4912
4973
  this._capacity = 0;
4913
4974
  this._order = EShapeDataValueOrder.ASCENDING;
4914
4975
  }
@@ -4999,10 +5060,11 @@ var EShapeDataValueImpl = /** @class */ (function () {
4999
5060
  return result;
5000
5061
  },
5001
5062
  set: function (newValues) {
5002
- if (0 < newValues.length) {
5063
+ var newValuesLength = newValues.length;
5064
+ if (0 < newValuesLength) {
5003
5065
  var capacity = this._capacity;
5004
5066
  if (capacity <= 0) {
5005
- var newValue = newValues[newValues.length - 1];
5067
+ var newValue = newValues[newValuesLength - 1];
5006
5068
  var formatter = this.formatter;
5007
5069
  if (formatter != null) {
5008
5070
  newValue = formatter(newValue);
@@ -5025,30 +5087,30 @@ var EShapeDataValueImpl = /** @class */ (function () {
5025
5087
  var formatter = this.formatter;
5026
5088
  if (formatter != null) {
5027
5089
  // Update the value
5028
- this._value = formatter(newValues[newValues.length - 1]);
5090
+ this._value = formatter(newValues[newValuesLength - 1]);
5029
5091
  // Update the values
5030
5092
  if (order === EShapeDataValueOrder.ASCENDING) {
5031
- for (var i = 0, imax = newValues.length; i < imax; ++i) {
5093
+ for (var i = 0; i < newValuesLength; ++i) {
5032
5094
  values.push(formatter(newValues[i]));
5033
5095
  }
5034
5096
  }
5035
5097
  else {
5036
- for (var i = 0, imax = newValues.length; i < imax; ++i) {
5098
+ for (var i = 0; i < newValuesLength; ++i) {
5037
5099
  values.unshift(formatter(newValues[i]));
5038
5100
  }
5039
5101
  }
5040
5102
  }
5041
5103
  else {
5042
5104
  // Update the value
5043
- this._value = newValues[newValues.length - 1];
5105
+ this._value = newValues[newValuesLength - 1];
5044
5106
  // Update the values
5045
5107
  if (order === EShapeDataValueOrder.ASCENDING) {
5046
- for (var i = 0, imax = newValues.length; i < imax; ++i) {
5108
+ for (var i = 0; i < newValuesLength; ++i) {
5047
5109
  values.push(newValues[i]);
5048
5110
  }
5049
5111
  }
5050
5112
  else {
5051
- for (var i = 0, imax = newValues.length; i < imax; ++i) {
5113
+ for (var i = 0; i < newValuesLength; ++i) {
5052
5114
  values.unshift(newValues[i]);
5053
5115
  }
5054
5116
  }
@@ -5140,10 +5202,11 @@ var EShapeDataValueImpl = /** @class */ (function () {
5140
5202
  return result;
5141
5203
  },
5142
5204
  set: function (newTimes) {
5143
- if (0 < newTimes.length) {
5205
+ var newTimesLength = newTimes.length;
5206
+ if (0 < newTimesLength) {
5144
5207
  var capacity = this._capacity;
5145
5208
  if (capacity <= 0) {
5146
- var newTime = newTimes[newTimes.length - 1];
5209
+ var newTime = newTimes[newTimesLength - 1];
5147
5210
  if (this._time !== newTime) {
5148
5211
  this._time = newTime;
5149
5212
  var parent_7 = this.parent;
@@ -5160,16 +5223,16 @@ var EShapeDataValueImpl = /** @class */ (function () {
5160
5223
  this._times = times;
5161
5224
  }
5162
5225
  // Update the value
5163
- this._time = newTimes[newTimes.length - 1];
5226
+ this._time = newTimes[newTimesLength - 1];
5164
5227
  //
5165
5228
  var order = this._order;
5166
5229
  if (order === EShapeDataValueOrder.ASCENDING) {
5167
- for (var i = 0, imax = newTimes.length; i < imax; ++i) {
5230
+ for (var i = 0; i < newTimesLength; ++i) {
5168
5231
  times.push(newTimes[i]);
5169
5232
  }
5170
5233
  }
5171
5234
  else {
5172
- for (var i = 0, imax = newTimes.length; i < imax; ++i) {
5235
+ for (var i = 0; i < newTimesLength; ++i) {
5173
5236
  times.unshift(newTimes[i]);
5174
5237
  }
5175
5238
  }
@@ -5196,6 +5259,127 @@ var EShapeDataValueImpl = /** @class */ (function () {
5196
5259
  enumerable: false,
5197
5260
  configurable: true
5198
5261
  });
5262
+ Object.defineProperty(EShapeDataValueImpl.prototype, "state", {
5263
+ get: function () {
5264
+ return this._state;
5265
+ },
5266
+ set: function (newState) {
5267
+ var capacity = this._capacity;
5268
+ if (capacity <= 0) {
5269
+ if (this._state !== newState) {
5270
+ this._state = newState;
5271
+ var parent_9 = this.parent;
5272
+ if (parent_9 != null) {
5273
+ parent_9.isChanged = true;
5274
+ }
5275
+ }
5276
+ }
5277
+ else {
5278
+ // Update the states
5279
+ var states = this._states;
5280
+ if (states == null) {
5281
+ states = [];
5282
+ this._states = states;
5283
+ }
5284
+ // Update the state
5285
+ this._state = newState;
5286
+ // Update the states
5287
+ var order = this._order;
5288
+ if (order === EShapeDataValueOrder.ASCENDING) {
5289
+ states.push(newState);
5290
+ }
5291
+ else {
5292
+ states.unshift(newState);
5293
+ }
5294
+ // Remove the unnecessary states
5295
+ var count = states.length - capacity;
5296
+ if (0 < count) {
5297
+ if (order === EShapeDataValueOrder.ASCENDING) {
5298
+ for (var i = 0; i < count; ++i) {
5299
+ states.shift();
5300
+ }
5301
+ }
5302
+ else {
5303
+ states.length = capacity;
5304
+ }
5305
+ }
5306
+ // Tell the parent it's changed
5307
+ var parent_10 = this.parent;
5308
+ if (parent_10 != null) {
5309
+ parent_10.isChanged = true;
5310
+ }
5311
+ }
5312
+ },
5313
+ enumerable: false,
5314
+ configurable: true
5315
+ });
5316
+ Object.defineProperty(EShapeDataValueImpl.prototype, "states", {
5317
+ get: function () {
5318
+ var result = this._states;
5319
+ if (result == null) {
5320
+ result = [];
5321
+ this._states = result;
5322
+ }
5323
+ return result;
5324
+ },
5325
+ set: function (newStates) {
5326
+ var newStatesLength = newStates.length;
5327
+ if (0 < newStatesLength) {
5328
+ var capacity = this._capacity;
5329
+ if (capacity <= 0) {
5330
+ var newState = newStates[newStatesLength - 1];
5331
+ if (this._state !== newState) {
5332
+ this._state = newState;
5333
+ var parent_11 = this.parent;
5334
+ if (parent_11 != null) {
5335
+ parent_11.isChanged = true;
5336
+ }
5337
+ }
5338
+ }
5339
+ else {
5340
+ // Update the states
5341
+ var states = this._states;
5342
+ if (states == null) {
5343
+ states = [];
5344
+ this._states = states;
5345
+ }
5346
+ // Update the value
5347
+ this._state = newStates[newStatesLength - 1];
5348
+ //
5349
+ var order = this._order;
5350
+ if (order === EShapeDataValueOrder.ASCENDING) {
5351
+ for (var i = 0; i < newStatesLength; ++i) {
5352
+ states.push(newStates[i]);
5353
+ }
5354
+ }
5355
+ else {
5356
+ for (var i = 0; i < newStatesLength; ++i) {
5357
+ states.unshift(newStates[i]);
5358
+ }
5359
+ }
5360
+ //
5361
+ var count = states.length - capacity;
5362
+ if (0 < count) {
5363
+ if (order === EShapeDataValueOrder.ASCENDING) {
5364
+ for (var i = 0; i < count; ++i) {
5365
+ states.shift();
5366
+ }
5367
+ }
5368
+ else {
5369
+ states.length = capacity;
5370
+ }
5371
+ }
5372
+ // Tell the parent it's changed
5373
+ var parent_12 = this.parent;
5374
+ if (parent_12 != null) {
5375
+ parent_12.isChanged = true;
5376
+ }
5377
+ }
5378
+ }
5379
+ },
5380
+ enumerable: false,
5381
+ configurable: true
5382
+ });
5199
5383
  Object.defineProperty(EShapeDataValueImpl.prototype, "capacity", {
5200
5384
  get: function () {
5201
5385
  return this._capacity;
@@ -5240,10 +5424,26 @@ var EShapeDataValueImpl = /** @class */ (function () {
5240
5424
  isChanged = true;
5241
5425
  }
5242
5426
  }
5427
+ // States
5428
+ var states = this._states;
5429
+ if (states != null) {
5430
+ var count = states.length - capacity;
5431
+ if (0 < count) {
5432
+ if (order === EShapeDataValueOrder.ASCENDING) {
5433
+ for (var i = 0; i < count; ++i) {
5434
+ states.shift();
5435
+ }
5436
+ }
5437
+ else {
5438
+ states.length = capacity;
5439
+ }
5440
+ isChanged = true;
5441
+ }
5442
+ }
5243
5443
  if (isChanged) {
5244
- var parent_9 = this.parent;
5245
- if (parent_9 != null) {
5246
- parent_9.isChanged = true;
5444
+ var parent_13 = this.parent;
5445
+ if (parent_13 != null) {
5446
+ parent_13.isChanged = true;
5247
5447
  }
5248
5448
  }
5249
5449
  }
@@ -5279,59 +5479,62 @@ var EShapeDataValueImpl = /** @class */ (function () {
5279
5479
  isChanged = true;
5280
5480
  }
5281
5481
  }
5482
+ // States
5483
+ var states = this._states;
5484
+ if (states != null) {
5485
+ if (0 <= index && index < states.length) {
5486
+ states.splice(index, 1);
5487
+ isChanged = true;
5488
+ }
5489
+ }
5282
5490
  if (isChanged) {
5283
- var parent_10 = this.parent;
5284
- if (parent_10 != null) {
5285
- parent_10.isChanged = true;
5491
+ var parent_14 = this.parent;
5492
+ if (parent_14 != null) {
5493
+ parent_14.isChanged = true;
5286
5494
  }
5287
5495
  }
5288
5496
  };
5289
5497
  EShapeDataValueImpl.prototype.removeAll = function (indices) {
5290
5498
  var isChanged = false;
5291
- var values = this._values;
5292
- var times = this._times;
5293
5499
  var sorted = indices.slice(0).sort(INDEX_COMPARATOR);
5500
+ var sortedLength = sorted.length;
5501
+ // Values
5502
+ var values = this._values;
5294
5503
  if (values != null) {
5295
- if (times != null) {
5296
- for (var i = sorted.length - 1; 0 <= i; --i) {
5297
- var index = sorted[i];
5298
- if (0 <= index) {
5299
- if (index < values.length) {
5300
- values.splice(index, 1);
5301
- isChanged = true;
5302
- }
5303
- if (index < times.length) {
5304
- times.splice(index, 1);
5305
- isChanged = true;
5306
- }
5307
- }
5504
+ for (var i = sortedLength - 1; 0 <= i; --i) {
5505
+ var index = sorted[i];
5506
+ if (0 <= index && index < values.length) {
5507
+ values.splice(index, 1);
5508
+ isChanged = true;
5308
5509
  }
5309
5510
  }
5310
- else {
5311
- for (var i = sorted.length - 1; 0 <= i; --i) {
5312
- var index = sorted[i];
5313
- if (0 <= index && index < values.length) {
5314
- values.splice(index, 1);
5315
- isChanged = true;
5316
- }
5511
+ }
5512
+ // Times
5513
+ var times = this._times;
5514
+ if (times != null) {
5515
+ for (var i = sortedLength - 1; 0 <= i; --i) {
5516
+ var index = sorted[i];
5517
+ if (0 <= index && index < times.length) {
5518
+ times.splice(index, 1);
5519
+ isChanged = true;
5317
5520
  }
5318
5521
  }
5319
5522
  }
5320
- else {
5321
- if (times != null) {
5322
- for (var i = sorted.length - 1; 0 <= i; --i) {
5323
- var index = sorted[i];
5324
- if (0 <= index && index < times.length) {
5325
- times.splice(index, 1);
5326
- isChanged = true;
5327
- }
5523
+ // States
5524
+ var states = this._states;
5525
+ if (states != null) {
5526
+ for (var i = sortedLength - 1; 0 <= i; --i) {
5527
+ var index = sorted[i];
5528
+ if (0 <= index && index < states.length) {
5529
+ states.splice(index, 1);
5530
+ isChanged = true;
5328
5531
  }
5329
5532
  }
5330
5533
  }
5331
5534
  if (isChanged) {
5332
- var parent_11 = this.parent;
5333
- if (parent_11 != null) {
5334
- parent_11.isChanged = true;
5535
+ var parent_15 = this.parent;
5536
+ if (parent_15 != null) {
5537
+ parent_15.isChanged = true;
5335
5538
  }
5336
5539
  }
5337
5540
  };
@@ -5349,11 +5552,17 @@ var EShapeDataValueImpl = /** @class */ (function () {
5349
5552
  times.length = 0;
5350
5553
  isChanged = true;
5351
5554
  }
5555
+ // States
5556
+ var states = this._states;
5557
+ if (states != null) {
5558
+ states.length = 0;
5559
+ isChanged = true;
5560
+ }
5352
5561
  // Change flag
5353
5562
  if (isChanged) {
5354
- var parent_12 = this.parent;
5355
- if (parent_12 != null) {
5356
- parent_12.isChanged = true;
5563
+ var parent_16 = this.parent;
5564
+ if (parent_16 != null) {
5565
+ parent_16.isChanged = true;
5357
5566
  }
5358
5567
  }
5359
5568
  };
@@ -5378,6 +5587,7 @@ var EShapeDataValueImpl = /** @class */ (function () {
5378
5587
  this.range.copy(target.range);
5379
5588
  this._value = target.value;
5380
5589
  this._time = target.time;
5590
+ this._state = target.state;
5381
5591
  this._capacity = target.capacity;
5382
5592
  return this;
5383
5593
  };
@@ -5394,7 +5604,8 @@ var EShapeDataValueImpl = /** @class */ (function () {
5394
5604
  var initial = manager.addResource(this.initial);
5395
5605
  var format = manager.addResource(this.format.trim());
5396
5606
  var range = this.range.serialize(manager);
5397
- return manager.addResource("[".concat(id, ",").concat(initial, ",").concat(format, ",").concat(range, ",").concat(this._capacity, ",").concat(this._order, ",").concat(this.type, ",").concat(this.scope, "]"));
5607
+ var as = manager.addResource(this.as);
5608
+ return manager.addResource("[".concat(id, ",").concat(initial, ",").concat(format, ",").concat(range, ",").concat(this._capacity, ",").concat(this._order, ",").concat(this.type, ",").concat(this.scope, ",").concat(as, "]"));
5398
5609
  };
5399
5610
  EShapeDataValueImpl.prototype.deserialize = function (target, manager) {
5400
5611
  var _a, _b;
@@ -5406,6 +5617,8 @@ var EShapeDataValueImpl = /** @class */ (function () {
5406
5617
  manager.setDataValue(target, parsed);
5407
5618
  }
5408
5619
  this.id = manager.data[parsed[0]] || "";
5620
+ var as = parsed[8];
5621
+ this.as = as != null ? resources[as] || "" : "";
5409
5622
  this.type = (_a = parsed[6]) !== null && _a !== void 0 ? _a : EShapeDataValueType.NUMBER;
5410
5623
  this.scope = (_b = parsed[7]) !== null && _b !== void 0 ? _b : EShapeDataValueScope.PUBLIC;
5411
5624
  this.initial = resources[parsed[1]] || "";
@@ -5591,7 +5804,7 @@ var EShapeDataScopedImpl = /** @class */ (function () {
5591
5804
  list.push(value);
5592
5805
  }
5593
5806
  };
5594
- EShapeDataScopedImpl.prototype.set = function (id, value, time, from, to) {
5807
+ EShapeDataScopedImpl.prototype.set = function (id, value, time, state, from, to) {
5595
5808
  var data = this._data;
5596
5809
  if (data == null) {
5597
5810
  return false;
@@ -5613,6 +5826,10 @@ var EShapeDataScopedImpl = /** @class */ (function () {
5613
5826
  if (time !== undefined) {
5614
5827
  datumValue.time = time;
5615
5828
  }
5829
+ // State
5830
+ if (state !== undefined) {
5831
+ datumValue.state = state;
5832
+ }
5616
5833
  // Value
5617
5834
  datumValue.value = value;
5618
5835
  }
@@ -5659,6 +5876,7 @@ var EShapeDataScopedImpl = /** @class */ (function () {
5659
5876
  * SPDX-License-Identifier: Apache-2.0
5660
5877
  */
5661
5878
  var RANGE_DUMMY;
5879
+ var ALIAS_DUMMY;
5662
5880
  var EShapeDataImpl = /** @class */ (function () {
5663
5881
  function EShapeDataImpl() {
5664
5882
  this._values = [];
@@ -5692,6 +5910,17 @@ var EShapeDataImpl = /** @class */ (function () {
5692
5910
  enumerable: false,
5693
5911
  configurable: true
5694
5912
  });
5913
+ Object.defineProperty(EShapeDataImpl.prototype, "as", {
5914
+ get: function () {
5915
+ var values = this._values;
5916
+ if (0 < values.length) {
5917
+ return values[0].as;
5918
+ }
5919
+ return "";
5920
+ },
5921
+ enumerable: false,
5922
+ configurable: true
5923
+ });
5695
5924
  Object.defineProperty(EShapeDataImpl.prototype, "type", {
5696
5925
  get: function () {
5697
5926
  var values = this._values;
@@ -5792,6 +6021,23 @@ var EShapeDataImpl = /** @class */ (function () {
5792
6021
  enumerable: false,
5793
6022
  configurable: true
5794
6023
  });
6024
+ Object.defineProperty(EShapeDataImpl.prototype, "state", {
6025
+ get: function () {
6026
+ var values = this._values;
6027
+ if (0 < values.length) {
6028
+ return values[0].state;
6029
+ }
6030
+ return EShapeDataValueState.UNKOWN;
6031
+ },
6032
+ set: function (state) {
6033
+ var values = this._values;
6034
+ if (0 < values.length) {
6035
+ values[0].state = state;
6036
+ }
6037
+ },
6038
+ enumerable: false,
6039
+ configurable: true
6040
+ });
5795
6041
  Object.defineProperty(EShapeDataImpl.prototype, "capacity", {
5796
6042
  get: function () {
5797
6043
  var values = this._values;
@@ -5809,6 +6055,33 @@ var EShapeDataImpl = /** @class */ (function () {
5809
6055
  enumerable: false,
5810
6056
  configurable: true
5811
6057
  });
6058
+ Object.defineProperty(EShapeDataImpl.prototype, "alias", {
6059
+ get: function () {
6060
+ var result = this._alias;
6061
+ if (result == null) {
6062
+ result = this.newAlias();
6063
+ this._alias = result;
6064
+ }
6065
+ return result;
6066
+ },
6067
+ enumerable: false,
6068
+ configurable: true
6069
+ });
6070
+ EShapeDataImpl.prototype.newAlias = function () {
6071
+ var values = this._values;
6072
+ var valuesLength = values.length;
6073
+ if (0 < valuesLength) {
6074
+ var result = {};
6075
+ for (var i = 0; i < valuesLength; ++i) {
6076
+ var value = values[i];
6077
+ result[value.as || value.id] = value;
6078
+ }
6079
+ return result;
6080
+ }
6081
+ else {
6082
+ return (ALIAS_DUMMY !== null && ALIAS_DUMMY !== void 0 ? ALIAS_DUMMY : (ALIAS_DUMMY = {}));
6083
+ }
6084
+ };
5812
6085
  Object.defineProperty(EShapeDataImpl.prototype, "mapping", {
5813
6086
  get: function () {
5814
6087
  var result = this._mapping;
@@ -7101,6 +7374,8 @@ var BuilderText = /** @class */ (function () {
7101
7374
  this.sizeX = NaN;
7102
7375
  this.sizeY = NaN;
7103
7376
  this.transformLocalId = NaN;
7377
+ this.scaleX = 1;
7378
+ this.scaleY = 1;
7104
7379
  this.size = NaN;
7105
7380
  this.family = "auto";
7106
7381
  this.value = "";
@@ -7259,12 +7534,25 @@ var BuilderText = /** @class */ (function () {
7259
7534
  var text = shape.text;
7260
7535
  var textOutline = text.outline;
7261
7536
  var textOutlineWidth = textOutline.enable ? textOutline.width : 0;
7537
+ var isOutlineWidthChanged = textOutlineWidth !== this.outlineWidth;
7262
7538
  var textWeight = text.weight;
7263
- if (textWeight !== this.weight || textOutlineWidth !== this.outlineWidth) {
7539
+ var isWeightChanged = textWeight !== this.weight;
7540
+ var scaleX = 1;
7541
+ var scaleY = 1;
7542
+ var textWorld = text.world;
7543
+ if (textWorld != null) {
7544
+ scaleX = textWorld[8];
7545
+ scaleY = textWorld[9];
7546
+ }
7547
+ var isScaleChanged = TEXT_FMIN < Math.abs(this.scaleX - scaleX) ||
7548
+ TEXT_FMIN < Math.abs(this.scaleY - scaleY);
7549
+ if (isWeightChanged || isOutlineWidthChanged || isScaleChanged) {
7264
7550
  this.weight = textWeight;
7265
7551
  this.outlineWidth = textOutlineWidth;
7552
+ this.scaleX = scaleX;
7553
+ this.scaleY = scaleY;
7266
7554
  buffer.updateSteps();
7267
- buildTextStep(buffer.steps, this.vertexOffset, this.vertexCount, text.atlas, text.size, textOutlineWidth, textWeight);
7555
+ buildTextStep(buffer.steps, this.vertexOffset, this.vertexCount, text.atlas, text.size, textOutlineWidth, textWeight, this.scaleX, this.scaleY);
7268
7556
  }
7269
7557
  };
7270
7558
  BuilderText.prototype.buildUnit = function (builder) {
@@ -7836,15 +8124,17 @@ var EShapeRuntime = /** @class */ (function () {
7836
8124
  var data = shape.data;
7837
8125
  var isEffectTimeUp = this.effect <= time;
7838
8126
  if (data.isChanged || this.isStateChanged || isEffectTimeUp) {
8127
+ this.isStateChanged = false;
8128
+ data.isChanged = false;
7839
8129
  if (isEffectTimeUp) {
7840
8130
  this.effect = NaN;
7841
8131
  }
7842
8132
  shape.disallowUploadedUpdate();
7843
8133
  this.onUpdate(shape, time);
7844
8134
  shape.allowUploadedUpdate();
8135
+ var wasStateChanged = this.isStateChanged;
7845
8136
  shape.state.removeAll(EShapeState.CLICKED, EShapeState.DOWN, EShapeState.UP, EShapeState.ACTIVATED, EShapeState.DEACTIVATED);
7846
- this.isStateChanged = false;
7847
- data.isChanged = false;
8137
+ this.isStateChanged = wasStateChanged;
7848
8138
  }
7849
8139
  };
7850
8140
  EShapeRuntime.prototype.onRender = function (shape, time, renderer) {
@@ -7963,6 +8253,7 @@ var EShapeActionExpressions = /** @class */ (function () {
7963
8253
  "try {" +
7964
8254
  "with (shape) {" +
7965
8255
  "with (state) {" +
8256
+ "with (data.alias) {" +
7966
8257
  "with (environment) {" +
7967
8258
  (nullable ?
7968
8259
  ("var result = (".concat(expression, ");") +
@@ -7971,6 +8262,7 @@ var EShapeActionExpressions = /** @class */ (function () {
7971
8262
  "}" +
7972
8263
  "}" +
7973
8264
  "}" +
8265
+ "}" +
7974
8266
  "} catch (e) {" +
7975
8267
  "return ".concat(defLiteral, ";") +
7976
8268
  "}";
@@ -13524,9 +13816,9 @@ var DBase = /** @class */ (function (_super) {
13524
13816
  if (target === this) {
13525
13817
  return true;
13526
13818
  }
13527
- else if (target != null && !(target instanceof DBase)) {
13819
+ else if (target != null && !(target instanceof DBase && target.interactive)) {
13528
13820
  var parent_5 = target.parent;
13529
- while (parent_5 != null && !(parent_5 instanceof DBase)) {
13821
+ while (parent_5 != null && !(parent_5 instanceof DBase && parent_5.interactive)) {
13530
13822
  parent_5 = parent_5.parent;
13531
13823
  }
13532
13824
  return parent_5 === this;
@@ -16021,569 +16313,6 @@ var EShapeGroupFillViewer = /** @class */ (function () {
16021
16313
  return EShapeGroupFillViewer;
16022
16314
  }());
16023
16315
 
16024
- /*
16025
- * Copyright (C) 2019 Toshiba Corporation
16026
- * SPDX-License-Identifier: Apache-2.0
16027
- */
16028
- /* eslint-disable prettier/prettier */
16029
- var NONE = 0x0;
16030
- var ID = 0x1;
16031
- var POSITION = 0x2;
16032
- var WIDTH = 0x4;
16033
- var HEIGHT = 0x8;
16034
- var ROTATION = 0x10;
16035
- var SKEW = 0x20;
16036
- var REPLACING = 0x40;
16037
- var GROUPING = 0x80;
16038
- var UNGROUPING = 0x100;
16039
- var FILL = 0x200;
16040
- var STROKE = 0x400;
16041
- var STROKE_SIDE = 0x800;
16042
- var BORDER_RADIUS = 0x1000;
16043
- var TEXT = 0x2000;
16044
- var TEXTURE = 0x4000;
16045
- var DATA = 0x8000;
16046
- var ACTION = 0x10000;
16047
- var CURSOR = 0x20000;
16048
- var ORDER_IN_LAYER = 0x40000;
16049
- var CHILDREN = 0x80000;
16050
- var DATA_MAPPING = 0x100000;
16051
- var COORDINATE = ID | POSITION | WIDTH | HEIGHT | ROTATION | SKEW;
16052
- var SHAPE = REPLACING | GROUPING | FILL | STROKE;
16053
- var LAYER = ORDER_IN_LAYER;
16054
- var PRIMITIVE = COORDINATE | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
16055
- var GROUP = PRIMITIVE | UNGROUPING;
16056
- var EMBEDDED = COORDINATE | REPLACING | GROUPING | TEXT | DATA | ACTION | LAYER | DATA_MAPPING;
16057
- var CONNECTOR = ID | REPLACING | FILL | STROKE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
16058
- var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;
16059
- var EShapeCapability = {
16060
- NONE: NONE,
16061
- /**
16062
- * Allows shape IDs to be modified.
16063
- */
16064
- ID: ID,
16065
- /**
16066
- * Allows shape positions to be modified.
16067
- */
16068
- POSITION: POSITION,
16069
- /**
16070
- * Allows shape widths to be modified.
16071
- */
16072
- WIDTH: WIDTH,
16073
- /**
16074
- * Allows shape heights to be modified.
16075
- */
16076
- HEIGHT: HEIGHT,
16077
- /**
16078
- * Allows shape rotations to be modified.
16079
- */
16080
- ROTATION: ROTATION,
16081
- /**
16082
- * Allows shape skews to be modified.
16083
- */
16084
- SKEW: SKEW,
16085
- /** @deprecated */
16086
- ALIGN: NONE,
16087
- /**
16088
- * Allows shapes to be replaced with other shapes.
16089
- */
16090
- REPLACING: REPLACING,
16091
- /**
16092
- * Allows shapes to be grouped.
16093
- */
16094
- GROUPING: GROUPING,
16095
- /**
16096
- * Allows grouped shapes to be ungrouped.
16097
- */
16098
- UNGROUPING: UNGROUPING,
16099
- /**
16100
- * Allows shape fills to be modified.
16101
- */
16102
- FILL: FILL,
16103
- /**
16104
- * Allows shape strokes to be modified.
16105
- */
16106
- STROKE: STROKE,
16107
- /**
16108
- * Allows shape stroke sides to be modified.
16109
- */
16110
- STROKE_SIDE: STROKE_SIDE,
16111
- /**
16112
- * Allows shape border radiuses to be modified.
16113
- */
16114
- BORDER_RADIUS: BORDER_RADIUS,
16115
- /**
16116
- * Allows shape texts to be modified.
16117
- */
16118
- TEXT: TEXT,
16119
- /**
16120
- * Allows shape textures to be modified.
16121
- */
16122
- TEXTURE: TEXTURE,
16123
- /** @deprecated in favor of {@link DATA} */
16124
- TAG: DATA,
16125
- /**
16126
- * Allows shape data to be modified.
16127
- */
16128
- DATA: DATA,
16129
- /**
16130
- * Allows shape data mapping to be modified.
16131
- */
16132
- DATA_MAPPING: DATA_MAPPING,
16133
- /**
16134
- * Allows shape actions to be modified.
16135
- */
16136
- ACTION: ACTION,
16137
- /**
16138
- * Allows shape cursors to be modified.
16139
- */
16140
- CURSOR: CURSOR,
16141
- /**
16142
- * Allows shape orders in layer to be modified.
16143
- */
16144
- ORDER_IN_LAYER: ORDER_IN_LAYER,
16145
- /**
16146
- * Allows shape children to be modified.
16147
- */
16148
- CHILDREN: CHILDREN,
16149
- COORDINATE: COORDINATE,
16150
- SHAPE: SHAPE,
16151
- LAYER: LAYER,
16152
- PRIMITIVE: PRIMITIVE,
16153
- GROUP: GROUP,
16154
- EMBEDDED: EMBEDDED,
16155
- CONNECTOR: CONNECTOR,
16156
- ALL: ALL
16157
- };
16158
-
16159
- /*
16160
- * Copyright (C) 2019 Toshiba Corporation
16161
- * SPDX-License-Identifier: Apache-2.0
16162
- */
16163
- var EShapeCapabilities = /** @class */ (function () {
16164
- function EShapeCapabilities() {
16165
- }
16166
- EShapeCapabilities.get = function (type) {
16167
- var capability = this.mappings[type];
16168
- if (capability != null) {
16169
- return capability;
16170
- }
16171
- return EShapeCapability.PRIMITIVE;
16172
- };
16173
- EShapeCapabilities.contains = function (shape, target) {
16174
- if (shape != null) {
16175
- var capability = this.get(shape.type);
16176
- if (capability & target) {
16177
- return true;
16178
- }
16179
- if (capability & EShapeCapability.CHILDREN) {
16180
- var children = shape.children;
16181
- for (var i = 0, imax = children.length; i < imax; ++i) {
16182
- if (this.contains(children[i], target)) {
16183
- return true;
16184
- }
16185
- }
16186
- }
16187
- }
16188
- return false;
16189
- };
16190
- EShapeCapabilities.set = function (type, capability) {
16191
- this.mappings[type] = capability;
16192
- };
16193
- EShapeCapabilities.mappings = {};
16194
- return EShapeCapabilities;
16195
- }());
16196
-
16197
- /*
16198
- * Copyright (C) 2019 Toshiba Corporation
16199
- * SPDX-License-Identifier: Apache-2.0
16200
- */
16201
- var EShapeEditor = /** @class */ (function () {
16202
- function EShapeEditor() {
16203
- this.localTransform = new pixi_js.Matrix();
16204
- this.internalTransform = new pixi_js.Matrix();
16205
- this.internalTransformParentInverse = new pixi_js.Matrix();
16206
- this.rotation = 0;
16207
- this.size = new pixi_js.Point();
16208
- }
16209
- return EShapeEditor;
16210
- }());
16211
-
16212
- /*
16213
- * Copyright (C) 2019 Toshiba Corporation
16214
- * SPDX-License-Identifier: Apache-2.0
16215
- */
16216
- var toSizeNormalized = function (size) {
16217
- var THRESHOLD = 0.001;
16218
- if (Math.abs(size) < THRESHOLD) {
16219
- return size < 0 ? -THRESHOLD : +THRESHOLD;
16220
- }
16221
- return size;
16222
- };
16223
-
16224
- /*
16225
- * Copyright (C) 2019 Toshiba Corporation
16226
- * SPDX-License-Identifier: Apache-2.0
16227
- */
16228
- var EShapeTransforms = /** @class */ (function () {
16229
- function EShapeTransforms() {
16230
- }
16231
- EShapeTransforms.prepare = function (shape) {
16232
- var editor = shape.editor || new EShapeEditor();
16233
- shape.editor = editor;
16234
- // Transform
16235
- shape.updateTransform();
16236
- var parent = shape.parent;
16237
- if (parent instanceof EShapeBase) {
16238
- parent.transform.internalTransform
16239
- .copyTo(editor.internalTransformParentInverse)
16240
- .invert();
16241
- }
16242
- else {
16243
- editor.internalTransformParentInverse.identity();
16244
- }
16245
- shape.transform.internalTransform.copyTo(editor.internalTransform);
16246
- // Rotation
16247
- editor.rotation = shape.transform.rotation;
16248
- // Size
16249
- editor.size.copyFrom(shape.size);
16250
- //
16251
- shape.disallowOnTransformChange();
16252
- };
16253
- EShapeTransforms.finalize = function (shape) {
16254
- shape.allowOnTransformChange(true);
16255
- };
16256
- EShapeTransforms.apply = function (shape, transform, keepSize) {
16257
- var editor = shape.editor;
16258
- if (editor != null) {
16259
- var newLocalTransform = editor.localTransform;
16260
- editor.internalTransformParentInverse
16261
- .copyTo(newLocalTransform)
16262
- .append(transform)
16263
- .append(editor.internalTransform);
16264
- if (keepSize) {
16265
- this.applyLocal(shape, newLocalTransform);
16266
- }
16267
- else {
16268
- var size = editor.size;
16269
- this.applyLocal(shape, newLocalTransform, size.x, size.y);
16270
- }
16271
- }
16272
- };
16273
- EShapeTransforms.applyLocal = function (shape, localTransform, bx, by) {
16274
- shape.disallowUploadedUpdate();
16275
- // Reconstruct the position, the rotation and the size
16276
- var a = localTransform.a;
16277
- var b = localTransform.b;
16278
- var c = localTransform.c;
16279
- var d = localTransform.d;
16280
- var tx = localTransform.tx;
16281
- var ty = localTransform.ty;
16282
- // Rotation
16283
- var transform = shape.transform;
16284
- var rx = Math.atan2(-c, d); // rotation - skewX
16285
- var ry = Math.atan2(+b, a); // rotation + skewY
16286
- transform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`
16287
- // Skew
16288
- var skew = (ry - rx) * 0.5;
16289
- transform.skew.set(skew, skew);
16290
- // Position: Assumes the pivot is invariant.
16291
- // tx = position.x - (a * px + c * py)
16292
- // ty = position.y - (b * px + d * py)
16293
- //
16294
- // Thus,
16295
- // position.x = tx + (a * px + c * py)
16296
- // position.y = ty + (b * px + d * py)
16297
- var pivot = transform.pivot;
16298
- var px = pivot.x;
16299
- var py = pivot.y;
16300
- transform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));
16301
- // Scale
16302
- if (bx != null && by != null) {
16303
- var sx = Math.sqrt(a * a + b * b);
16304
- var sy = Math.sqrt(c * c + d * d);
16305
- shape.size.set(toSizeNormalized(bx * sx), toSizeNormalized(by * sy));
16306
- }
16307
- //
16308
- shape.allowUploadedUpdate();
16309
- };
16310
- return EShapeTransforms;
16311
- }());
16312
-
16313
- /*
16314
- * Copyright (C) 2019 Toshiba Corporation
16315
- * SPDX-License-Identifier: Apache-2.0
16316
- */
16317
- var EShapeGroupSizeLayout = /** @class */ (function () {
16318
- function EShapeGroupSizeLayout(shape, bx, by) {
16319
- this.shape = shape;
16320
- // Base group size
16321
- this.base = new pixi_js.Point(bx, by);
16322
- // Base shape size
16323
- var size = shape.size;
16324
- this.shapeBase = new pixi_js.Point(size.x, size.y);
16325
- // Transform
16326
- this.transform = new pixi_js.Matrix();
16327
- shape.updateTransform();
16328
- shape.transform.localTransform.copyTo(this.transform);
16329
- this.capable =
16330
- EShapeCapabilities.contains(shape, EShapeCapability.POSITION) &&
16331
- EShapeCapabilities.contains(shape, EShapeCapability.WIDTH) &&
16332
- EShapeCapabilities.contains(shape, EShapeCapability.HEIGHT) &&
16333
- EShapeCapabilities.contains(shape, EShapeCapability.ROTATION) &&
16334
- EShapeCapabilities.contains(shape, EShapeCapability.SKEW);
16335
- }
16336
- EShapeGroupSizeLayout.prototype.isCompatible = function (shape) {
16337
- return this.shape === shape;
16338
- };
16339
- EShapeGroupSizeLayout.prototype.reset = function (shape, baseX, baseY) {
16340
- this.base.set(baseX, baseY);
16341
- // Base shape size
16342
- var size = shape.size;
16343
- this.shapeBase.copyFrom(size);
16344
- // Transform
16345
- shape.updateTransform();
16346
- shape.transform.localTransform.copyTo(this.transform);
16347
- };
16348
- EShapeGroupSizeLayout.prototype.update = function (shape, baseX, baseY, pivotX, pivotY) {
16349
- if (!this.capable) {
16350
- return;
16351
- }
16352
- var sx = baseX / this.base.x;
16353
- var sy = baseY / this.base.y;
16354
- var childBase = this.shapeBase;
16355
- var transform = EShapeGroupSizeLayout.WORK_TRANSFORM;
16356
- transform
16357
- .identity()
16358
- .append(this.transform)
16359
- .translate(-pivotX, -pivotY)
16360
- .scale(sx, sy)
16361
- .translate(+pivotX, +pivotY);
16362
- shape.disallowOnTransformChange();
16363
- EShapeTransforms.applyLocal(shape, transform, childBase.x, childBase.y);
16364
- shape.allowOnTransformChange(false);
16365
- };
16366
- EShapeGroupSizeLayout.WORK_TRANSFORM = new pixi_js.Matrix();
16367
- return EShapeGroupSizeLayout;
16368
- }());
16369
-
16370
- /*
16371
- * Copyright (C) 2019 Toshiba Corporation
16372
- * SPDX-License-Identifier: Apache-2.0
16373
- */
16374
- var EShapeGroupSizeEditor = /** @class */ (function () {
16375
- function EShapeGroupSizeEditor(parent, x, y, isFittable) {
16376
- this._workRectForCalcRect = new pixi_js.Rectangle();
16377
- this._workRectForFit = new pixi_js.Rectangle();
16378
- this._parent = parent;
16379
- this._layouts = [];
16380
- this._size = new pixi_js.Point(x, y);
16381
- this._isFittable = isFittable;
16382
- }
16383
- EShapeGroupSizeEditor.prototype.init = function () {
16384
- // DO NOTHING
16385
- };
16386
- Object.defineProperty(EShapeGroupSizeEditor.prototype, "x", {
16387
- get: function () {
16388
- return this._size.x;
16389
- },
16390
- set: function (x) {
16391
- var size = this._size;
16392
- if (size.x !== x) {
16393
- var ox = size.x;
16394
- size.x = x;
16395
- this.onChange(ox, size.y);
16396
- }
16397
- },
16398
- enumerable: false,
16399
- configurable: true
16400
- });
16401
- Object.defineProperty(EShapeGroupSizeEditor.prototype, "y", {
16402
- get: function () {
16403
- return this._size.y;
16404
- },
16405
- set: function (y) {
16406
- var size = this._size;
16407
- if (size.y !== y) {
16408
- var oy = size.y;
16409
- size.y = y;
16410
- this.onChange(size.x, oy);
16411
- }
16412
- },
16413
- enumerable: false,
16414
- configurable: true
16415
- });
16416
- EShapeGroupSizeEditor.prototype.set = function (x, y) {
16417
- var isChanged = false;
16418
- var size = this._size;
16419
- var ox = size.x;
16420
- var oy = size.y;
16421
- if (x != null && ox !== x) {
16422
- isChanged = true;
16423
- size.x = x;
16424
- }
16425
- if (y != null && oy !== y) {
16426
- isChanged = true;
16427
- size.y = y;
16428
- }
16429
- if (isChanged) {
16430
- this.onChange(ox, oy);
16431
- }
16432
- return this;
16433
- };
16434
- EShapeGroupSizeEditor.prototype.clone = function () {
16435
- var size = this._size;
16436
- return new EShapeGroupSizeEditor(this._parent, size.x, size.y, this._isFittable);
16437
- };
16438
- EShapeGroupSizeEditor.prototype.copy = function () {
16439
- // DO NOTHING
16440
- };
16441
- EShapeGroupSizeEditor.prototype.copyFrom = function (point) {
16442
- var x = point.x;
16443
- var y = point.y;
16444
- var size = this._size;
16445
- var ox = size.x;
16446
- var oy = size.y;
16447
- if (ox !== x || oy !== y) {
16448
- size.x = x;
16449
- size.y = y;
16450
- this.onChange(ox, oy);
16451
- }
16452
- return this;
16453
- };
16454
- EShapeGroupSizeEditor.prototype.copyTo = function (point) {
16455
- return this._size.copyTo(point);
16456
- };
16457
- EShapeGroupSizeEditor.prototype.equals = function (point) {
16458
- return this._size.equals(point);
16459
- };
16460
- EShapeGroupSizeEditor.prototype.fit = function () {
16461
- if (this._isFittable) {
16462
- this.doFit();
16463
- }
16464
- };
16465
- EShapeGroupSizeEditor.prototype.doFit = function () {
16466
- var parent = this._parent;
16467
- parent.disallowOnTransformChange();
16468
- // Calculate the rect
16469
- var rect = this.calcRect(this._workRectForFit);
16470
- // Set size
16471
- var size = this._size;
16472
- size.set(rect.width, rect.height);
16473
- // Position & Pivot
16474
- // rx := rect.x
16475
- // ry := rect.y
16476
- //
16477
- // | a c tx | | 1 0 +rx | | 1 0 -rx | | a c tx + (a * rx + c * ry) | | 1 0 -rx |
16478
- // | b d ty | | 0 1 +ry | | 0 1 -ry | = | b d ty + (b * rx + d * ry) | | 0 1 -ry |
16479
- // | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 |
16480
- //
16481
- // tx -> tx + (a * rx + c * ry) = poxition.x - (a * pivot.x + c * pivot.y)
16482
- // ty -> ty + (b * rx + d * ry) = poxition.y - (b * pivot.x + d * pivot.y)
16483
- // position.x -> position.x + (a * rx + c * ry) - (a * pivot.x + c * pivot.y)
16484
- // position.y -> position.y + (b * rx + d * ry) - (b * pivot.x + d * pivot.y)
16485
- // pivot.x -> 0
16486
- // pivot.y -> 0
16487
- //
16488
- // a -> a', b -> b', c -> c', tx -> tx', ty -> ty'
16489
- //
16490
- // | a' c' tx' | | 1 0 -rx | | a' c' tx' - (a' * rx + c' * ry) |
16491
- // | b' d' ty' | | 0 1 -ry | = | b' d' ty' - (b' * rx + d' * ry) |
16492
- // | 0 0 1 | | 0 0 1 | | 0 0 1 |
16493
- //
16494
- // tx' -> tx' - (a' * rx + c' * ry) = poxition.x - (a' * pivot.x + c' * pivot.y)
16495
- // ty' -> ty' - (b' * rx + d' * ry) = poxition.y - (b' * pivot.x + d' * pivot.y)
16496
- // pivot.x -> pivot.x + rx
16497
- // pivot.y -> pivot.y + ry
16498
- parent.updateTransform();
16499
- var transform = parent.transform;
16500
- var x = rect.x + rect.width * 0.5;
16501
- var y = rect.y + rect.height * 0.5;
16502
- var position = transform.position;
16503
- var localTransform = transform.localTransform;
16504
- var a = localTransform.a;
16505
- var b = localTransform.b;
16506
- var c = localTransform.c;
16507
- var d = localTransform.d;
16508
- var pivot = transform.pivot;
16509
- position.set(position.x + (a * x + c * y) - (a * pivot.x + c * pivot.y), position.y + (b * x + d * y) - (b * pivot.x + d * pivot.y));
16510
- pivot.set(x, y);
16511
- // Reset the data
16512
- this.reset(parent.children, this._layouts, size);
16513
- //
16514
- parent.allowOnTransformChange(true);
16515
- };
16516
- EShapeGroupSizeEditor.prototype.reset = function (children, layouts, size) {
16517
- for (var i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {
16518
- var child = children[i];
16519
- var layout = layouts[i];
16520
- if (layout.isCompatible(child)) {
16521
- layout.reset(child, size.x, size.y);
16522
- }
16523
- else {
16524
- layouts.length = i;
16525
- break;
16526
- }
16527
- }
16528
- if (children.length < layouts.length) {
16529
- layouts.length = children.length;
16530
- }
16531
- };
16532
- EShapeGroupSizeEditor.prototype.calcRect = function (result) {
16533
- var parent = this._parent;
16534
- var children = parent.children;
16535
- if (children.length <= 0) {
16536
- result.x = 0;
16537
- result.y = 0;
16538
- result.width = 0;
16539
- result.height = 0;
16540
- }
16541
- else {
16542
- var workRect = this._workRectForCalcRect;
16543
- children[0].getBoundsLocal(false, result);
16544
- for (var i = 1, imax = children.length; i < imax; ++i) {
16545
- var child = children[i];
16546
- child.getBoundsLocal(false, workRect);
16547
- result.enlarge(workRect);
16548
- }
16549
- }
16550
- return result;
16551
- };
16552
- EShapeGroupSizeEditor.prototype.onChange = function (ox, oy) {
16553
- var parent = this._parent;
16554
- var size = this._size;
16555
- var pivot = parent.transform.pivot;
16556
- this.onChange_(parent.children, this._layouts, size.x, size.y, pivot.x, pivot.y, ox, oy);
16557
- parent.onSizeChange();
16558
- };
16559
- EShapeGroupSizeEditor.prototype.onChange_ = function (children, layouts, sx, sy, px, py, ox, oy) {
16560
- for (var i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {
16561
- var child = children[i];
16562
- var layout = layouts[i];
16563
- if (layout.isCompatible(child)) {
16564
- layout.update(child, sx, sy, px, py);
16565
- }
16566
- else {
16567
- layouts.length = i;
16568
- break;
16569
- }
16570
- }
16571
- for (var i = layouts.length, imax = children.length; i < imax; ++i) {
16572
- var child = children[i];
16573
- var layout = this.newLayout(child, ox, oy);
16574
- layout.update(child, sx, sy, px, py);
16575
- layouts.push(layout);
16576
- }
16577
- if (layouts.length !== children.length) {
16578
- layouts.length = children.length;
16579
- }
16580
- };
16581
- EShapeGroupSizeEditor.prototype.newLayout = function (shape, ox, oy) {
16582
- return shape.layout || new EShapeGroupSizeLayout(shape, ox, oy);
16583
- };
16584
- return EShapeGroupSizeEditor;
16585
- }());
16586
-
16587
16316
  /*
16588
16317
  * Copyright (C) 2019 Toshiba Corporation
16589
16318
  * SPDX-License-Identifier: Apache-2.0
@@ -17210,34 +16939,21 @@ var EShapeGroupTextViewer = /** @class */ (function () {
17210
16939
  */
17211
16940
  var EShapeGroupViewer = /** @class */ (function (_super) {
17212
16941
  __extends(EShapeGroupViewer, _super);
17213
- function EShapeGroupViewer(isEditMode, type) {
16942
+ function EShapeGroupViewer(type) {
17214
16943
  var _this = _super.call(this, type) || this;
17215
- _this._isEditMode = isEditMode;
17216
16944
  var data = _this.newData();
17217
16945
  _this.data = data;
17218
16946
  _this.tag = data;
17219
- _this.size = _this.newGroupSize(isEditMode);
16947
+ _this.size = _this.newGroupSize();
17220
16948
  _this.fill = _this.newGroupFill();
17221
16949
  _this.stroke = _this.newGroupStroke();
17222
16950
  _this.text = _this.newGroupText();
17223
16951
  return _this;
17224
16952
  }
17225
- Object.defineProperty(EShapeGroupViewer.prototype, "isEditMode", {
17226
- get: function () {
17227
- return this._isEditMode;
17228
- },
17229
- enumerable: false,
17230
- configurable: true
17231
- });
17232
- EShapeGroupViewer.prototype.newGroupSize = function (isEditMode) {
16953
+ EShapeGroupViewer.prototype.newGroupSize = function () {
17233
16954
  var sizeX = EShapeDefaults.SIZE_X;
17234
16955
  var sizeY = EShapeDefaults.SIZE_Y;
17235
- if (isEditMode) {
17236
- return new EShapeGroupSizeEditor(this, sizeX, sizeY, this.isGroupSizeFittable());
17237
- }
17238
- else {
17239
- return new EShapeGroupSizeViewer(this, sizeX, sizeY, sizeX, sizeY);
17240
- }
16956
+ return new EShapeGroupSizeViewer(this, sizeX, sizeY, sizeX, sizeY);
17241
16957
  };
17242
16958
  EShapeGroupViewer.prototype.isGroupSizeFittable = function () {
17243
16959
  return true;
@@ -17335,9 +17051,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
17335
17051
 
17336
17052
  var EShapeEmbedded = /** @class */ (function (_super) {
17337
17053
  __extends(EShapeEmbedded, _super);
17338
- function EShapeEmbedded(name, isEditMode, type) {
17054
+ function EShapeEmbedded(name, type) {
17339
17055
  if (type === void 0) { type = EShapeType.EMBEDDED; }
17340
- var _this = _super.call(this, isEditMode, type) || this;
17056
+ var _this = _super.call(this, type) || this;
17341
17057
  _this._name = name;
17342
17058
  return _this;
17343
17059
  }
@@ -17368,7 +17084,7 @@ var EShapeEmbedded = /** @class */ (function (_super) {
17368
17084
  };
17369
17085
  EShapeEmbedded.prototype.newClone = function () {
17370
17086
  var constructor = this.constructor;
17371
- return new constructor(this._name, this._isEditMode, this.type);
17087
+ return new constructor(this._name, this.type);
17372
17088
  };
17373
17089
  EShapeEmbedded.prototype.serializeChildren = function (manager) {
17374
17090
  return [];
@@ -19961,7 +19677,7 @@ var DynamicFontAtlasCharacterType = {
19961
19677
  * SPDX-License-Identifier: Apache-2.0
19962
19678
  */
19963
19679
  var VERTEX_SHADER$2 = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying mediump vec2 vTextureCoord;\nvoid main(void) {\n\tgl_Position = vec4(aVertexPosition, 0.0, 1.0);\n\tvTextureCoord = aTextureCoord;\n}\n";
19964
- var FRAGMENT_SHADER$2 = "\nprecision mediump float;\n\nvarying mediump vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec2 uSize;\n\nfloat calcDistance( float x, float y, float dx, float dy ) {\n\tfloat xd = x + dx;\n\tfloat yd = y + dy;\n\tfloat u = xd / uSize.x;\n\tfloat v = yd / uSize.y;\n\tfloat ul = (xd - 1.0) / uSize.x;\n\tfloat vt = (yd - 1.0) / uSize.y;\n\n\tfloat m = texture2D(uSampler, vec2(u , v )).a;\n\tfloat l = texture2D(uSampler, vec2(ul, v )).a;\n\tfloat t = texture2D(uSampler, vec2(u , vt)).a;\n\n\tfloat xl = mix( xd - 1.0, xd, (0.5 - l) / (m - l) );\n\tfloat yt = mix( yd - 1.0, yd, (0.5 - t) / (m - t) );\n\n\tbool bl = ( min(l, m) < 0.5 && 0.5 <= max(l, m) );\n\tbool bt = ( min(t, m) < 0.5 && 0.5 <= max(t, m) );\n\n\tfloat ll = (bl ? length( vec2( xl - x, yd - y ) ) : 100.0);\n\tfloat lt = (bt ? length( vec2( xd - x, yt - y ) ) : 100.0);\n\n\treturn min( ll, lt );\n}\n\nfloat calcDistancesY( float x, float y, float dx ) {\n\tfloat d = 100.0;\n\tfor( float dy=-6.0; dy<6.5; dy++ ) {\n\t\td = min( d, calcDistance( x, y, dx, dy ) );\n\t}\n\treturn d;\n}\n\nfloat calcDistances( float x, float y ) {\n\tfloat d = 100.0;\n\tfor( float dx=-6.0; dx<6.5; dx++ ) {\n\t\td = min( d, calcDistancesY( x, y, dx ) );\n\t}\n\treturn d;\n}\n\nvoid main(void) {\n\tfloat t = texture2D(uSampler, vTextureCoord).a;\n\tfloat x = vTextureCoord.x * uSize.x;\n\tfloat y = vTextureCoord.y * uSize.y;\n\tfloat d = min( 6.0, calcDistances( x, y ) ) / 12.0;\n\td = clamp( mix( 0.5 - d, 0.5 + d, step( 0.5, t ) ), 0.0, 1.0 );\n\tgl_FragColor = vec4(1.0, 1.0, 1.0, d);\n}\n";
19680
+ var FRAGMENT_SHADER$2 = "\nprecision mediump float;\n\nvarying mediump vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec2 uSize;\n\nfloat calcDistance( float x, float y, float dx, float dy ) {\n\tfloat xd = x + dx;\n\tfloat yd = y + dy;\n\tfloat u = xd / uSize.x;\n\tfloat v = yd / uSize.y;\n\tfloat ul = (xd - 1.0) / uSize.x;\n\tfloat vt = (yd - 1.0) / uSize.y;\n\n\tfloat m = texture2D(uSampler, vec2(u , v )).a;\n\tfloat l = texture2D(uSampler, vec2(ul, v )).a;\n\tfloat t = texture2D(uSampler, vec2(u , vt)).a;\n\tfloat ddx = -(0.5 - m) / (l - m);\n\tfloat ddy = -(0.5 - m) / (t - m);\n\tbool bl = min(l,m) < 0.5 && 0.5 <= max(l,m);\n\tbool bt = min(t,m) < 0.5 && 0.5 <= max(t,m);\n\treturn (\n\t\tbl ?\n\t\t(bt ?\n\t\t\tlength(vec2(dx + ddx * 0.5, dy + ddy * 0.5)) :\n\t\t\tlength(vec2(dx + ddx, dy))\n\t\t) :\n\t\t(bt ?\n\t\t\tlength(vec2(dx, dy + ddy)) :\n\t\t\t100.0\n\t\t)\n\t);\n}\n\nfloat calcDistancesY( float x, float y, float dx ) {\n\tfloat d = 100.0;\n\tfor( float dy=-6.0; dy<6.5; dy++ ) {\n\t\td = min( d, calcDistance( x, y, dx, dy ) );\n\t}\n\treturn d;\n}\n\nfloat calcDistances( float x, float y ) {\n\tfloat d = 100.0;\n\tfor( float dx=-6.0; dx<6.5; dx++ ) {\n\t\td = min( d, calcDistancesY( x, y, dx ) );\n\t}\n\treturn d;\n}\n\nvoid main(void) {\n\tfloat t = texture2D(uSampler, vTextureCoord).a;\n\tfloat x = vTextureCoord.x * uSize.x;\n\tfloat y = vTextureCoord.y * uSize.y;\n\tfloat d = min( 6.0, calcDistances( x, y ) ) / 12.0;\n\td = clamp( mix( 0.5 - d, 0.5 + d, step( 0.5, t ) ), 0.0, 1.0 );\n\tgl_FragColor = vec4(1.0, 1.0, 1.0, d);\n}\n";
19965
19681
  var DynamicSDFFontGenerator = /** @class */ (function () {
19966
19682
  function DynamicSDFFontGenerator() {
19967
19683
  var _this = this;
@@ -21326,9 +21042,9 @@ var EShapeContainer = /** @class */ (function (_super) {
21326
21042
  */
21327
21043
  var EShapeEmbeddedLayer = /** @class */ (function (_super) {
21328
21044
  __extends(EShapeEmbeddedLayer, _super);
21329
- function EShapeEmbeddedLayer(name, isEditMode, type) {
21045
+ function EShapeEmbeddedLayer(name, type) {
21330
21046
  if (type === void 0) { type = EShapeType.EMBEDDED_LAYER; }
21331
- var _this = _super.call(this, isEditMode, type) || this;
21047
+ var _this = _super.call(this, type) || this;
21332
21048
  _this._name = name;
21333
21049
  return _this;
21334
21050
  }
@@ -21360,7 +21076,7 @@ var EShapeEmbeddedLayer = /** @class */ (function (_super) {
21360
21076
  };
21361
21077
  EShapeEmbeddedLayer.prototype.newClone = function () {
21362
21078
  var constructor = this.constructor;
21363
- return new constructor(this._name, this._isEditMode, this.type);
21079
+ return new constructor(this._name, this.type);
21364
21080
  };
21365
21081
  EShapeEmbeddedLayer.prototype.serializeChildren = function (manager) {
21366
21082
  return [];
@@ -21800,9 +21516,7 @@ var deserializeEmbeddedLayerName = function (target, manager) {
21800
21516
  var deserializeEmbeddedLayer = function (serialized, manager, width, height, creator) {
21801
21517
  var _a, _b, _c;
21802
21518
  var name = deserializeEmbeddedLayerName(serialized[0], manager);
21803
- var result = creator
21804
- ? creator(name, manager)
21805
- : new EShapeEmbeddedLayer(name, manager.isEditMode);
21519
+ var result = creator ? creator(name, manager) : new EShapeEmbeddedLayer(name);
21806
21520
  var visibility = serialized[1];
21807
21521
  var visible = visibility == null || !!(visibility & 0x2);
21808
21522
  if (!visible) {
@@ -21815,6 +21529,7 @@ var deserializeEmbeddedLayer = function (serialized, manager, width, height, cre
21815
21529
  var sizeX = (_a = serialized[4]) !== null && _a !== void 0 ? _a : width;
21816
21530
  var sizeY = (_b = serialized[5]) !== null && _b !== void 0 ? _b : height;
21817
21531
  result.size.set(sizeX, sizeY);
21532
+ result.size.init();
21818
21533
  var fillId = serialized[6];
21819
21534
  if (fillId != null) {
21820
21535
  result.fill.deserialize(fillId, manager);
@@ -22110,42 +21825,42 @@ var EShapeActionRuntimes = /** @class */ (function () {
22110
21825
  }
22111
21826
  }
22112
21827
  };
22113
- EShapeActionRuntimes.write = function (shape, id, value, time, remote) {
21828
+ EShapeActionRuntimes.writeLocal = function (shape, id, value, time, state) {
22114
21829
  var _a;
22115
- if (remote) {
22116
- var container = this.toContainer(shape);
22117
- if (container) {
22118
- return container.data.remote.set(id, value, time);
22119
- }
22120
- }
22121
- else {
22122
- var current = shape;
22123
- while (current != null) {
22124
- if (this.isContainer(current)) {
22125
- if (current.data.private.set(id, value, time)) {
22126
- DApplications.update(current);
22127
- return true;
22128
- }
22129
- else if (current.data.protected.set(id, value, time)) {
22130
- DApplications.update(current);
22131
- return true;
22132
- }
22133
- else {
22134
- if (current.data.set(id, value, time)) {
22135
- DApplications.update(current);
22136
- return true;
22137
- }
22138
- }
22139
- return false;
21830
+ if (state === void 0) { state = EShapeDataValueState.FOUND; }
21831
+ var current = shape;
21832
+ while (current != null) {
21833
+ if (this.isContainer(current)) {
21834
+ if (current.data.private.set(id, value, time, state)) {
21835
+ DApplications.update(current);
21836
+ return true;
21837
+ }
21838
+ else if (current.data.protected.set(id, value, time, state)) {
21839
+ DApplications.update(current);
21840
+ return true;
22140
21841
  }
22141
- else if (this.isEmbedded(current)) {
22142
- if ((_a = current.data.getPrivate()) === null || _a === void 0 ? void 0 : _a.set(id, value, time)) {
21842
+ else {
21843
+ if (current.data.set(id, value, time, state)) {
22143
21844
  DApplications.update(current);
22144
21845
  return true;
22145
21846
  }
22146
21847
  }
22147
- current = current.parent;
21848
+ return false;
22148
21849
  }
21850
+ else if (this.isEmbedded(current)) {
21851
+ if ((_a = current.data.getPrivate()) === null || _a === void 0 ? void 0 : _a.set(id, value, time, state)) {
21852
+ DApplications.update(current);
21853
+ return true;
21854
+ }
21855
+ }
21856
+ current = current.parent;
21857
+ }
21858
+ return false;
21859
+ };
21860
+ EShapeActionRuntimes.writeRemote = function (shape, id, value) {
21861
+ var container = this.toContainer(shape);
21862
+ if (container) {
21863
+ return container.data.remote.set(id, value);
22149
21864
  }
22150
21865
  return false;
22151
21866
  };
@@ -24192,14 +23907,14 @@ var EShapeActionValueOnInputActions = /** @class */ (function () {
24192
23907
  EShapeActionRuntimes.emit(shape, target, value, time);
24193
23908
  break;
24194
23909
  case EShapeActionValueOnInputAction.WRITE_LOCAL:
24195
- EShapeActionRuntimes.write(shape, target, value, time, false);
23910
+ EShapeActionRuntimes.writeLocal(shape, target, value, time);
24196
23911
  break;
24197
23912
  case EShapeActionValueOnInputAction.WRITE_REMOTE:
24198
- EShapeActionRuntimes.write(shape, target, value, time, true);
23913
+ EShapeActionRuntimes.writeRemote(shape, target, value);
24199
23914
  break;
24200
23915
  case EShapeActionValueOnInputAction.WRITE_BOTH:
24201
- EShapeActionRuntimes.write(shape, target, value, time, false);
24202
- EShapeActionRuntimes.write(shape, target, value, time, true);
23916
+ EShapeActionRuntimes.writeLocal(shape, target, value, time);
23917
+ EShapeActionRuntimes.writeRemote(shape, target, value);
24203
23918
  break;
24204
23919
  }
24205
23920
  };
@@ -24400,8 +24115,8 @@ var EShapeActionRuntimeMiscWriteBoth = /** @class */ (function (_super) {
24400
24115
  return _super !== null && _super.apply(this, arguments) || this;
24401
24116
  }
24402
24117
  EShapeActionRuntimeMiscWriteBoth.prototype.write = function (shape, target, value, time) {
24403
- EShapeActionRuntimes.write(shape, target, value, time, false);
24404
- EShapeActionRuntimes.write(shape, target, value, time, true);
24118
+ EShapeActionRuntimes.writeLocal(shape, target, value, time);
24119
+ EShapeActionRuntimes.writeRemote(shape, target, value);
24405
24120
  };
24406
24121
  return EShapeActionRuntimeMiscWriteBoth;
24407
24122
  }(EShapeActionRuntimeMiscWrite));
@@ -24416,7 +24131,7 @@ var EShapeActionRuntimeMiscWriteLocal = /** @class */ (function (_super) {
24416
24131
  return _super !== null && _super.apply(this, arguments) || this;
24417
24132
  }
24418
24133
  EShapeActionRuntimeMiscWriteLocal.prototype.write = function (shape, target, value, time) {
24419
- EShapeActionRuntimes.write(shape, target, value, time, false);
24134
+ EShapeActionRuntimes.writeLocal(shape, target, value, time);
24420
24135
  };
24421
24136
  return EShapeActionRuntimeMiscWriteLocal;
24422
24137
  }(EShapeActionRuntimeMiscWrite));
@@ -24431,7 +24146,7 @@ var EShapeActionRuntimeMiscWriteRemote = /** @class */ (function (_super) {
24431
24146
  return _super !== null && _super.apply(this, arguments) || this;
24432
24147
  }
24433
24148
  EShapeActionRuntimeMiscWriteRemote.prototype.write = function (shape, target, value, time) {
24434
- EShapeActionRuntimes.write(shape, target, value, time, true);
24149
+ EShapeActionRuntimes.writeRemote(shape, target, value);
24435
24150
  };
24436
24151
  return EShapeActionRuntimeMiscWriteRemote;
24437
24152
  }(EShapeActionRuntimeMiscWrite));
@@ -32254,6 +31969,18 @@ var EShapeActionValueTransformMove = /** @class */ (function (_super) {
32254
31969
  return EShapeActionValueTransformMove;
32255
31970
  }(EShapeActionValueOpetyped));
32256
31971
 
31972
+ /*
31973
+ * Copyright (C) 2019 Toshiba Corporation
31974
+ * SPDX-License-Identifier: Apache-2.0
31975
+ */
31976
+ var toSizeNormalized = function (size) {
31977
+ var THRESHOLD = 0.001;
31978
+ if (Math.abs(size) < THRESHOLD) {
31979
+ return size < 0 ? -THRESHOLD : +THRESHOLD;
31980
+ }
31981
+ return size;
31982
+ };
31983
+
32257
31984
  /*
32258
31985
  * Copyright (C) 2019 Toshiba Corporation
32259
31986
  * SPDX-License-Identifier: Apache-2.0
@@ -32995,6 +32722,179 @@ var loadShapeBar = function () {
32995
32722
  EShapeDeserializers[EShapeType.BAR] = deserializeBar;
32996
32723
  };
32997
32724
 
32725
+ /*
32726
+ * Copyright (C) 2019 Toshiba Corporation
32727
+ * SPDX-License-Identifier: Apache-2.0
32728
+ */
32729
+ /* eslint-disable prettier/prettier */
32730
+ var NONE = 0x0;
32731
+ var ID = 0x1;
32732
+ var POSITION = 0x2;
32733
+ var WIDTH = 0x4;
32734
+ var HEIGHT = 0x8;
32735
+ var ROTATION = 0x10;
32736
+ var SKEW = 0x20;
32737
+ var REPLACING = 0x40;
32738
+ var GROUPING = 0x80;
32739
+ var UNGROUPING = 0x100;
32740
+ var FILL = 0x200;
32741
+ var STROKE = 0x400;
32742
+ var STROKE_SIDE = 0x800;
32743
+ var BORDER_RADIUS = 0x1000;
32744
+ var TEXT = 0x2000;
32745
+ var TEXTURE = 0x4000;
32746
+ var DATA = 0x8000;
32747
+ var ACTION = 0x10000;
32748
+ var CURSOR = 0x20000;
32749
+ var ORDER_IN_LAYER = 0x40000;
32750
+ var CHILDREN = 0x80000;
32751
+ var DATA_MAPPING = 0x100000;
32752
+ var COORDINATE = ID | POSITION | WIDTH | HEIGHT | ROTATION | SKEW;
32753
+ var SHAPE = REPLACING | GROUPING | FILL | STROKE;
32754
+ var LAYER = ORDER_IN_LAYER;
32755
+ var PRIMITIVE = COORDINATE | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
32756
+ var GROUP = PRIMITIVE | UNGROUPING;
32757
+ var EMBEDDED = COORDINATE | REPLACING | GROUPING | TEXT | DATA | ACTION | LAYER | DATA_MAPPING;
32758
+ var CONNECTOR = ID | REPLACING | FILL | STROKE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
32759
+ var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;
32760
+ var EShapeCapability = {
32761
+ NONE: NONE,
32762
+ /**
32763
+ * Allows shape IDs to be modified.
32764
+ */
32765
+ ID: ID,
32766
+ /**
32767
+ * Allows shape positions to be modified.
32768
+ */
32769
+ POSITION: POSITION,
32770
+ /**
32771
+ * Allows shape widths to be modified.
32772
+ */
32773
+ WIDTH: WIDTH,
32774
+ /**
32775
+ * Allows shape heights to be modified.
32776
+ */
32777
+ HEIGHT: HEIGHT,
32778
+ /**
32779
+ * Allows shape rotations to be modified.
32780
+ */
32781
+ ROTATION: ROTATION,
32782
+ /**
32783
+ * Allows shape skews to be modified.
32784
+ */
32785
+ SKEW: SKEW,
32786
+ /** @deprecated */
32787
+ ALIGN: NONE,
32788
+ /**
32789
+ * Allows shapes to be replaced with other shapes.
32790
+ */
32791
+ REPLACING: REPLACING,
32792
+ /**
32793
+ * Allows shapes to be grouped.
32794
+ */
32795
+ GROUPING: GROUPING,
32796
+ /**
32797
+ * Allows grouped shapes to be ungrouped.
32798
+ */
32799
+ UNGROUPING: UNGROUPING,
32800
+ /**
32801
+ * Allows shape fills to be modified.
32802
+ */
32803
+ FILL: FILL,
32804
+ /**
32805
+ * Allows shape strokes to be modified.
32806
+ */
32807
+ STROKE: STROKE,
32808
+ /**
32809
+ * Allows shape stroke sides to be modified.
32810
+ */
32811
+ STROKE_SIDE: STROKE_SIDE,
32812
+ /**
32813
+ * Allows shape border radiuses to be modified.
32814
+ */
32815
+ BORDER_RADIUS: BORDER_RADIUS,
32816
+ /**
32817
+ * Allows shape texts to be modified.
32818
+ */
32819
+ TEXT: TEXT,
32820
+ /**
32821
+ * Allows shape textures to be modified.
32822
+ */
32823
+ TEXTURE: TEXTURE,
32824
+ /** @deprecated in favor of {@link DATA} */
32825
+ TAG: DATA,
32826
+ /**
32827
+ * Allows shape data to be modified.
32828
+ */
32829
+ DATA: DATA,
32830
+ /**
32831
+ * Allows shape data mapping to be modified.
32832
+ */
32833
+ DATA_MAPPING: DATA_MAPPING,
32834
+ /**
32835
+ * Allows shape actions to be modified.
32836
+ */
32837
+ ACTION: ACTION,
32838
+ /**
32839
+ * Allows shape cursors to be modified.
32840
+ */
32841
+ CURSOR: CURSOR,
32842
+ /**
32843
+ * Allows shape orders in layer to be modified.
32844
+ */
32845
+ ORDER_IN_LAYER: ORDER_IN_LAYER,
32846
+ /**
32847
+ * Allows shape children to be modified.
32848
+ */
32849
+ CHILDREN: CHILDREN,
32850
+ COORDINATE: COORDINATE,
32851
+ SHAPE: SHAPE,
32852
+ LAYER: LAYER,
32853
+ PRIMITIVE: PRIMITIVE,
32854
+ GROUP: GROUP,
32855
+ EMBEDDED: EMBEDDED,
32856
+ CONNECTOR: CONNECTOR,
32857
+ ALL: ALL
32858
+ };
32859
+
32860
+ /*
32861
+ * Copyright (C) 2019 Toshiba Corporation
32862
+ * SPDX-License-Identifier: Apache-2.0
32863
+ */
32864
+ var EShapeCapabilities = /** @class */ (function () {
32865
+ function EShapeCapabilities() {
32866
+ }
32867
+ EShapeCapabilities.get = function (type) {
32868
+ var capability = this.mappings[type];
32869
+ if (capability != null) {
32870
+ return capability;
32871
+ }
32872
+ return EShapeCapability.PRIMITIVE;
32873
+ };
32874
+ EShapeCapabilities.contains = function (shape, target) {
32875
+ if (shape != null) {
32876
+ var capability = this.get(shape.type);
32877
+ if (capability & target) {
32878
+ return true;
32879
+ }
32880
+ if (capability & EShapeCapability.CHILDREN) {
32881
+ var children = shape.children;
32882
+ for (var i = 0, imax = children.length; i < imax; ++i) {
32883
+ if (this.contains(children[i], target)) {
32884
+ return true;
32885
+ }
32886
+ }
32887
+ }
32888
+ }
32889
+ return false;
32890
+ };
32891
+ EShapeCapabilities.set = function (type, capability) {
32892
+ this.mappings[type] = capability;
32893
+ };
32894
+ EShapeCapabilities.mappings = {};
32895
+ return EShapeCapabilities;
32896
+ }());
32897
+
32998
32898
  /*
32999
32899
  * Copyright (C) 2019 Toshiba Corporation
33000
32900
  * SPDX-License-Identifier: Apache-2.0
@@ -36787,7 +36687,7 @@ var createGroupUploaded = function (buffer, shape, voffset, ioffset) {
36787
36687
  * SPDX-License-Identifier: Apache-2.0
36788
36688
  */
36789
36689
  var create = function (name, width, height, container, manager, item, shape) {
36790
- shape = shape || new EShapeEmbedded(name, manager.isEditMode);
36690
+ shape = shape || new EShapeEmbedded(name);
36791
36691
  var result = deserializeBase(item, manager, shape);
36792
36692
  var shapeSize = shape.size;
36793
36693
  var sizeX = shapeSize.x;
@@ -36800,17 +36700,18 @@ var create = function (name, width, height, container, manager, item, shape) {
36800
36700
  return result;
36801
36701
  };
36802
36702
  var createMissing = function (name, manager, item, shape) {
36803
- shape = shape || new EShapeEmbedded(name, manager.isEditMode);
36703
+ shape = shape || new EShapeEmbedded(name);
36804
36704
  var result = deserializeBase(item, manager, shape);
36805
36705
  var size = shape.size;
36806
36706
  var sizeX = size.x;
36807
36707
  var sizeY = size.y;
36808
36708
  var children = shape.children;
36809
- var layer = new EShapeEmbeddedLayer("missing", manager.isEditMode);
36709
+ var layer = new EShapeEmbeddedLayer("missing");
36810
36710
  var px = 0.5 * sizeX;
36811
36711
  var py = 0.5 * sizeX;
36812
36712
  layer.transform.position.set(-px, -py);
36813
36713
  layer.size.set(sizeX, sizeY);
36714
+ layer.size.init();
36814
36715
  layer.parent = shape;
36815
36716
  var rectangle = new EShapeRectangle();
36816
36717
  rectangle.stroke.color = 0xff0000;
@@ -37111,89 +37012,467 @@ var EShapeGroupPoints = /** @class */ (function () {
37111
37012
  return points.getMarker();
37112
37013
  }
37113
37014
  }
37114
- return undefined;
37015
+ return undefined;
37016
+ };
37017
+ Object.defineProperty(EShapeGroupPoints.prototype, "formatter", {
37018
+ get: function () {
37019
+ var children = this._parent.children;
37020
+ if (0 < children.length) {
37021
+ var points = children[children.length - 1].points;
37022
+ if (points != null) {
37023
+ return points.formatter;
37024
+ }
37025
+ }
37026
+ return null;
37027
+ },
37028
+ set: function (formatter) {
37029
+ var children = this._parent.children;
37030
+ for (var i = 0, imax = children.length; i < imax; ++i) {
37031
+ var points = children[i].points;
37032
+ if (points != null) {
37033
+ points.formatter = formatter;
37034
+ }
37035
+ }
37036
+ },
37037
+ enumerable: false,
37038
+ configurable: true
37039
+ });
37040
+ Object.defineProperty(EShapeGroupPoints.prototype, "formatted", {
37041
+ get: function () {
37042
+ var children = this._parent.children;
37043
+ if (0 < children.length) {
37044
+ var points = children[children.length - 1].points;
37045
+ if (points != null) {
37046
+ return points.formatted;
37047
+ }
37048
+ }
37049
+ return this;
37050
+ },
37051
+ enumerable: false,
37052
+ configurable: true
37053
+ });
37054
+ EShapeGroupPoints.prototype.copy = function (source) {
37055
+ var children = this._parent.children;
37056
+ for (var i = 0, imax = children.length; i < imax; ++i) {
37057
+ var points = children[i].points;
37058
+ if (points != null) {
37059
+ points.copy(source);
37060
+ }
37061
+ }
37062
+ return this;
37063
+ };
37064
+ EShapeGroupPoints.prototype.set = function (values, segments, style) {
37065
+ var children = this._parent.children;
37066
+ for (var i = 0, imax = children.length; i < imax; ++i) {
37067
+ var points = children[i].points;
37068
+ if (points != null) {
37069
+ points.set(values, segments, style);
37070
+ }
37071
+ }
37072
+ return this;
37073
+ };
37074
+ EShapeGroupPoints.prototype.clone = function (parent) {
37075
+ return new EShapeGroupPoints(parent);
37076
+ };
37077
+ EShapeGroupPoints.prototype.toPoints = function (transform) {
37078
+ var children = this._parent.children;
37079
+ for (var i = 0, imax = children.length; i < imax; ++i) {
37080
+ var points = children[i].points;
37081
+ if (points != null) {
37082
+ return points.toPoints(transform);
37083
+ }
37084
+ }
37085
+ return [];
37086
+ };
37087
+ EShapeGroupPoints.prototype.serialize = function (manager) {
37088
+ var children = this._parent.children;
37089
+ for (var i = 0, imax = children.length; i < imax; ++i) {
37090
+ var points = children[i].points;
37091
+ if (points != null) {
37092
+ return points.serialize(manager);
37093
+ }
37094
+ }
37095
+ return -1;
37096
+ };
37097
+ return EShapeGroupPoints;
37098
+ }());
37099
+
37100
+ /*
37101
+ * Copyright (C) 2019 Toshiba Corporation
37102
+ * SPDX-License-Identifier: Apache-2.0
37103
+ */
37104
+ var EShapeEditor = /** @class */ (function () {
37105
+ function EShapeEditor() {
37106
+ this.localTransform = new pixi_js.Matrix();
37107
+ this.internalTransform = new pixi_js.Matrix();
37108
+ this.internalTransformParentInverse = new pixi_js.Matrix();
37109
+ this.rotation = 0;
37110
+ this.size = new pixi_js.Point();
37111
+ }
37112
+ return EShapeEditor;
37113
+ }());
37114
+
37115
+ /*
37116
+ * Copyright (C) 2019 Toshiba Corporation
37117
+ * SPDX-License-Identifier: Apache-2.0
37118
+ */
37119
+ var EShapeTransforms = /** @class */ (function () {
37120
+ function EShapeTransforms() {
37121
+ }
37122
+ EShapeTransforms.prepare = function (shape) {
37123
+ var editor = shape.editor || new EShapeEditor();
37124
+ shape.editor = editor;
37125
+ // Transform
37126
+ shape.updateTransform();
37127
+ var parent = shape.parent;
37128
+ if (parent instanceof EShapeBase) {
37129
+ parent.transform.internalTransform
37130
+ .copyTo(editor.internalTransformParentInverse)
37131
+ .invert();
37132
+ }
37133
+ else {
37134
+ editor.internalTransformParentInverse.identity();
37135
+ }
37136
+ shape.transform.internalTransform.copyTo(editor.internalTransform);
37137
+ // Rotation
37138
+ editor.rotation = shape.transform.rotation;
37139
+ // Size
37140
+ editor.size.copyFrom(shape.size);
37141
+ //
37142
+ shape.disallowOnTransformChange();
37143
+ };
37144
+ EShapeTransforms.finalize = function (shape) {
37145
+ shape.allowOnTransformChange(true);
37146
+ };
37147
+ EShapeTransforms.apply = function (shape, transform, keepSize) {
37148
+ var editor = shape.editor;
37149
+ if (editor != null) {
37150
+ var newLocalTransform = editor.localTransform;
37151
+ editor.internalTransformParentInverse
37152
+ .copyTo(newLocalTransform)
37153
+ .append(transform)
37154
+ .append(editor.internalTransform);
37155
+ if (keepSize) {
37156
+ this.applyLocal(shape, newLocalTransform);
37157
+ }
37158
+ else {
37159
+ var size = editor.size;
37160
+ this.applyLocal(shape, newLocalTransform, size.x, size.y);
37161
+ }
37162
+ }
37163
+ };
37164
+ EShapeTransforms.applyLocal = function (shape, localTransform, bx, by) {
37165
+ shape.disallowUploadedUpdate();
37166
+ // Reconstruct the position, the rotation and the size
37167
+ var a = localTransform.a;
37168
+ var b = localTransform.b;
37169
+ var c = localTransform.c;
37170
+ var d = localTransform.d;
37171
+ var tx = localTransform.tx;
37172
+ var ty = localTransform.ty;
37173
+ // Rotation
37174
+ var transform = shape.transform;
37175
+ var rx = Math.atan2(-c, d); // rotation - skewX
37176
+ var ry = Math.atan2(+b, a); // rotation + skewY
37177
+ transform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`
37178
+ // Skew
37179
+ var skew = (ry - rx) * 0.5;
37180
+ transform.skew.set(skew, skew);
37181
+ // Position: Assumes the pivot is invariant.
37182
+ // tx = position.x - (a * px + c * py)
37183
+ // ty = position.y - (b * px + d * py)
37184
+ //
37185
+ // Thus,
37186
+ // position.x = tx + (a * px + c * py)
37187
+ // position.y = ty + (b * px + d * py)
37188
+ var pivot = transform.pivot;
37189
+ var px = pivot.x;
37190
+ var py = pivot.y;
37191
+ transform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));
37192
+ // Scale
37193
+ if (bx != null && by != null) {
37194
+ var sx = Math.sqrt(a * a + b * b);
37195
+ var sy = Math.sqrt(c * c + d * d);
37196
+ shape.size.set(toSizeNormalized(bx * sx), toSizeNormalized(by * sy));
37197
+ }
37198
+ //
37199
+ shape.allowUploadedUpdate();
37115
37200
  };
37116
- Object.defineProperty(EShapeGroupPoints.prototype, "formatter", {
37201
+ return EShapeTransforms;
37202
+ }());
37203
+
37204
+ /*
37205
+ * Copyright (C) 2019 Toshiba Corporation
37206
+ * SPDX-License-Identifier: Apache-2.0
37207
+ */
37208
+ var EShapeGroupSizeLayout = /** @class */ (function () {
37209
+ function EShapeGroupSizeLayout(shape, bx, by) {
37210
+ this.shape = shape;
37211
+ // Base group size
37212
+ this.base = new pixi_js.Point(bx, by);
37213
+ // Base shape size
37214
+ var size = shape.size;
37215
+ this.shapeBase = new pixi_js.Point(size.x, size.y);
37216
+ // Transform
37217
+ this.transform = new pixi_js.Matrix();
37218
+ shape.updateTransform();
37219
+ shape.transform.localTransform.copyTo(this.transform);
37220
+ this.capable =
37221
+ EShapeCapabilities.contains(shape, EShapeCapability.POSITION) &&
37222
+ EShapeCapabilities.contains(shape, EShapeCapability.WIDTH) &&
37223
+ EShapeCapabilities.contains(shape, EShapeCapability.HEIGHT) &&
37224
+ EShapeCapabilities.contains(shape, EShapeCapability.ROTATION) &&
37225
+ EShapeCapabilities.contains(shape, EShapeCapability.SKEW);
37226
+ }
37227
+ EShapeGroupSizeLayout.prototype.isCompatible = function (shape) {
37228
+ return this.shape === shape;
37229
+ };
37230
+ EShapeGroupSizeLayout.prototype.reset = function (shape, baseX, baseY) {
37231
+ this.base.set(baseX, baseY);
37232
+ // Base shape size
37233
+ var size = shape.size;
37234
+ this.shapeBase.copyFrom(size);
37235
+ // Transform
37236
+ shape.updateTransform();
37237
+ shape.transform.localTransform.copyTo(this.transform);
37238
+ };
37239
+ EShapeGroupSizeLayout.prototype.update = function (shape, baseX, baseY, pivotX, pivotY) {
37240
+ if (!this.capable) {
37241
+ return;
37242
+ }
37243
+ var sx = baseX / this.base.x;
37244
+ var sy = baseY / this.base.y;
37245
+ var childBase = this.shapeBase;
37246
+ var transform = EShapeGroupSizeLayout.WORK_TRANSFORM;
37247
+ transform
37248
+ .identity()
37249
+ .append(this.transform)
37250
+ .translate(-pivotX, -pivotY)
37251
+ .scale(sx, sy)
37252
+ .translate(+pivotX, +pivotY);
37253
+ shape.disallowOnTransformChange();
37254
+ EShapeTransforms.applyLocal(shape, transform, childBase.x, childBase.y);
37255
+ shape.allowOnTransformChange(false);
37256
+ };
37257
+ EShapeGroupSizeLayout.WORK_TRANSFORM = new pixi_js.Matrix();
37258
+ return EShapeGroupSizeLayout;
37259
+ }());
37260
+
37261
+ /*
37262
+ * Copyright (C) 2019 Toshiba Corporation
37263
+ * SPDX-License-Identifier: Apache-2.0
37264
+ */
37265
+ var EShapeGroupSizeEditor = /** @class */ (function () {
37266
+ function EShapeGroupSizeEditor(parent, x, y, isFittable) {
37267
+ this._workRectForCalcRect = new pixi_js.Rectangle();
37268
+ this._workRectForFit = new pixi_js.Rectangle();
37269
+ this._parent = parent;
37270
+ this._layouts = [];
37271
+ this._size = new pixi_js.Point(x, y);
37272
+ this._isFittable = isFittable;
37273
+ }
37274
+ EShapeGroupSizeEditor.prototype.init = function () {
37275
+ // DO NOTHING
37276
+ };
37277
+ Object.defineProperty(EShapeGroupSizeEditor.prototype, "x", {
37117
37278
  get: function () {
37118
- var children = this._parent.children;
37119
- if (0 < children.length) {
37120
- var points = children[children.length - 1].points;
37121
- if (points != null) {
37122
- return points.formatter;
37123
- }
37124
- }
37125
- return null;
37279
+ return this._size.x;
37126
37280
  },
37127
- set: function (formatter) {
37128
- var children = this._parent.children;
37129
- for (var i = 0, imax = children.length; i < imax; ++i) {
37130
- var points = children[i].points;
37131
- if (points != null) {
37132
- points.formatter = formatter;
37133
- }
37281
+ set: function (x) {
37282
+ var size = this._size;
37283
+ if (size.x !== x) {
37284
+ var ox = size.x;
37285
+ size.x = x;
37286
+ this.onChange(ox, size.y);
37134
37287
  }
37135
37288
  },
37136
37289
  enumerable: false,
37137
37290
  configurable: true
37138
37291
  });
37139
- Object.defineProperty(EShapeGroupPoints.prototype, "formatted", {
37292
+ Object.defineProperty(EShapeGroupSizeEditor.prototype, "y", {
37140
37293
  get: function () {
37141
- var children = this._parent.children;
37142
- if (0 < children.length) {
37143
- var points = children[children.length - 1].points;
37144
- if (points != null) {
37145
- return points.formatted;
37146
- }
37294
+ return this._size.y;
37295
+ },
37296
+ set: function (y) {
37297
+ var size = this._size;
37298
+ if (size.y !== y) {
37299
+ var oy = size.y;
37300
+ size.y = y;
37301
+ this.onChange(size.x, oy);
37147
37302
  }
37148
- return this;
37149
37303
  },
37150
37304
  enumerable: false,
37151
37305
  configurable: true
37152
37306
  });
37153
- EShapeGroupPoints.prototype.copy = function (source) {
37154
- var children = this._parent.children;
37155
- for (var i = 0, imax = children.length; i < imax; ++i) {
37156
- var points = children[i].points;
37157
- if (points != null) {
37158
- points.copy(source);
37159
- }
37307
+ EShapeGroupSizeEditor.prototype.set = function (x, y) {
37308
+ var isChanged = false;
37309
+ var size = this._size;
37310
+ var ox = size.x;
37311
+ var oy = size.y;
37312
+ if (x != null && ox !== x) {
37313
+ isChanged = true;
37314
+ size.x = x;
37315
+ }
37316
+ if (y != null && oy !== y) {
37317
+ isChanged = true;
37318
+ size.y = y;
37319
+ }
37320
+ if (isChanged) {
37321
+ this.onChange(ox, oy);
37160
37322
  }
37161
37323
  return this;
37162
37324
  };
37163
- EShapeGroupPoints.prototype.set = function (values, segments, style) {
37164
- var children = this._parent.children;
37165
- for (var i = 0, imax = children.length; i < imax; ++i) {
37166
- var points = children[i].points;
37167
- if (points != null) {
37168
- points.set(values, segments, style);
37169
- }
37325
+ EShapeGroupSizeEditor.prototype.clone = function () {
37326
+ var size = this._size;
37327
+ return new EShapeGroupSizeEditor(this._parent, size.x, size.y, this._isFittable);
37328
+ };
37329
+ EShapeGroupSizeEditor.prototype.copy = function () {
37330
+ // DO NOTHING
37331
+ };
37332
+ EShapeGroupSizeEditor.prototype.copyFrom = function (point) {
37333
+ var x = point.x;
37334
+ var y = point.y;
37335
+ var size = this._size;
37336
+ var ox = size.x;
37337
+ var oy = size.y;
37338
+ if (ox !== x || oy !== y) {
37339
+ size.x = x;
37340
+ size.y = y;
37341
+ this.onChange(ox, oy);
37170
37342
  }
37171
37343
  return this;
37172
37344
  };
37173
- EShapeGroupPoints.prototype.clone = function (parent) {
37174
- return new EShapeGroupPoints(parent);
37345
+ EShapeGroupSizeEditor.prototype.copyTo = function (point) {
37346
+ return this._size.copyTo(point);
37175
37347
  };
37176
- EShapeGroupPoints.prototype.toPoints = function (transform) {
37177
- var children = this._parent.children;
37178
- for (var i = 0, imax = children.length; i < imax; ++i) {
37179
- var points = children[i].points;
37180
- if (points != null) {
37181
- return points.toPoints(transform);
37348
+ EShapeGroupSizeEditor.prototype.equals = function (point) {
37349
+ return this._size.equals(point);
37350
+ };
37351
+ EShapeGroupSizeEditor.prototype.fit = function () {
37352
+ if (this._isFittable) {
37353
+ this.doFit();
37354
+ }
37355
+ };
37356
+ EShapeGroupSizeEditor.prototype.doFit = function () {
37357
+ var parent = this._parent;
37358
+ parent.disallowOnTransformChange();
37359
+ // Calculate the rect
37360
+ var rect = this.calcRect(this._workRectForFit);
37361
+ // Set size
37362
+ var size = this._size;
37363
+ size.set(rect.width, rect.height);
37364
+ // Position & Pivot
37365
+ // rx := rect.x
37366
+ // ry := rect.y
37367
+ //
37368
+ // | a c tx | | 1 0 +rx | | 1 0 -rx | | a c tx + (a * rx + c * ry) | | 1 0 -rx |
37369
+ // | b d ty | | 0 1 +ry | | 0 1 -ry | = | b d ty + (b * rx + d * ry) | | 0 1 -ry |
37370
+ // | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 |
37371
+ //
37372
+ // tx -> tx + (a * rx + c * ry) = poxition.x - (a * pivot.x + c * pivot.y)
37373
+ // ty -> ty + (b * rx + d * ry) = poxition.y - (b * pivot.x + d * pivot.y)
37374
+ // position.x -> position.x + (a * rx + c * ry) - (a * pivot.x + c * pivot.y)
37375
+ // position.y -> position.y + (b * rx + d * ry) - (b * pivot.x + d * pivot.y)
37376
+ // pivot.x -> 0
37377
+ // pivot.y -> 0
37378
+ //
37379
+ // a -> a', b -> b', c -> c', tx -> tx', ty -> ty'
37380
+ //
37381
+ // | a' c' tx' | | 1 0 -rx | | a' c' tx' - (a' * rx + c' * ry) |
37382
+ // | b' d' ty' | | 0 1 -ry | = | b' d' ty' - (b' * rx + d' * ry) |
37383
+ // | 0 0 1 | | 0 0 1 | | 0 0 1 |
37384
+ //
37385
+ // tx' -> tx' - (a' * rx + c' * ry) = poxition.x - (a' * pivot.x + c' * pivot.y)
37386
+ // ty' -> ty' - (b' * rx + d' * ry) = poxition.y - (b' * pivot.x + d' * pivot.y)
37387
+ // pivot.x -> pivot.x + rx
37388
+ // pivot.y -> pivot.y + ry
37389
+ parent.updateTransform();
37390
+ var transform = parent.transform;
37391
+ var x = rect.x + rect.width * 0.5;
37392
+ var y = rect.y + rect.height * 0.5;
37393
+ var position = transform.position;
37394
+ var localTransform = transform.localTransform;
37395
+ var a = localTransform.a;
37396
+ var b = localTransform.b;
37397
+ var c = localTransform.c;
37398
+ var d = localTransform.d;
37399
+ var pivot = transform.pivot;
37400
+ position.set(position.x + (a * x + c * y) - (a * pivot.x + c * pivot.y), position.y + (b * x + d * y) - (b * pivot.x + d * pivot.y));
37401
+ pivot.set(x, y);
37402
+ // Reset the data
37403
+ this.reset(parent.children, this._layouts, size);
37404
+ //
37405
+ parent.allowOnTransformChange(true);
37406
+ };
37407
+ EShapeGroupSizeEditor.prototype.reset = function (children, layouts, size) {
37408
+ for (var i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {
37409
+ var child = children[i];
37410
+ var layout = layouts[i];
37411
+ if (layout.isCompatible(child)) {
37412
+ layout.reset(child, size.x, size.y);
37413
+ }
37414
+ else {
37415
+ layouts.length = i;
37416
+ break;
37182
37417
  }
37183
37418
  }
37184
- return [];
37419
+ if (children.length < layouts.length) {
37420
+ layouts.length = children.length;
37421
+ }
37185
37422
  };
37186
- EShapeGroupPoints.prototype.serialize = function (manager) {
37187
- var children = this._parent.children;
37188
- for (var i = 0, imax = children.length; i < imax; ++i) {
37189
- var points = children[i].points;
37190
- if (points != null) {
37191
- return points.serialize(manager);
37423
+ EShapeGroupSizeEditor.prototype.calcRect = function (result) {
37424
+ var parent = this._parent;
37425
+ var children = parent.children;
37426
+ if (children.length <= 0) {
37427
+ result.x = 0;
37428
+ result.y = 0;
37429
+ result.width = 0;
37430
+ result.height = 0;
37431
+ }
37432
+ else {
37433
+ var workRect = this._workRectForCalcRect;
37434
+ children[0].getBoundsLocal(false, result);
37435
+ for (var i = 1, imax = children.length; i < imax; ++i) {
37436
+ var child = children[i];
37437
+ child.getBoundsLocal(false, workRect);
37438
+ result.enlarge(workRect);
37192
37439
  }
37193
37440
  }
37194
- return -1;
37441
+ return result;
37195
37442
  };
37196
- return EShapeGroupPoints;
37443
+ EShapeGroupSizeEditor.prototype.onChange = function (ox, oy) {
37444
+ var parent = this._parent;
37445
+ var size = this._size;
37446
+ var pivot = parent.transform.pivot;
37447
+ this.onChange_(parent.children, this._layouts, size.x, size.y, pivot.x, pivot.y, ox, oy);
37448
+ parent.onSizeChange();
37449
+ };
37450
+ EShapeGroupSizeEditor.prototype.onChange_ = function (children, layouts, sx, sy, px, py, ox, oy) {
37451
+ for (var i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {
37452
+ var child = children[i];
37453
+ var layout = layouts[i];
37454
+ if (layout.isCompatible(child)) {
37455
+ layout.update(child, sx, sy, px, py);
37456
+ }
37457
+ else {
37458
+ layouts.length = i;
37459
+ break;
37460
+ }
37461
+ }
37462
+ for (var i = layouts.length, imax = children.length; i < imax; ++i) {
37463
+ var child = children[i];
37464
+ var layout = this.newLayout(child, ox, oy);
37465
+ layout.update(child, sx, sy, px, py);
37466
+ layouts.push(layout);
37467
+ }
37468
+ if (layouts.length !== children.length) {
37469
+ layouts.length = children.length;
37470
+ }
37471
+ };
37472
+ EShapeGroupSizeEditor.prototype.newLayout = function (shape, ox, oy) {
37473
+ return shape.layout || new EShapeGroupSizeLayout(shape, ox, oy);
37474
+ };
37475
+ return EShapeGroupSizeEditor;
37197
37476
  }());
37198
37477
 
37199
37478
  /*
@@ -43046,7 +43325,7 @@ var EShapeEmbeddeds = /** @class */ (function () {
43046
43325
  });
43047
43326
  };
43048
43327
  EShapeEmbeddeds.create = function (name, width, height, container, manager) {
43049
- var shape = new EShapeEmbedded(name, manager.isEditMode);
43328
+ var shape = new EShapeEmbedded(name);
43050
43329
  shape.size.set(width, height);
43051
43330
  container.copyTo(shape);
43052
43331
  shape.size.init();
@@ -53484,6 +53763,14 @@ var DThemeWhiteTableHeaderCell = /** @class */ (function (_super) {
53484
53763
  DThemeWhiteTableHeaderCell.prototype.newTextValue = function () {
53485
53764
  return null;
53486
53765
  };
53766
+ DThemeWhiteTableHeaderCell.prototype.getImageTintColor = function (state, isActive) {
53767
+ if (state.inDisabled || state.inReadOnly || !(state.isActive || isActive)) {
53768
+ return DThemeWhiteConstants.WEAK_HIGHLIGHT_COLOR;
53769
+ }
53770
+ else {
53771
+ return DThemeWhiteConstants.HIGHLIGHT_COLOR;
53772
+ }
53773
+ };
53487
53774
  DThemeWhiteTableHeaderCell.prototype.getSecondaryImageTintColor = function (state) {
53488
53775
  if (state.is(DTableState.CHECKABLE)) {
53489
53776
  return DThemeWhiteButtonChecks.getImageTintColor(state);
@@ -53516,6 +53803,9 @@ var DThemeWhiteTableHeaderCell = /** @class */ (function (_super) {
53516
53803
  return null;
53517
53804
  }
53518
53805
  };
53806
+ DThemeWhiteTableHeaderCell.prototype.getTertiaryImageTintColor = function (state) {
53807
+ return _super.prototype.getImageTintColor.call(this, state);
53808
+ };
53519
53809
  DThemeWhiteTableHeaderCell.prototype.getTertiaryImageAlignHorizontal = function () {
53520
53810
  return DAlignHorizontal.RIGHT;
53521
53811
  };
@@ -62330,6 +62620,14 @@ var DThemeDarkTableHeaderCell = /** @class */ (function (_super) {
62330
62620
  DThemeDarkTableHeaderCell.prototype.newTextValue = function () {
62331
62621
  return null;
62332
62622
  };
62623
+ DThemeDarkTableHeaderCell.prototype.getImageTintColor = function (state, isActive) {
62624
+ if (state.inDisabled || state.inReadOnly || !(state.isActive || isActive)) {
62625
+ return DThemeDarkConstants.WEAK_HIGHLIGHT_COLOR;
62626
+ }
62627
+ else {
62628
+ return DThemeDarkConstants.HIGHLIGHT_COLOR;
62629
+ }
62630
+ };
62333
62631
  DThemeDarkTableHeaderCell.prototype.getSecondaryImageTintColor = function (state) {
62334
62632
  if (state.is(DTableState.CHECKABLE)) {
62335
62633
  return DThemeDarkButtonChecks.getImageTintColor(state);
@@ -62362,6 +62660,9 @@ var DThemeDarkTableHeaderCell = /** @class */ (function (_super) {
62362
62660
  return null;
62363
62661
  }
62364
62662
  };
62663
+ DThemeDarkTableHeaderCell.prototype.getTertiaryImageTintColor = function (state) {
62664
+ return _super.prototype.getImageTintColor.call(this, state);
62665
+ };
62365
62666
  DThemeDarkTableHeaderCell.prototype.getTertiaryImageAlignHorizontal = function () {
62366
62667
  return DAlignHorizontal.RIGHT;
62367
62668
  };
@@ -63181,6 +63482,19 @@ var DynamicFontAtlases = /** @class */ (function () {
63181
63482
  return DynamicFontAtlases;
63182
63483
  }());
63183
63484
 
63485
+ /*
63486
+ * Copyright (C) 2019 Toshiba Corporation
63487
+ * SPDX-License-Identifier: Apache-2.0
63488
+ */
63489
+ var isObject = function (target) {
63490
+ if (typeof target === "object" &&
63491
+ Object.prototype.toString.call(target) === "[object Object]") {
63492
+ var prototype = Object.getPrototypeOf(target);
63493
+ return prototype == null || prototype === Object.prototype;
63494
+ }
63495
+ return false;
63496
+ };
63497
+
63184
63498
  /*
63185
63499
  * Copyright (C) 2019 Toshiba Corporation
63186
63500
  * SPDX-License-Identifier: Apache-2.0
@@ -63244,6 +63558,76 @@ var toCeilingIndex = function (array, value, size, offset) {
63244
63558
  return Math.max(i0, i1);
63245
63559
  };
63246
63560
 
63561
+ /*
63562
+ * Copyright (C) 2019 Toshiba Corporation
63563
+ * SPDX-License-Identifier: Apache-2.0
63564
+ */
63565
+ var toClonedArray = function (target) {
63566
+ var result = [];
63567
+ for (var i = 0, imax = target.length; i < imax; ++i) {
63568
+ result[i] = target[i];
63569
+ }
63570
+ return result;
63571
+ };
63572
+ var toClonedObject = function (target) {
63573
+ var result = {};
63574
+ for (var key in target) {
63575
+ if (Object.hasOwnProperty.call(target, key)) {
63576
+ result[key] = toCloned(target[key]);
63577
+ }
63578
+ }
63579
+ return result;
63580
+ };
63581
+ var toCloned = function (target) {
63582
+ if (isArray(target)) {
63583
+ return toClonedArray(target);
63584
+ }
63585
+ else if (isObject(target)) {
63586
+ return toClonedObject(target);
63587
+ }
63588
+ return target;
63589
+ };
63590
+
63591
+ /*
63592
+ * Copyright (C) 2019 Toshiba Corporation
63593
+ * SPDX-License-Identifier: Apache-2.0
63594
+ */
63595
+ var toMerged = function (one, other) {
63596
+ if (one != null) {
63597
+ var o = toCloned(one);
63598
+ if (other != null) {
63599
+ for (var key in other) {
63600
+ if (Object.prototype.hasOwnProperty.call(other, key)) {
63601
+ var otherValue = other[key];
63602
+ if (isObject(otherValue)) {
63603
+ if (Object.prototype.hasOwnProperty.call(o, key)) {
63604
+ var oneValue = o[key];
63605
+ if (isObject(oneValue)) {
63606
+ toMerged(oneValue, otherValue);
63607
+ }
63608
+ }
63609
+ else {
63610
+ o[key] = toCloned(otherValue);
63611
+ }
63612
+ }
63613
+ else {
63614
+ if (!Object.prototype.hasOwnProperty.call(o, key)) {
63615
+ o[key] = otherValue;
63616
+ }
63617
+ }
63618
+ }
63619
+ }
63620
+ }
63621
+ return o;
63622
+ }
63623
+ else if (other != null) {
63624
+ return toCloned(other);
63625
+ }
63626
+ else {
63627
+ return {};
63628
+ }
63629
+ };
63630
+
63247
63631
  /*
63248
63632
  * Copyright (C) 2019 Toshiba Corporation
63249
63633
  * SPDX-License-Identifier: Apache-2.0
@@ -64482,9 +64866,9 @@ var isCommandClear = function (command) {
64482
64866
  var isCommandClean = function (command) {
64483
64867
  return !!(command.getFlag() & DCommandFlag.CLEAN);
64484
64868
  };
64485
- var DControllerDefaultCommand = /** @class */ (function (_super) {
64486
- __extends(DControllerDefaultCommand, _super);
64487
- function DControllerDefaultCommand() {
64869
+ var DControllerCommandImpl = /** @class */ (function (_super) {
64870
+ __extends(DControllerCommandImpl, _super);
64871
+ function DControllerCommandImpl() {
64488
64872
  var _this = _super.call(this) || this;
64489
64873
  _this._position = 0;
64490
64874
  _this._done = [];
@@ -64492,7 +64876,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64492
64876
  _this._executing = null;
64493
64877
  return _this;
64494
64878
  }
64495
- DControllerDefaultCommand.prototype.last = function () {
64879
+ DControllerCommandImpl.prototype.last = function () {
64496
64880
  var done = this._done;
64497
64881
  var waiting = this._waiting;
64498
64882
  if (waiting.length <= 0) {
@@ -64507,11 +64891,11 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64507
64891
  return waiting[waiting.length - 1];
64508
64892
  }
64509
64893
  };
64510
- DControllerDefaultCommand.prototype.push = function (command) {
64894
+ DControllerCommandImpl.prototype.push = function (command) {
64511
64895
  this._waiting.push(command);
64512
64896
  this.next();
64513
64897
  };
64514
- DControllerDefaultCommand.prototype.next = function () {
64898
+ DControllerCommandImpl.prototype.next = function () {
64515
64899
  if (this._executing != null) {
64516
64900
  // Still executing a command.
64517
64901
  // So do nothing.
@@ -64539,7 +64923,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64539
64923
  this.execute(command);
64540
64924
  }
64541
64925
  };
64542
- DControllerDefaultCommand.prototype.executeUndo = function (command) {
64926
+ DControllerCommandImpl.prototype.executeUndo = function (command) {
64543
64927
  var _this = this;
64544
64928
  var done = this._done;
64545
64929
  if (this._position < done.length) {
@@ -64562,7 +64946,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64562
64946
  }
64563
64947
  }
64564
64948
  };
64565
- DControllerDefaultCommand.prototype.executeRedo = function (command) {
64949
+ DControllerCommandImpl.prototype.executeRedo = function (command) {
64566
64950
  var _this = this;
64567
64951
  var done = this._done;
64568
64952
  if (0 < this._position) {
@@ -64585,7 +64969,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64585
64969
  }
64586
64970
  }
64587
64971
  };
64588
- DControllerDefaultCommand.prototype.execute = function (command) {
64972
+ DControllerCommandImpl.prototype.execute = function (command) {
64589
64973
  var _this = this;
64590
64974
  var isClear = isCommandClear(command);
64591
64975
  var isStorable = isCommandStorable(command);
@@ -64613,7 +64997,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64613
64997
  });
64614
64998
  }
64615
64999
  };
64616
- DControllerDefaultCommand.prototype.cleanup = function () {
65000
+ DControllerCommandImpl.prototype.cleanup = function () {
64617
65001
  var done = this._done;
64618
65002
  var size = done.length - 100;
64619
65003
  if (0 < size) {
@@ -64623,7 +65007,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64623
65007
  }
64624
65008
  }
64625
65009
  };
64626
- DControllerDefaultCommand.prototype.remove = function (size) {
65010
+ DControllerCommandImpl.prototype.remove = function (size) {
64627
65011
  var done = this._done;
64628
65012
  if (0 < size) {
64629
65013
  var ifrom = Math.max(0, done.length - size);
@@ -64638,7 +65022,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64638
65022
  }
64639
65023
  return false;
64640
65024
  };
64641
- DControllerDefaultCommand.prototype.onSuccess = function (command) {
65025
+ DControllerCommandImpl.prototype.onSuccess = function (command) {
64642
65026
  this._executing = null;
64643
65027
  if (isCommandStorable(command)) {
64644
65028
  this._done.push(command);
@@ -64649,7 +65033,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64649
65033
  this.emit("change", this);
64650
65034
  this.next();
64651
65035
  };
64652
- DControllerDefaultCommand.prototype.onSuccessUndo = function (undoed) {
65036
+ DControllerCommandImpl.prototype.onSuccessUndo = function (undoed) {
64653
65037
  this._executing = null;
64654
65038
  if (!isCommandClean(undoed)) {
64655
65039
  this.emit("dirty", this);
@@ -64657,7 +65041,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64657
65041
  this.emit("change", this);
64658
65042
  this.next();
64659
65043
  };
64660
- DControllerDefaultCommand.prototype.onSuccessRedo = function (redoed) {
65044
+ DControllerCommandImpl.prototype.onSuccessRedo = function (redoed) {
64661
65045
  this._executing = null;
64662
65046
  if (!isCommandClean(redoed)) {
64663
65047
  this.emit("dirty", this);
@@ -64665,7 +65049,7 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64665
65049
  this.emit("change", this);
64666
65050
  this.next();
64667
65051
  };
64668
- DControllerDefaultCommand.prototype.onFail = function (command) {
65052
+ DControllerCommandImpl.prototype.onFail = function (command) {
64669
65053
  this._executing = null;
64670
65054
  var waiting = this._waiting;
64671
65055
  command.destroy();
@@ -64675,31 +65059,31 @@ var DControllerDefaultCommand = /** @class */ (function (_super) {
64675
65059
  waiting.length = 0;
64676
65060
  this.emit("change", this);
64677
65061
  };
64678
- DControllerDefaultCommand.prototype.size = function () {
65062
+ DControllerCommandImpl.prototype.size = function () {
64679
65063
  return this._done.length;
64680
65064
  };
64681
- DControllerDefaultCommand.prototype.clear = function () {
65065
+ DControllerCommandImpl.prototype.clear = function () {
64682
65066
  this.push(new DCommandClear());
64683
65067
  };
64684
- DControllerDefaultCommand.prototype.redo = function () {
65068
+ DControllerCommandImpl.prototype.redo = function () {
64685
65069
  if (this.isRedoable()) {
64686
65070
  this._waiting.push(new DCommandRedo());
64687
65071
  this.next();
64688
65072
  }
64689
65073
  };
64690
- DControllerDefaultCommand.prototype.undo = function () {
65074
+ DControllerCommandImpl.prototype.undo = function () {
64691
65075
  if (this.isUndoable()) {
64692
65076
  this._waiting.push(new DCommandUndo());
64693
65077
  this.next();
64694
65078
  }
64695
65079
  };
64696
- DControllerDefaultCommand.prototype.isRedoable = function () {
65080
+ DControllerCommandImpl.prototype.isRedoable = function () {
64697
65081
  return 0 < this._position && this._executing == null;
64698
65082
  };
64699
- DControllerDefaultCommand.prototype.isUndoable = function () {
65083
+ DControllerCommandImpl.prototype.isUndoable = function () {
64700
65084
  return this._position < this._done.length && this._executing == null;
64701
65085
  };
64702
- return DControllerDefaultCommand;
65086
+ return DControllerCommandImpl;
64703
65087
  }(pixi_js.utils.EventEmitter));
64704
65088
 
64705
65089
  /*
@@ -64786,7 +65170,7 @@ var DControllers = /** @class */ (function () {
64786
65170
  // Command
64787
65171
  DControllers.getCommandController = function () {
64788
65172
  if (this.COMMAND == null) {
64789
- this.COMMAND = new DControllerDefaultCommand();
65173
+ this.COMMAND = new DControllerCommandImpl();
64790
65174
  }
64791
65175
  return this.COMMAND;
64792
65176
  };
@@ -65100,11 +65484,11 @@ var DApplicationLayer = /** @class */ (function (_super) {
65100
65484
  * Copyright (C) 2019 Toshiba Corporation
65101
65485
  * SPDX-License-Identifier: Apache-2.0
65102
65486
  */
65103
- var DControllerDefaultFocus = /** @class */ (function () {
65104
- function DControllerDefaultFocus() {
65487
+ var DControllerFocusImpl = /** @class */ (function () {
65488
+ function DControllerFocusImpl() {
65105
65489
  this._focused = null;
65106
65490
  }
65107
- DControllerDefaultFocus.prototype.focus = function (focusable) {
65491
+ DControllerFocusImpl.prototype.focus = function (focusable) {
65108
65492
  var previous = this._focused;
65109
65493
  if (previous !== focusable) {
65110
65494
  if (previous != null) {
@@ -65118,7 +65502,7 @@ var DControllerDefaultFocus = /** @class */ (function () {
65118
65502
  }
65119
65503
  return null;
65120
65504
  };
65121
- DControllerDefaultFocus.prototype.blur = function (focusable) {
65505
+ DControllerFocusImpl.prototype.blur = function (focusable) {
65122
65506
  if (focusable != null && this._focused === focusable) {
65123
65507
  this._focused = null;
65124
65508
  focusable.state.isFocused = false;
@@ -65126,10 +65510,10 @@ var DControllerDefaultFocus = /** @class */ (function () {
65126
65510
  }
65127
65511
  return null;
65128
65512
  };
65129
- DControllerDefaultFocus.prototype.clear = function () {
65513
+ DControllerFocusImpl.prototype.clear = function () {
65130
65514
  return this.focus(null);
65131
65515
  };
65132
- DControllerDefaultFocus.prototype.set = function (focusable, isFocused) {
65516
+ DControllerFocusImpl.prototype.set = function (focusable, isFocused) {
65133
65517
  if (isFocused) {
65134
65518
  return this.focus(focusable);
65135
65519
  }
@@ -65137,10 +65521,10 @@ var DControllerDefaultFocus = /** @class */ (function () {
65137
65521
  return this.blur(focusable);
65138
65522
  }
65139
65523
  };
65140
- DControllerDefaultFocus.prototype.get = function () {
65524
+ DControllerFocusImpl.prototype.get = function () {
65141
65525
  return this._focused;
65142
65526
  };
65143
- DControllerDefaultFocus.prototype.findParent = function (mightBeFocusable) {
65527
+ DControllerFocusImpl.prototype.findParent = function (mightBeFocusable) {
65144
65528
  var current = mightBeFocusable;
65145
65529
  while (current != null) {
65146
65530
  if (this.isFocusable(current)) {
@@ -65152,7 +65536,7 @@ var DControllerDefaultFocus = /** @class */ (function () {
65152
65536
  }
65153
65537
  return null;
65154
65538
  };
65155
- DControllerDefaultFocus.prototype.find = function (target, includesTarget, includesTargetChildren, direction, root) {
65539
+ DControllerFocusImpl.prototype.find = function (target, includesTarget, includesTargetChildren, direction, root) {
65156
65540
  if (direction) {
65157
65541
  var result = this.findNext(target, includesTarget, includesTargetChildren);
65158
65542
  if (result != null) {
@@ -65266,7 +65650,7 @@ var DControllerDefaultFocus = /** @class */ (function () {
65266
65650
  }
65267
65651
  return null;
65268
65652
  };
65269
- DControllerDefaultFocus.prototype.findNext = function (target, includesTarget, includesTargetChildren) {
65653
+ DControllerFocusImpl.prototype.findNext = function (target, includesTarget, includesTargetChildren) {
65270
65654
  // Target itself
65271
65655
  if (includesTarget) {
65272
65656
  if (this.isFocusable(target)) {
@@ -65297,7 +65681,7 @@ var DControllerDefaultFocus = /** @class */ (function () {
65297
65681
  // Found nothing
65298
65682
  return null;
65299
65683
  };
65300
- DControllerDefaultFocus.prototype.findPrevious = function (target, includesTarget, includesTargetChildren) {
65684
+ DControllerFocusImpl.prototype.findPrevious = function (target, includesTarget, includesTargetChildren) {
65301
65685
  // Target children
65302
65686
  if (includesTargetChildren && this.isFocusableContainer(target) && target.visible) {
65303
65687
  var children = target.children;
@@ -65328,26 +65712,26 @@ var DControllerDefaultFocus = /** @class */ (function () {
65328
65712
  // Found nothing
65329
65713
  return null;
65330
65714
  };
65331
- DControllerDefaultFocus.prototype.isFocusable = function (target) {
65715
+ DControllerFocusImpl.prototype.isFocusable = function (target) {
65332
65716
  return (target != null &&
65333
65717
  "state" in target &&
65334
65718
  target.state.inEnabled &&
65335
65719
  target.state.isFocusable &&
65336
65720
  target.visible);
65337
65721
  };
65338
- DControllerDefaultFocus.prototype.isFocusableContainer = function (target) {
65722
+ DControllerFocusImpl.prototype.isFocusableContainer = function (target) {
65339
65723
  return target != null && "children" in target;
65340
65724
  };
65341
- DControllerDefaultFocus.prototype.isFocusRoot = function (target, root) {
65725
+ DControllerFocusImpl.prototype.isFocusRoot = function (target, root) {
65342
65726
  if (target === root) {
65343
65727
  return true;
65344
65728
  }
65345
65729
  return target != null && "state" in target && target.state.isFocusRoot && target.visible;
65346
65730
  };
65347
- DControllerDefaultFocus.prototype.isFocusReverse = function (target) {
65731
+ DControllerFocusImpl.prototype.isFocusReverse = function (target) {
65348
65732
  return target != null && "state" in target && target.state.isFocusReverse;
65349
65733
  };
65350
- return DControllerDefaultFocus;
65734
+ return DControllerFocusImpl;
65351
65735
  }());
65352
65736
 
65353
65737
  /*
@@ -65429,7 +65813,7 @@ var DApplication = /** @class */ (function () {
65429
65813
  };
65430
65814
  DApplication.prototype.getFocusController = function () {
65431
65815
  if (this._focus == null) {
65432
- this._focus = new DControllerDefaultFocus();
65816
+ this._focus = new DControllerFocusImpl();
65433
65817
  }
65434
65818
  return this._focus;
65435
65819
  };
@@ -76324,7 +76708,7 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76324
76708
  list.push(value);
76325
76709
  }
76326
76710
  };
76327
- DDiagramCanvasDataImpl.prototype.set = function (id, value, time, from, to) {
76711
+ DDiagramCanvasDataImpl.prototype.set = function (id, value, time, state, from, to) {
76328
76712
  var data = this._data;
76329
76713
  if (data == null) {
76330
76714
  return false;
@@ -76346,6 +76730,10 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76346
76730
  if (time !== undefined) {
76347
76731
  datumValue.time = time;
76348
76732
  }
76733
+ // State
76734
+ if (state !== undefined) {
76735
+ datumValue.state = state;
76736
+ }
76349
76737
  // Value
76350
76738
  datumValue.value = value;
76351
76739
  }
@@ -76387,7 +76775,7 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76387
76775
  }
76388
76776
  return true;
76389
76777
  };
76390
- DDiagramCanvasDataImpl.prototype.setAll = function (id, values, times, from, to) {
76778
+ DDiagramCanvasDataImpl.prototype.setAll = function (id, values, times, states, from, to) {
76391
76779
  var data = this._data;
76392
76780
  if (data == null) {
76393
76781
  return false;
@@ -76409,12 +76797,16 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76409
76797
  if (times !== undefined) {
76410
76798
  datumValue.times = times;
76411
76799
  }
76800
+ // State
76801
+ if (states !== undefined) {
76802
+ datumValue.states = states;
76803
+ }
76412
76804
  // Value
76413
76805
  datumValue.values = values;
76414
76806
  }
76415
76807
  return true;
76416
76808
  };
76417
- DDiagramCanvasDataImpl.prototype.setValue = function (id, value, time) {
76809
+ DDiagramCanvasDataImpl.prototype.setValue = function (id, value) {
76418
76810
  var data = this._data;
76419
76811
  if (data == null) {
76420
76812
  return false;
@@ -76428,15 +76820,11 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76428
76820
  return false;
76429
76821
  }
76430
76822
  for (var i = 0; i < size; ++i) {
76431
- var datumValue = datum[i];
76432
- if (time !== undefined) {
76433
- datumValue.time = time;
76434
- }
76435
- datumValue.value = value;
76823
+ datum[i].value = value;
76436
76824
  }
76437
76825
  return true;
76438
76826
  };
76439
- DDiagramCanvasDataImpl.prototype.setValues = function (id, values, times) {
76827
+ DDiagramCanvasDataImpl.prototype.setValues = function (id, values) {
76440
76828
  var data = this._data;
76441
76829
  if (data == null) {
76442
76830
  return false;
@@ -76450,11 +76838,7 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76450
76838
  return false;
76451
76839
  }
76452
76840
  for (var i = 0; i < size; ++i) {
76453
- var datumValue = datum[i];
76454
- if (times !== undefined) {
76455
- datumValue.times = times;
76456
- }
76457
- datumValue.values = values;
76841
+ datum[i].values = values;
76458
76842
  }
76459
76843
  return true;
76460
76844
  };
@@ -76494,6 +76878,42 @@ var DDiagramCanvasDataImpl = /** @class */ (function () {
76494
76878
  }
76495
76879
  return true;
76496
76880
  };
76881
+ DDiagramCanvasDataImpl.prototype.setState = function (id, state) {
76882
+ var data = this._data;
76883
+ if (data == null) {
76884
+ return false;
76885
+ }
76886
+ var datum = data.get(id);
76887
+ if (datum == null) {
76888
+ return false;
76889
+ }
76890
+ var size = datum.length;
76891
+ if (size <= 0) {
76892
+ return false;
76893
+ }
76894
+ for (var i = 0; i < size; ++i) {
76895
+ datum[i].state = state;
76896
+ }
76897
+ return true;
76898
+ };
76899
+ DDiagramCanvasDataImpl.prototype.setStates = function (id, states) {
76900
+ var data = this._data;
76901
+ if (data == null) {
76902
+ return false;
76903
+ }
76904
+ var datum = data.get(id);
76905
+ if (datum == null) {
76906
+ return false;
76907
+ }
76908
+ var size = datum.length;
76909
+ if (size <= 0) {
76910
+ return false;
76911
+ }
76912
+ for (var i = 0; i < size; ++i) {
76913
+ datum[i].states = states;
76914
+ }
76915
+ return true;
76916
+ };
76497
76917
  DDiagramCanvasDataImpl.prototype.setRange = function (id, from, to) {
76498
76918
  var data = this._data;
76499
76919
  if (data == null) {
@@ -76917,7 +77337,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
76917
77337
  DDiagramCanvas.prototype.initialize = function (shapes, mapper) {
76918
77338
  var time = Date.now();
76919
77339
  var actionables = this._actionables;
76920
- this.initialize_(shapes, null, mapper, new Map(), new Map(), new Map(), this._ticker, this._shape, this._data, actionables);
77340
+ this.initialize_(shapes, null, null, mapper, new Map(), new Map(), new Map(), this._ticker, this._shape, this._data, actionables);
76921
77341
  var layers = this._layer.children;
76922
77342
  for (var i = 0, imax = layers.length; i < imax; ++i) {
76923
77343
  layers[i].initialize(actionables);
@@ -76932,7 +77352,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
76932
77352
  EShapeActionEnvironment.isInitializing = false;
76933
77353
  this._ticker.start();
76934
77354
  };
76935
- DDiagramCanvas.prototype.initialize_ = function (shapes, dataShape, mapper, formatToFormatter, initialToInitialValue, actionValueToRuntime, canvasTicker, canvasShape, canvasData, actionables) {
77355
+ DDiagramCanvas.prototype.initialize_ = function (shapes, dataShape, containerShape, mapper, formatToFormatter, initialToInitialValue, actionValueToRuntime, canvasTicker, canvasShape, canvasData, actionables) {
76936
77356
  var _loop_1 = function (i, imax) {
76937
77357
  var shape = shapes[i];
76938
77358
  // ID
@@ -76941,7 +77361,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
76941
77361
  canvasShape.add(id, shape);
76942
77362
  }
76943
77363
  // Data
76944
- this_1.initData(shape, dataShape, mapper, formatToFormatter, initialToInitialValue, canvasTicker, canvasData);
77364
+ this_1.initData(shape, dataShape, containerShape, mapper, formatToFormatter, initialToInitialValue, canvasTicker, canvasData);
76945
77365
  // Runtime
76946
77366
  var runtime = new (EShapeRuntimes[shape.type] || EShapeRuntime)(shape);
76947
77367
  shape.runtime = runtime;
@@ -76963,7 +77383,13 @@ var DDiagramCanvas = /** @class */ (function (_super) {
76963
77383
  // Children
76964
77384
  var children = shape.children;
76965
77385
  if (0 < children.length) {
76966
- this_1.initialize_(children, this_1.toDataShape(dataShape, shape), mapper, formatToFormatter, initialToInitialValue, actionValueToRuntime, canvasTicker, canvasShape, canvasData, actionables);
77386
+ if (shape instanceof EShapeEmbedded) {
77387
+ if (dataShape == null) {
77388
+ dataShape = shape;
77389
+ }
77390
+ containerShape = shape;
77391
+ }
77392
+ this_1.initialize_(children, dataShape, containerShape, mapper, formatToFormatter, initialToInitialValue, actionValueToRuntime, canvasTicker, canvasShape, canvasData, actionables);
76967
77393
  }
76968
77394
  };
76969
77395
  var this_1 = this;
@@ -76971,7 +77397,7 @@ var DDiagramCanvas = /** @class */ (function (_super) {
76971
77397
  _loop_1(i);
76972
77398
  }
76973
77399
  };
76974
- DDiagramCanvas.prototype.initData = function (shape, dataShape, mapper, formatToFormatter, initialToInitialValue, canvasTicker, canvasData) {
77400
+ DDiagramCanvas.prototype.initData = function (shape, dataShape, containerShape, mapper, formatToFormatter, initialToInitialValue, canvasTicker, canvasData) {
76975
77401
  var data = shape.data;
76976
77402
  var format = "";
76977
77403
  var initial = "";
@@ -76990,8 +77416,8 @@ var DDiagramCanvas = /** @class */ (function (_super) {
76990
77416
  if (value.scope === EShapeDataValueScope.PRIVATE) {
76991
77417
  var id = value.id;
76992
77418
  if (0 < id.length) {
76993
- if (dataShape) {
76994
- dataShape.data.private.add(id, value);
77419
+ if (containerShape) {
77420
+ containerShape.data.private.add(id, value);
76995
77421
  }
76996
77422
  else {
76997
77423
  canvasData.private.add(id, value);
@@ -77143,15 +77569,6 @@ var DDiagramCanvas = /** @class */ (function (_super) {
77143
77569
  return "0";
77144
77570
  }
77145
77571
  };
77146
- DDiagramCanvas.prototype.toDataShape = function (dataShape, shape) {
77147
- if (dataShape != null) {
77148
- return dataShape;
77149
- }
77150
- if (shape instanceof EShapeEmbedded) {
77151
- return shape;
77152
- }
77153
- return null;
77154
- };
77155
77572
  DDiagramCanvas.prototype.onDestroy = function () {
77156
77573
  this._ticker.stop();
77157
77574
  _super.prototype.onDestroy.call(this);
@@ -77417,10 +77834,10 @@ var DDiagramDataPrivateImpl = /** @class */ (function () {
77417
77834
  enumerable: false,
77418
77835
  configurable: true
77419
77836
  });
77420
- DDiagramDataPrivateImpl.prototype.set = function (id, value, time, from, to) {
77837
+ DDiagramDataPrivateImpl.prototype.set = function (id, value, time, state, from, to) {
77421
77838
  var canvas = this._diagram.canvas;
77422
77839
  if (canvas != null) {
77423
- return canvas.data.private.set(id, value, time, from, to);
77840
+ return canvas.data.private.set(id, value, time, state, from, to);
77424
77841
  }
77425
77842
  return false;
77426
77843
  };
@@ -77460,10 +77877,10 @@ var DDiagramDataProtectedImpl = /** @class */ (function () {
77460
77877
  enumerable: false,
77461
77878
  configurable: true
77462
77879
  });
77463
- DDiagramDataProtectedImpl.prototype.set = function (id, value, time, from, to) {
77880
+ DDiagramDataProtectedImpl.prototype.set = function (id, value, time, state, from, to) {
77464
77881
  var canvas = this._diagram.canvas;
77465
77882
  if (canvas != null) {
77466
- return canvas.data.protected.set(id, value, time, from, to);
77883
+ return canvas.data.protected.set(id, value, time, state, from, to);
77467
77884
  }
77468
77885
  return false;
77469
77886
  };
@@ -77492,7 +77909,7 @@ var DDiagramDataRemoteImpl = /** @class */ (function () {
77492
77909
  function DDiagramDataRemoteImpl(options) {
77493
77910
  this._controller = options && options.controller;
77494
77911
  }
77495
- DDiagramDataRemoteImpl.prototype.set = function (id, value, time) {
77912
+ DDiagramDataRemoteImpl.prototype.set = function (id, value) {
77496
77913
  var controller = this._controller;
77497
77914
  if (controller) {
77498
77915
  controller.write(id, value);
@@ -77522,10 +77939,10 @@ var DDiagramDataExtendedImpl = /** @class */ (function () {
77522
77939
  enumerable: false,
77523
77940
  configurable: true
77524
77941
  });
77525
- DDiagramDataExtendedImpl.prototype.set = function (id, value, time, from, to) {
77942
+ DDiagramDataExtendedImpl.prototype.set = function (id, value, time, state, from, to) {
77526
77943
  var canvas = this._diagram.canvas;
77527
77944
  if (canvas != null) {
77528
- return canvas.data.extended.set(id, value, time, from, to);
77945
+ return canvas.data.extended.set(id, value, time, state, from, to);
77529
77946
  }
77530
77947
  return false;
77531
77948
  };
@@ -77621,10 +78038,10 @@ var DDiagramDataImpl = /** @class */ (function () {
77621
78038
  }
77622
78039
  return null;
77623
78040
  };
77624
- DDiagramDataImpl.prototype.set = function (id, value, time, from, to) {
78041
+ DDiagramDataImpl.prototype.set = function (id, value, time, state, from, to) {
77625
78042
  var canvas = this._diagram.canvas;
77626
78043
  if (canvas != null) {
77627
- return canvas.data.set(id, value, time, from, to);
78044
+ return canvas.data.set(id, value, time, state, from, to);
77628
78045
  }
77629
78046
  return false;
77630
78047
  };
@@ -77642,24 +78059,24 @@ var DDiagramDataImpl = /** @class */ (function () {
77642
78059
  }
77643
78060
  return false;
77644
78061
  };
77645
- DDiagramDataImpl.prototype.setAll = function (id, values, times, from, to) {
78062
+ DDiagramDataImpl.prototype.setAll = function (id, values, times, states, from, to) {
77646
78063
  var canvas = this._diagram.canvas;
77647
78064
  if (canvas != null) {
77648
- return canvas.data.setAll(id, values, times, from, to);
78065
+ return canvas.data.setAll(id, values, times, states, from, to);
77649
78066
  }
77650
78067
  return false;
77651
78068
  };
77652
- DDiagramDataImpl.prototype.setValue = function (id, value, time) {
78069
+ DDiagramDataImpl.prototype.setValue = function (id, value) {
77653
78070
  var canvas = this._diagram.canvas;
77654
78071
  if (canvas != null) {
77655
- return canvas.data.setValue(id, value, time);
78072
+ return canvas.data.setValue(id, value);
77656
78073
  }
77657
78074
  return false;
77658
78075
  };
77659
- DDiagramDataImpl.prototype.setValues = function (id, values, times) {
78076
+ DDiagramDataImpl.prototype.setValues = function (id, values) {
77660
78077
  var canvas = this._diagram.canvas;
77661
78078
  if (canvas != null) {
77662
- return canvas.data.setValues(id, values, times);
78079
+ return canvas.data.setValues(id, values);
77663
78080
  }
77664
78081
  return false;
77665
78082
  };
@@ -77677,6 +78094,20 @@ var DDiagramDataImpl = /** @class */ (function () {
77677
78094
  }
77678
78095
  return false;
77679
78096
  };
78097
+ DDiagramDataImpl.prototype.setState = function (id, state) {
78098
+ var canvas = this._diagram.canvas;
78099
+ if (canvas != null) {
78100
+ return canvas.data.setState(id, state);
78101
+ }
78102
+ return false;
78103
+ };
78104
+ DDiagramDataImpl.prototype.setStates = function (id, states) {
78105
+ var canvas = this._diagram.canvas;
78106
+ if (canvas != null) {
78107
+ return canvas.data.setStates(id, states);
78108
+ }
78109
+ return false;
78110
+ };
77680
78111
  DDiagramDataImpl.prototype.setRange = function (id, from, to) {
77681
78112
  var canvas = this._diagram.canvas;
77682
78113
  if (canvas != null) {
@@ -81639,13 +82070,21 @@ var DSliderVertical = /** @class */ (function (_super) {
81639
82070
  var DTableBodyCells = /** @class */ (function () {
81640
82071
  function DTableBodyCells() {
81641
82072
  }
81642
- DTableBodyCells.setReadOnly = function (target, row, columnIndex, column) {
81643
- target.state.isReadOnly = this.toReadOnly(row, columnIndex, column);
81644
- };
81645
- DTableBodyCells.setRenderable = function (target, row, columnIndex, column) {
82073
+ DTableBodyCells.set = function (target, row, columnIndex, column, readOnly) {
82074
+ var _a;
81646
82075
  var renderable = this.toRenderable(row, columnIndex, column);
81647
82076
  target.renderable = renderable;
81648
- target.state.isDisabled = !renderable;
82077
+ var state = target.state;
82078
+ state.lock();
82079
+ state.isDisabled = !renderable;
82080
+ if (readOnly !== false) {
82081
+ state.isReadOnly = this.toReadOnly(row, columnIndex, column);
82082
+ }
82083
+ var columnStateModifier = (_a = column.state) === null || _a === void 0 ? void 0 : _a.modifier;
82084
+ if (columnStateModifier) {
82085
+ columnStateModifier(row, columnIndex, target.state);
82086
+ }
82087
+ state.unlock();
81649
82088
  };
81650
82089
  DTableBodyCells.toReadOnly = function (row, columnIndex, column) {
81651
82090
  var enable = column.editing.enable;
@@ -81778,9 +82217,7 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
81778
82217
  else {
81779
82218
  this.text = value;
81780
82219
  }
81781
- var column = this._column;
81782
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
81783
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82220
+ DTableBodyCells.set(this, row, columnIndex, this._column);
81784
82221
  };
81785
82222
  DTableBodyCellSelectDialog.prototype.unset = function () {
81786
82223
  this._row = undefined;
@@ -81866,9 +82303,7 @@ var DTableBodyCellActionMenu = /** @class */ (function (_super) {
81866
82303
  this._row = row;
81867
82304
  this._rowIndex = rowIndex;
81868
82305
  this.text = value;
81869
- var column = this._column;
81870
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
81871
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82306
+ DTableBodyCells.set(this, row, columnIndex, this._column);
81872
82307
  };
81873
82308
  DTableBodyCellActionMenu.prototype.unset = function () {
81874
82309
  this._row = undefined;
@@ -81982,9 +82417,7 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
81982
82417
  else {
81983
82418
  this.text = value;
81984
82419
  }
81985
- var column = this._column;
81986
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
81987
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82420
+ DTableBodyCells.set(this, row, columnIndex, this._column);
81988
82421
  };
81989
82422
  DTableBodyCellSelectPromise.prototype.unset = function () {
81990
82423
  this._row = undefined;
@@ -82057,9 +82490,7 @@ var DTableBodyCellText = /** @class */ (function (_super) {
82057
82490
  this._row = row;
82058
82491
  this._rowIndex = rowIndex;
82059
82492
  this.text = value;
82060
- var column = this._column;
82061
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82062
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82493
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82063
82494
  };
82064
82495
  DTableBodyCellText.prototype.unset = function () {
82065
82496
  this._row = undefined;
@@ -82262,9 +82693,7 @@ var DTableBodyCellCheck = /** @class */ (function (_super) {
82262
82693
  this._row = row;
82263
82694
  this._rowIndex = rowIndex;
82264
82695
  this.state.isActive = !!value;
82265
- var column = this._column;
82266
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82267
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82696
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82268
82697
  };
82269
82698
  DTableBodyCellCheck.prototype.unset = function () {
82270
82699
  this._row = undefined;
@@ -82331,32 +82760,30 @@ var DTableBodyCellColor = /** @class */ (function (_super) {
82331
82760
  enumerable: false,
82332
82761
  configurable: true
82333
82762
  });
82334
- DTableBodyCellColor.prototype.set = function (newValue, row, supplimental, rowIndex, columnIndex, forcibly) {
82763
+ DTableBodyCellColor.prototype.set = function (value, row, supplimental, rowIndex, columnIndex, forcibly) {
82335
82764
  this._row = row;
82336
82765
  this._rowIndex = rowIndex;
82337
- var value = this.value;
82338
- if (isNumber(newValue)) {
82339
- value.color = newValue;
82340
- value.alpha = 1;
82341
- }
82342
- else if (isString(newValue)) {
82343
- var parsed = Number(newValue);
82344
- value.color = parsed === parsed ? parsed : 0xffffff;
82345
- value.alpha = 1;
82346
- }
82347
- else if (newValue != null) {
82348
- var color = newValue.color;
82349
- var alpha = newValue.alpha;
82350
- value.color = isNumber(color) ? color : 0xffffff;
82351
- value.alpha = isNumber(alpha) ? alpha : 1;
82766
+ var cell = this.value;
82767
+ if (isNumber(value)) {
82768
+ cell.color = value;
82769
+ cell.alpha = 1;
82770
+ }
82771
+ else if (isString(value)) {
82772
+ var parsed = Number(value);
82773
+ cell.color = parsed === parsed ? parsed : 0xffffff;
82774
+ cell.alpha = 1;
82775
+ }
82776
+ else if (value != null) {
82777
+ var color = value.color;
82778
+ var alpha = value.alpha;
82779
+ cell.color = isNumber(color) ? color : 0xffffff;
82780
+ cell.alpha = isNumber(alpha) ? alpha : 1;
82352
82781
  }
82353
82782
  else {
82354
- value.color = 0xffffff;
82355
- value.alpha = 1;
82783
+ cell.color = 0xffffff;
82784
+ cell.alpha = 1;
82356
82785
  }
82357
- var column = this._column;
82358
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82359
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82786
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82360
82787
  };
82361
82788
  DTableBodyCellColor.prototype.unset = function () {
82362
82789
  this._row = undefined;
@@ -82448,9 +82875,7 @@ var DTableBodyCellDate = /** @class */ (function (_super) {
82448
82875
  this.createOrUpdateText();
82449
82876
  }
82450
82877
  }
82451
- var column = this._column;
82452
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82453
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82878
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82454
82879
  };
82455
82880
  DTableBodyCellDate.prototype.unset = function () {
82456
82881
  this._row = undefined;
@@ -82533,7 +82958,7 @@ var DTableBodyCellDatetime = /** @class */ (function (_super) {
82533
82958
  }
82534
82959
  else if (isNumber(value)) {
82535
82960
  var textValueComputed = this._textValueComputed;
82536
- if (textValueComputed === undefined) {
82961
+ if (textValueComputed == null) {
82537
82962
  this.text = new Date(value);
82538
82963
  }
82539
82964
  else if (textValueComputed.getTime() !== value) {
@@ -82542,9 +82967,7 @@ var DTableBodyCellDatetime = /** @class */ (function (_super) {
82542
82967
  this.createOrUpdateText();
82543
82968
  }
82544
82969
  }
82545
- var column = this._column;
82546
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82547
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
82970
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82548
82971
  };
82549
82972
  DTableBodyCellDatetime.prototype.unset = function () {
82550
82973
  this._row = undefined;
@@ -82602,9 +83025,7 @@ var DTableBodyCellIndex = /** @class */ (function (_super) {
82602
83025
  this._row = row;
82603
83026
  this._rowIndex = rowIndex;
82604
83027
  this.text = rowIndex;
82605
- var column = this._column;
82606
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82607
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83028
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82608
83029
  };
82609
83030
  DTableBodyCellIndex.prototype.unset = function () {
82610
83031
  this._row = undefined;
@@ -82672,9 +83093,7 @@ var DTableBodyCellInputInteger = /** @class */ (function (_super) {
82672
83093
  this._row = row;
82673
83094
  this._rowIndex = rowIndex;
82674
83095
  this.text = Number(value);
82675
- var column = this._column;
82676
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82677
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83096
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82678
83097
  };
82679
83098
  DTableBodyCellInputInteger.prototype.unset = function () {
82680
83099
  this._row = undefined;
@@ -82742,9 +83161,7 @@ var DTableBodyCellInputReal = /** @class */ (function (_super) {
82742
83161
  this._row = row;
82743
83162
  this._rowIndex = rowIndex;
82744
83163
  this.text = Number(value);
82745
- var column = this._column;
82746
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82747
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83164
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82748
83165
  };
82749
83166
  DTableBodyCellInputReal.prototype.unset = function () {
82750
83167
  this._row = undefined;
@@ -82812,9 +83229,7 @@ var DTableBodyCellInputText = /** @class */ (function (_super) {
82812
83229
  this._row = row;
82813
83230
  this._rowIndex = rowIndex;
82814
83231
  this.text = String(value);
82815
- var column = this._column;
82816
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
82817
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83232
+ DTableBodyCells.set(this, row, columnIndex, this._column);
82818
83233
  };
82819
83234
  DTableBodyCellInputText.prototype.unset = function () {
82820
83235
  this._row = undefined;
@@ -83016,9 +83431,7 @@ var DTableBodyCellInputTree = /** @class */ (function (_super) {
83016
83431
  marker.hide();
83017
83432
  input.padding.adjLeft(0);
83018
83433
  }
83019
- var column = this._column;
83020
- DTableBodyCells.setReadOnly(this._input, row, columnIndex, column);
83021
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83434
+ DTableBodyCells.set(this._input, row, columnIndex, this._column);
83022
83435
  };
83023
83436
  DTableBodyCellInputTree.prototype.unset = function () {
83024
83437
  this._row = undefined;
@@ -83172,9 +83585,7 @@ var DTableBodyCellSelectMenu = /** @class */ (function (_super) {
83172
83585
  this._row = row;
83173
83586
  this._rowIndex = rowIndex;
83174
83587
  this.value = value;
83175
- var column = this._column;
83176
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
83177
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83588
+ DTableBodyCells.set(this, row, columnIndex, this._column);
83178
83589
  };
83179
83590
  DTableBodyCellSelectMenu.prototype.unset = function () {
83180
83591
  this._row = undefined;
@@ -83245,9 +83656,7 @@ var DTableBodyCellSelectMultiple = /** @class */ (function (_super) {
83245
83656
  this._row = row;
83246
83657
  this._rowIndex = rowIndex;
83247
83658
  this.values = value;
83248
- var column = this._column;
83249
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
83250
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83659
+ DTableBodyCells.set(this, row, columnIndex, this._column);
83251
83660
  };
83252
83661
  DTableBodyCellSelectMultiple.prototype.unset = function () {
83253
83662
  this._row = undefined;
@@ -83339,9 +83748,7 @@ var DTableBodyCellTime = /** @class */ (function (_super) {
83339
83748
  this.createOrUpdateText();
83340
83749
  }
83341
83750
  }
83342
- var column = this._column;
83343
- DTableBodyCells.setReadOnly(this, row, columnIndex, column);
83344
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83751
+ DTableBodyCells.set(this, row, columnIndex, this._column);
83345
83752
  };
83346
83753
  DTableBodyCellTime.prototype.unset = function () {
83347
83754
  this._row = undefined;
@@ -83439,8 +83846,7 @@ var DTableBodyCellTree = /** @class */ (function (_super) {
83439
83846
  this._row = row;
83440
83847
  this._rowIndex = rowIndex;
83441
83848
  this.text = value;
83442
- var column = this._column;
83443
- DTableBodyCells.setRenderable(this, row, columnIndex, column);
83849
+ DTableBodyCells.set(this, row, columnIndex, this._column, false);
83444
83850
  var link = this.link;
83445
83851
  var padding = this._padding;
83446
83852
  if (isNumber(supplimental)) {
@@ -83588,20 +83994,26 @@ var DTableRow = /** @class */ (function (_super) {
83588
83994
  */
83589
83995
  var DTableBodyRow = /** @class */ (function (_super) {
83590
83996
  __extends(DTableBodyRow, _super);
83591
- function DTableBodyRow(onChange, isEven, options) {
83997
+ function DTableBodyRow(onChange, isEven, columnIndexToCellOptions, options) {
83592
83998
  var _this = _super.call(this, options) || this;
83593
83999
  _this._index = -1;
83594
84000
  _this._onCellChangeBound = function (newValue, oldValue, row, rowIndex, columnIndex) {
83595
84001
  _this.emit("change", newValue, oldValue, row, rowIndex, columnIndex, _this);
83596
84002
  onChange(newValue, oldValue, row, rowIndex, columnIndex, _this);
83597
84003
  };
84004
+ _this._columnIndexToCellOptions = columnIndexToCellOptions;
83598
84005
  _this.state.isAlternated = !isEven;
83599
84006
  _this.initCells(options, _this._columns, _this._frozen);
83600
84007
  return _this;
83601
84008
  }
83602
84009
  DTableBodyRow.prototype.newCell = function (columnIndex, column, columns, options) {
83603
84010
  var onChange = this._onCellChangeBound;
83604
- var cellOptions = this.toCellOptions(columnIndex, column, options);
84011
+ var columnIndexToCellOptions = this._columnIndexToCellOptions;
84012
+ var cellOptions = columnIndexToCellOptions.get(columnIndex);
84013
+ if (cellOptions == null) {
84014
+ cellOptions = this.toCellOptions(columnIndex, column, options);
84015
+ columnIndexToCellOptions.set(columnIndex, cellOptions);
84016
+ }
83605
84017
  if (column.editing.enable !== false) {
83606
84018
  return this.newCellEditable(columnIndex, column, onChange, cellOptions);
83607
84019
  }
@@ -83717,51 +84129,48 @@ var DTableBodyRow = /** @class */ (function (_super) {
83717
84129
  }
83718
84130
  };
83719
84131
  DTableBodyRow.prototype.toCellOptions = function (columnIndex, column, options) {
83720
- var _a, _b;
83721
- var result = column.body || options.cell;
83722
- var columnWeight = column.weight;
83723
- var columnWidth = column.width;
84132
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
84133
+ var _p;
84134
+ var result = toMerged(column.body, options.cell);
84135
+ // Weight
84136
+ result.weight = column.weight;
84137
+ // Width
84138
+ result.width = column.width;
84139
+ // State
84140
+ (_a = result.state) !== null && _a !== void 0 ? _a : (result.state = column.state.initial);
84141
+ // Text formatter
83724
84142
  var columnFormatter = column.formatter;
83725
- var columnAlign = column.align;
83726
- var columnSelecting = column.selecting;
83727
- var columnSelectingMenu = columnSelecting.menu || columnSelecting.multiple;
83728
- if (result != null) {
83729
- result.weight = columnWeight;
83730
- result.width = columnWidth;
83731
- var text = result.text || {};
83732
- result.text = text;
83733
- text.formatter || (text.formatter = columnFormatter);
83734
- var textAlign = text.align || {};
83735
- text.align = textAlign;
83736
- textAlign.horizontal = columnAlign;
83737
- result.menu || (result.menu = columnSelectingMenu);
84143
+ if (columnFormatter != null) {
84144
+ var text = ((_b = result.text) !== null && _b !== void 0 ? _b : (result.text = {}));
84145
+ (_c = text.formatter) !== null && _c !== void 0 ? _c : (text.formatter = columnFormatter);
83738
84146
  }
83739
- else {
83740
- result = {
83741
- weight: columnWeight,
83742
- width: columnWidth,
83743
- text: {
83744
- formatter: columnFormatter,
83745
- align: {
83746
- horizontal: columnAlign
83747
- }
83748
- },
83749
- menu: columnSelectingMenu
83750
- };
84147
+ // Text align horizontal
84148
+ var columnAlign = column.align;
84149
+ if (columnAlign != null) {
84150
+ var text = ((_d = result.text) !== null && _d !== void 0 ? _d : (result.text = {}));
84151
+ var textAlign = ((_e = text.align) !== null && _e !== void 0 ? _e : (text.align = {}));
84152
+ (_f = textAlign.horizontal) !== null && _f !== void 0 ? _f : (textAlign.horizontal = columnAlign);
83751
84153
  }
84154
+ // Editing
83752
84155
  var columnEditing = column.editing;
83753
84156
  if (columnEditing.enable !== false) {
83754
- var editing = result.editing || {};
83755
- result.editing = editing;
83756
- editing.formatter || (editing.formatter = columnEditing.formatter);
83757
- editing.unformatter || (editing.unformatter = columnEditing.unformatter);
83758
- editing.validator || (editing.validator = columnEditing.validator);
84157
+ var editing = ((_g = (_p = result).editing) !== null && _g !== void 0 ? _g : (_p.editing = {}));
84158
+ (_h = editing.formatter) !== null && _h !== void 0 ? _h : (editing.formatter = columnEditing.formatter);
84159
+ (_j = editing.unformatter) !== null && _j !== void 0 ? _j : (editing.unformatter = columnEditing.unformatter);
84160
+ (_k = editing.validator) !== null && _k !== void 0 ? _k : (editing.validator = columnEditing.validator);
83759
84161
  }
84162
+ // Link
83760
84163
  var columnLink = column.link;
83761
- if (columnLink) {
84164
+ if (columnLink !== undefined) {
83762
84165
  result.link = columnLink;
83763
84166
  }
83764
- var selectionType = (_b = (_a = options === null || options === void 0 ? void 0 : options.selection) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : DTableDataSelectionType.NONE;
84167
+ // Selecting
84168
+ var columnSelecting = column.selecting;
84169
+ var columnSelectingMenu = (_l = columnSelecting.menu) !== null && _l !== void 0 ? _l : columnSelecting.multiple;
84170
+ if (columnSelectingMenu !== undefined) {
84171
+ result.menu = columnSelectingMenu;
84172
+ }
84173
+ var selectionType = (_o = (_m = options === null || options === void 0 ? void 0 : options.selection) === null || _m === void 0 ? void 0 : _m.type) !== null && _o !== void 0 ? _o : DTableDataSelectionType.NONE;
83765
84174
  if (selectionType !== DTableDataSelectionType.NONE) {
83766
84175
  result.when = "DOUBLE_CLICKED";
83767
84176
  result.cursor = function (state) {
@@ -84799,6 +85208,7 @@ var DTableBody = /** @class */ (function (_super) {
84799
85208
  _this._onRowChangeBound = function (newValue, oldValue, row, rowIndex, columnIndex) {
84800
85209
  data.emit("change", newValue, oldValue, row, rowIndex, columnIndex, data);
84801
85210
  };
85211
+ _this._columnIndexToCellOptions = new Map();
84802
85212
  _this._data.emit("init", _this._data);
84803
85213
  return _this;
84804
85214
  }
@@ -84990,7 +85400,7 @@ var DTableBody = /** @class */ (function (_super) {
84990
85400
  return row;
84991
85401
  };
84992
85402
  DTableBody.prototype.newRow = function (isEven) {
84993
- return new DTableBodyRow(this._onRowChangeBound, isEven, this._rowOptions);
85403
+ return new DTableBodyRow(this._onRowChangeBound, isEven, this._columnIndexToCellOptions, this._rowOptions);
84994
85404
  };
84995
85405
  DTableBody.prototype.onParentMove = function (newX, newY, oldX, oldY) {
84996
85406
  _super.prototype.onParentMove.call(this, newX, newY, oldX, oldY);
@@ -86753,6 +87163,27 @@ var toColumnSetter = function (options, type, path) {
86753
87163
  }
86754
87164
  }
86755
87165
  };
87166
+ var toColumnState = function (options) {
87167
+ var state = options.state;
87168
+ if (state != null) {
87169
+ if (isString(state) || isArray(state)) {
87170
+ return {
87171
+ initial: state,
87172
+ modifier: undefined
87173
+ };
87174
+ }
87175
+ else {
87176
+ return {
87177
+ initial: undefined,
87178
+ modifier: state
87179
+ };
87180
+ }
87181
+ }
87182
+ return {
87183
+ initial: undefined,
87184
+ modifier: undefined
87185
+ };
87186
+ };
86756
87187
  var toColumnPath = function (options) {
86757
87188
  return options.path != null ? options.path.split(".") : null;
86758
87189
  };
@@ -86794,6 +87225,7 @@ var toColumn = function (index, options) {
86794
87225
  formatter: options.formatter,
86795
87226
  renderable: toColumnRenderable(options, path),
86796
87227
  align: align,
87228
+ state: toColumnState(options),
86797
87229
  editing: toColumnEditing(options, path),
86798
87230
  sorting: toColumnSorting(getter, index, options),
86799
87231
  header: options.header,
@@ -88872,8 +89304,8 @@ exports.DCommandSave = DCommandSave;
88872
89304
  exports.DCommandSaveAs = DCommandSaveAs;
88873
89305
  exports.DCommandUndo = DCommandUndo;
88874
89306
  exports.DContent = DContent;
88875
- exports.DControllerDefaultCommand = DControllerDefaultCommand;
88876
- exports.DControllerDefaultFocus = DControllerDefaultFocus;
89307
+ exports.DControllerCommandImpl = DControllerCommandImpl;
89308
+ exports.DControllerFocusImpl = DControllerFocusImpl;
88877
89309
  exports.DControllerKeyboard = DControllerKeyboard;
88878
89310
  exports.DControllers = DControllers;
88879
89311
  exports.DCornerMask = DCornerMask;
@@ -89793,6 +90225,7 @@ exports.EShapeDataValueOrder = EShapeDataValueOrder;
89793
90225
  exports.EShapeDataValueRangeImpl = EShapeDataValueRangeImpl;
89794
90226
  exports.EShapeDataValueRangeType = EShapeDataValueRangeType;
89795
90227
  exports.EShapeDataValueScope = EShapeDataValueScope;
90228
+ exports.EShapeDataValueState = EShapeDataValueState;
89796
90229
  exports.EShapeDataValueType = EShapeDataValueType;
89797
90230
  exports.EShapeDefaults = EShapeDefaults;
89798
90231
  exports.EShapeDeleter = EShapeDeleter;
@@ -89945,6 +90378,7 @@ exports.RECTANGLE_ROUNDED_VERTEX_COUNT = RECTANGLE_ROUNDED_VERTEX_COUNT;
89945
90378
  exports.RECTANGLE_ROUNDED_WORLD_SIZE = RECTANGLE_ROUNDED_WORLD_SIZE;
89946
90379
  exports.RECTANGLE_VERTEX_COUNT = RECTANGLE_VERTEX_COUNT;
89947
90380
  exports.RECTANGLE_WORLD_SIZE = RECTANGLE_WORLD_SIZE;
90381
+ exports.TEXT_FMIN = TEXT_FMIN;
89948
90382
  exports.TEXT_INDEX_COUNT = TEXT_INDEX_COUNT;
89949
90383
  exports.TEXT_VERTEX_COUNT = TEXT_VERTEX_COUNT;
89950
90384
  exports.TRIANGLE_INDEX_COUNT = TRIANGLE_INDEX_COUNT;
@@ -90108,6 +90542,7 @@ exports.isArray = isArray;
90108
90542
  exports.isFunction = isFunction;
90109
90543
  exports.isNaN = isNaN;
90110
90544
  exports.isNumber = isNumber;
90545
+ exports.isObject = isObject;
90111
90546
  exports.isShapeClipperExLoaded = isShapeClipperExLoaded;
90112
90547
  exports.isStatic = isStatic;
90113
90548
  exports.isString = isString;
@@ -90300,6 +90735,7 @@ exports.loadThemeWhiteTree = loadThemeWhiteTree;
90300
90735
  exports.onDeserializedConnectorLine = onDeserializedConnectorLine;
90301
90736
  exports.toCeilingIndex = toCeilingIndex;
90302
90737
  exports.toChecker = toChecker;
90738
+ exports.toCloned = toCloned;
90303
90739
  exports.toComputed = toComputed;
90304
90740
  exports.toDash = toDash;
90305
90741
  exports.toEnum = toEnum;
@@ -90314,6 +90750,7 @@ exports.toLineOfAnyPointCount = toLineOfAnyPointCount;
90314
90750
  exports.toLinePointCount = toLinePointCount;
90315
90751
  exports.toLineVertexCount = toLineVertexCount;
90316
90752
  exports.toLinkOptions = toLinkOptions;
90753
+ exports.toMerged = toMerged;
90317
90754
  exports.toPadded = toPadded;
90318
90755
  exports.toPointsBoundary = toPointsBoundary;
90319
90756
  exports.toPointsCount = toPointsCount;