@wcardinal/wcardinal-ui 0.404.0 → 0.406.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-base-background-snippet.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-base-border-snippet.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-base-outline-snippet.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-button-color.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-dialog.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dynamic-text-style.d.ts +17 -11
- package/dist/types/wcardinal/ui/d-dynamic-text.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-image-base.d.ts +1 -4
- package/dist/types/wcardinal/ui/d-image-piece-align.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-image-piece-container-impl.d.ts +14 -1
- package/dist/types/wcardinal/ui/d-image-piece-container.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-image-piece-layouter.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-input.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-menu-item-text.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-scroll-bar.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-text-base.d.ts +15 -74
- package/dist/types/wcardinal/ui/d-text-piece-align-impl.d.ts +20 -0
- package/dist/types/wcardinal/ui/d-text-piece-align.d.ts +7 -0
- package/dist/types/wcardinal/ui/d-text-piece-impl.d.ts +63 -0
- package/dist/types/wcardinal/ui/d-text-piece-style-impl.d.ts +29 -0
- package/dist/types/wcardinal/ui/d-text-piece-style.d.ts +16 -0
- package/dist/types/wcardinal/ui/d-text-piece.d.ts +61 -0
- package/dist/types/wcardinal/ui/shape/e-shape-buffer.d.ts +0 -3
- package/dist/types/wcardinal/ui/shape/e-shape-image-like.d.ts +6 -0
- package/dist/types/wcardinal/ui/shape/e-shape-points-formatted.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/e-shape-points.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/e-shape-text.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/e-shape-uploaded.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/e-shape.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-bar.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-base.d.ts +9 -7
- package/dist/types/wcardinal/ui/shape/variant/builder-circle.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-image-sdf.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-label.d.ts +10 -9
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-any.d.ts +4 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-circles.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangles.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangles.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +4 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-circle.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-rectangle.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-triangle.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-null.d.ts +10 -9
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-pivoted.d.ts +3 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-rounded.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +3 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-semicircle.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-text.d.ts +9 -7
- package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/builder-triangle.d.ts +3 -2
- package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +5 -2
- package/dist/types/wcardinal/ui/shape/variant/create-line-of-any-uploaded.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-bar-points.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +4 -6
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group-points.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +6 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group.d.ts +6 -2
- package/dist/types/wcardinal/ui/shape/variant/e-shape-image-sdf.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-image.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-any-points-impl.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-points.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-primitive.d.ts +7 -3
- package/dist/types/wcardinal/ui/shape/variant/e-shape-text-impl.d.ts +5 -0
- package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-input.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.d.ts +5 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dots.d.ts +5 -4
- package/dist/types/wcardinal/ui/util/dynamic-atlas-item-image.d.ts +2 -2
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-generator.d.ts +1 -1
- package/dist/wcardinal/ui/d-base-background-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-base-border-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-base-outline-snippet.js.map +1 -1
- package/dist/wcardinal/ui/d-button-color-gradient.js +10 -13
- package/dist/wcardinal/ui/d-button-color-gradient.js.map +1 -1
- package/dist/wcardinal/ui/d-button-color.js +20 -23
- package/dist/wcardinal/ui/d-button-color.js.map +1 -1
- package/dist/wcardinal/ui/d-button-date.js +4 -4
- package/dist/wcardinal/ui/d-button-date.js.map +1 -1
- package/dist/wcardinal/ui/d-button-datetime.js +4 -4
- package/dist/wcardinal/ui/d-button-datetime.js.map +1 -1
- package/dist/wcardinal/ui/d-button-select.js +2 -2
- package/dist/wcardinal/ui/d-button-select.js.map +1 -1
- package/dist/wcardinal/ui/d-button-time.js +4 -4
- package/dist/wcardinal/ui/d-button-time.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-processing.js +1 -1
- package/dist/wcardinal/ui/d-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text-style.js +39 -65
- package/dist/wcardinal/ui/d-dynamic-text-style.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text.js +11 -8
- package/dist/wcardinal/ui/d-dynamic-text.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base.js +6 -18
- package/dist/wcardinal/ui/d-image-base.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-align.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-container-impl.js +49 -1
- package/dist/wcardinal/ui/d-image-piece-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-container.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter.js.map +1 -1
- package/dist/wcardinal/ui/d-indicator-processing.js +1 -1
- package/dist/wcardinal/ui/d-indicator-processing.js.map +1 -1
- package/dist/wcardinal/ui/d-input.js +11 -7
- package/dist/wcardinal/ui/d-input.js.map +1 -1
- package/dist/wcardinal/ui/d-menu-item-text.js +12 -6
- package/dist/wcardinal/ui/d-menu-item-text.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-date.js +7 -10
- package/dist/wcardinal/ui/d-table-body-cell-date.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-datetime.js +7 -10
- package/dist/wcardinal/ui/d-table-body-cell-datetime.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +4 -10
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-promise.js +4 -10
- package/dist/wcardinal/ui/d-table-body-cell-select-promise.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-time.js +7 -10
- package/dist/wcardinal/ui/d-table-body-cell-time.js.map +1 -1
- package/dist/wcardinal/ui/d-text-base.js +55 -247
- package/dist/wcardinal/ui/d-text-base.js.map +1 -1
- package/dist/wcardinal/ui/d-text-piece-align-impl.js +69 -0
- package/dist/wcardinal/ui/d-text-piece-align-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-align.js +2 -0
- package/dist/wcardinal/ui/d-text-piece-align.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-impl.js +299 -0
- package/dist/wcardinal/ui/d-text-piece-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-style-impl.js +146 -0
- package/dist/wcardinal/ui/d-text-piece-style-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece-style.js +2 -0
- package/dist/wcardinal/ui/d-text-piece-style.js.map +1 -0
- package/dist/wcardinal/ui/d-text-piece.js +2 -0
- package/dist/wcardinal/ui/d-text-piece.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-buffer.js +11 -27
- package/dist/wcardinal/ui/shape/e-shape-buffer.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-image-like.js +2 -0
- package/dist/wcardinal/ui/shape/e-shape-image-like.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-points-formatted.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-points.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-renderer.js +7 -13
- package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-uploaded.js +22 -8
- package/dist/wcardinal/ui/shape/e-shape-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +1 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-line-of-any.js +1 -1
- package/dist/wcardinal/ui/shape/variant/build-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-line.js +6 -5
- package/dist/wcardinal/ui/shape/variant/build-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-text.js +1 -1
- package/dist/wcardinal/ui/shape/variant/build-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-bar.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-base.js +22 -1
- package/dist/wcardinal/ui/shape/variant/builder-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-circle.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-label.js +13 -6
- package/dist/wcardinal/ui/shape/variant/builder-label.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js +36 -5
- package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js +4 -2
- package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +4 -2
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js +4 -2
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line.js +34 -5
- package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-null.js +11 -4
- package/dist/wcardinal/ui/shape/variant/builder-null.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +7 -5
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js +7 -5
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +7 -5
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +6 -4
- package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-text.js +36 -4
- package/dist/wcardinal/ui/shape/variant/builder-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js +7 -5
- package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-triangle.js +7 -5
- package/dist/wcardinal/ui/shape/variant/builder-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js +1 -1
- package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +4 -4
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js +4 -4
- package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +16 -16
- package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-null-uploaded.js +1 -1
- package/dist/wcardinal/ui/shape/variant/create-null-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-bar-points.js +7 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-bar-points.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +0 -25
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-points.js +14 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-group-points.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +6 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group.js +6 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-line-of-any-points-impl.js +15 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-line-of-any-points-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-line-points.js +19 -3
- package/dist/wcardinal/ui/shape/variant/e-shape-line-points.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js +15 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-text-impl.js +57 -24
- package/dist/wcardinal/ui/shape/variant/e-shape-text-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-image-element.js +9 -3
- package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +6 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js +9 -9
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js +7 -7
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +6 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js +9 -9
- package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-select.js +7 -7
- package/dist/wcardinal/ui/theme/white/d-theme-white-select.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js +18 -9
- package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js +1 -3
- package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +23 -17
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +23 -17
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +23 -17
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +23 -17
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +23 -17
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +23 -17
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +1550 -984
- package/dist/wcardinal-ui.js +1505 -951
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.406.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -71,7 +71,6 @@ var EShapeUploadeds = {};
|
|
|
71
71
|
*/
|
|
72
72
|
var EShapeUploadedImpl = /** @class */ (function () {
|
|
73
73
|
function EShapeUploadedImpl(buffer, vertexOffset, indexOffset, vertexCount, indexCount, builders) {
|
|
74
|
-
this.buffer = buffer;
|
|
75
74
|
this._builders = builders;
|
|
76
75
|
this._vertexOffset = vertexOffset;
|
|
77
76
|
this._indexOffset = indexOffset;
|
|
@@ -80,20 +79,38 @@ var EShapeUploadedImpl = /** @class */ (function () {
|
|
|
80
79
|
}
|
|
81
80
|
EShapeUploadedImpl.prototype.init = function (shape) {
|
|
82
81
|
shape.uploaded = this;
|
|
83
|
-
var buffer = this.buffer;
|
|
84
82
|
var builders = this._builders;
|
|
85
83
|
for (var i = 0, imax = builders.length; i < imax; ++i) {
|
|
86
|
-
builders[i].init(
|
|
84
|
+
builders[i].init();
|
|
87
85
|
}
|
|
88
86
|
this.update(shape);
|
|
89
87
|
return this;
|
|
90
88
|
};
|
|
89
|
+
EShapeUploadedImpl.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
90
|
+
var builders = this._builders;
|
|
91
|
+
var voffset = vertexOffset;
|
|
92
|
+
var ioffset = indexOffset;
|
|
93
|
+
for (var i = 0, imax = builders.length; i < imax; ++i) {
|
|
94
|
+
var builder = builders[i];
|
|
95
|
+
if (!builder.reinit(buffer, shape, voffset, ioffset)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
var vertexCount = builder.vertexCount;
|
|
99
|
+
var indexCount = builder.indexCount;
|
|
100
|
+
voffset += vertexCount;
|
|
101
|
+
ioffset += indexCount;
|
|
102
|
+
}
|
|
103
|
+
this._vertexCount = voffset - vertexOffset;
|
|
104
|
+
this._indexCount = ioffset - indexOffset;
|
|
105
|
+
this.update(shape);
|
|
106
|
+
return true;
|
|
107
|
+
};
|
|
91
108
|
EShapeUploadedImpl.prototype.update = function (shape) {
|
|
92
|
-
var buffer = this.buffer;
|
|
93
109
|
var builders = this._builders;
|
|
94
110
|
for (var i = 0, imax = builders.length; i < imax; ++i) {
|
|
95
|
-
builders[i].update(
|
|
111
|
+
builders[i].update(shape);
|
|
96
112
|
}
|
|
113
|
+
return this;
|
|
97
114
|
};
|
|
98
115
|
EShapeUploadedImpl.prototype.isCompatible = function (shape) {
|
|
99
116
|
var builders = this._builders;
|
|
@@ -104,9 +121,6 @@ var EShapeUploadedImpl = /** @class */ (function () {
|
|
|
104
121
|
}
|
|
105
122
|
return true;
|
|
106
123
|
};
|
|
107
|
-
EShapeUploadedImpl.prototype.getBuffer = function () {
|
|
108
|
-
return this.buffer;
|
|
109
|
-
};
|
|
110
124
|
EShapeUploadedImpl.prototype.getVertexOffset = function () {
|
|
111
125
|
return this._vertexOffset;
|
|
112
126
|
};
|
|
@@ -489,7 +503,7 @@ var TEXT_INDEX_COUNT_SHIFT = 1;
|
|
|
489
503
|
var TEXT_FMIN = 0.00001;
|
|
490
504
|
var TEXT_WORK_POINT = new pixi_js.Point();
|
|
491
505
|
var toTextBufferCount = function (shape) {
|
|
492
|
-
var l = shape.text.
|
|
506
|
+
var l = shape.text.plength;
|
|
493
507
|
return ((l >> 3) + (0 < (l & 0x7) ? 1 : 0)) << 3;
|
|
494
508
|
};
|
|
495
509
|
var buildTextClipping = function (clippings, voffset, vcount) {
|
|
@@ -1486,7 +1500,8 @@ var EShapeStrokeSide = {
|
|
|
1486
1500
|
* SPDX-License-Identifier: Apache-2.0
|
|
1487
1501
|
*/
|
|
1488
1502
|
var BuilderBase = /** @class */ (function () {
|
|
1489
|
-
function BuilderBase(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
1503
|
+
function BuilderBase(buffer, vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
1504
|
+
this.buffer = buffer;
|
|
1490
1505
|
this.vertexOffset = vertexOffset;
|
|
1491
1506
|
this.indexOffset = indexOffset;
|
|
1492
1507
|
this.vertexCount = vertexCount;
|
|
@@ -1506,6 +1521,26 @@ var BuilderBase = /** @class */ (function () {
|
|
|
1506
1521
|
this.texture = null;
|
|
1507
1522
|
this.textureTransformId = -1;
|
|
1508
1523
|
}
|
|
1524
|
+
BuilderBase.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
1525
|
+
if (this.buffer !== buffer ||
|
|
1526
|
+
this.vertexOffset !== vertexOffset ||
|
|
1527
|
+
this.indexOffset !== indexOffset) {
|
|
1528
|
+
if (buffer.check(vertexOffset, indexOffset, this.vertexCount, this.indexCount)) {
|
|
1529
|
+
this.inited = BuilderFlag.NONE;
|
|
1530
|
+
this.buffer = buffer;
|
|
1531
|
+
this.vertexOffset = vertexOffset;
|
|
1532
|
+
this.indexOffset = indexOffset;
|
|
1533
|
+
this.init();
|
|
1534
|
+
return true;
|
|
1535
|
+
}
|
|
1536
|
+
else {
|
|
1537
|
+
return false;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
else {
|
|
1541
|
+
return true;
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1509
1544
|
BuilderBase.prototype.isCompatible = function (shape) {
|
|
1510
1545
|
return true;
|
|
1511
1546
|
};
|
|
@@ -2108,6 +2143,13 @@ var EShapeBarPoints = /** @class */ (function () {
|
|
|
2108
2143
|
enumerable: false,
|
|
2109
2144
|
configurable: true
|
|
2110
2145
|
});
|
|
2146
|
+
Object.defineProperty(EShapeBarPoints.prototype, "plength", {
|
|
2147
|
+
get: function () {
|
|
2148
|
+
return 2;
|
|
2149
|
+
},
|
|
2150
|
+
enumerable: false,
|
|
2151
|
+
configurable: true
|
|
2152
|
+
});
|
|
2111
2153
|
Object.defineProperty(EShapeBarPoints.prototype, "id", {
|
|
2112
2154
|
get: function () {
|
|
2113
2155
|
this.update();
|
|
@@ -4510,21 +4552,6 @@ var hitTestBBox = function (x, y, ax, ay) {
|
|
|
4510
4552
|
return -ax <= x && x <= +ax && -ay <= y && y <= +ay;
|
|
4511
4553
|
};
|
|
4512
4554
|
|
|
4513
|
-
/*
|
|
4514
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
4515
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4516
|
-
*/
|
|
4517
|
-
var toGradientSerialized = function (gradient) {
|
|
4518
|
-
var points = gradient.points;
|
|
4519
|
-
var result = "[".concat(gradient.direction);
|
|
4520
|
-
for (var i = 0, imax = points.length, j = 1; i < imax; i += 1, j += 3) {
|
|
4521
|
-
var point = points[i];
|
|
4522
|
-
result += ",".concat(point.color, ",").concat(point.alpha, ",").concat(point.position);
|
|
4523
|
-
}
|
|
4524
|
-
result += "]";
|
|
4525
|
-
return result;
|
|
4526
|
-
};
|
|
4527
|
-
|
|
4528
4555
|
/*
|
|
4529
4556
|
* Copyright (C) 2019 Toshiba Corporation
|
|
4530
4557
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -4925,16 +4952,6 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
4925
4952
|
}
|
|
4926
4953
|
}
|
|
4927
4954
|
};
|
|
4928
|
-
Object.defineProperty(EShapeBase.prototype, "image", {
|
|
4929
|
-
get: function () {
|
|
4930
|
-
return this._image;
|
|
4931
|
-
},
|
|
4932
|
-
set: function (image) {
|
|
4933
|
-
this._image = image;
|
|
4934
|
-
},
|
|
4935
|
-
enumerable: false,
|
|
4936
|
-
configurable: true
|
|
4937
|
-
});
|
|
4938
4955
|
Object.defineProperty(EShapeBase.prototype, "points", {
|
|
4939
4956
|
get: function () {
|
|
4940
4957
|
return this._points;
|
|
@@ -5083,20 +5100,6 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
5083
5100
|
}
|
|
5084
5101
|
return childrenSerialized;
|
|
5085
5102
|
};
|
|
5086
|
-
EShapeBase.prototype.serializeImage = function (manager) {
|
|
5087
|
-
var image = this._image;
|
|
5088
|
-
return image != null ? manager.addResource(image.src) : -1;
|
|
5089
|
-
};
|
|
5090
|
-
EShapeBase.prototype.serializeGradient = function (manager) {
|
|
5091
|
-
var gradient = this.gradient;
|
|
5092
|
-
if (gradient != null) {
|
|
5093
|
-
if (gradient.serialized == null) {
|
|
5094
|
-
gradient.serialized = toGradientSerialized(gradient);
|
|
5095
|
-
}
|
|
5096
|
-
return manager.addResource(gradient.serialized);
|
|
5097
|
-
}
|
|
5098
|
-
return -1;
|
|
5099
|
-
};
|
|
5100
5103
|
EShapeBase.prototype.serializeState = function (manager) {
|
|
5101
5104
|
var state = this.state;
|
|
5102
5105
|
return (this.interactive ? 1 : 0) | (state.isFocusable ? 0 : 2) | (state.isActive ? 4 : 0);
|
|
@@ -7781,6 +7784,7 @@ var EShapeTextImpl = /** @class */ (function () {
|
|
|
7781
7784
|
this._parent = parent;
|
|
7782
7785
|
this._enable = true;
|
|
7783
7786
|
this._value = value;
|
|
7787
|
+
this._plength = this._length = value.length;
|
|
7784
7788
|
this._color = color;
|
|
7785
7789
|
this._alpha = alpha;
|
|
7786
7790
|
this._family = family;
|
|
@@ -7816,39 +7820,60 @@ var EShapeTextImpl = /** @class */ (function () {
|
|
|
7816
7820
|
set: function (value) {
|
|
7817
7821
|
if (this._value !== value) {
|
|
7818
7822
|
this._value = value;
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
this.atlas = undefined;
|
|
7824
|
-
parent_1.toDirty();
|
|
7825
|
-
return;
|
|
7823
|
+
var length_1 = value.length;
|
|
7824
|
+
this._length = length_1;
|
|
7825
|
+
if (this._plength < length_1) {
|
|
7826
|
+
this._plength = length_1;
|
|
7826
7827
|
}
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
var characters = atlas && atlas.characters;
|
|
7830
|
-
if (characters != null) {
|
|
7831
|
-
for (var i = 0, imax = value.length; i < imax; ++i) {
|
|
7832
|
-
var char = value[i];
|
|
7833
|
-
if (!(char in characters)) {
|
|
7834
|
-
this.atlas = undefined;
|
|
7835
|
-
parent_1.toDirty();
|
|
7836
|
-
return;
|
|
7837
|
-
}
|
|
7838
|
-
}
|
|
7828
|
+
if (this.isCompatible(value)) {
|
|
7829
|
+
this._parent.updateUploaded();
|
|
7839
7830
|
}
|
|
7840
7831
|
else {
|
|
7841
7832
|
this.atlas = undefined;
|
|
7842
|
-
|
|
7843
|
-
return;
|
|
7833
|
+
this._parent.toDirty();
|
|
7844
7834
|
}
|
|
7845
|
-
// Update uploaded
|
|
7846
|
-
parent_1.updateUploaded();
|
|
7847
7835
|
}
|
|
7848
7836
|
},
|
|
7849
7837
|
enumerable: false,
|
|
7850
7838
|
configurable: true
|
|
7851
7839
|
});
|
|
7840
|
+
EShapeTextImpl.prototype.isCompatible = function (value) {
|
|
7841
|
+
// Compatibility check
|
|
7842
|
+
var parent = this._parent;
|
|
7843
|
+
var uploaded = parent.uploaded;
|
|
7844
|
+
if (uploaded == null || !uploaded.isCompatible(parent)) {
|
|
7845
|
+
return false;
|
|
7846
|
+
}
|
|
7847
|
+
// Character code check
|
|
7848
|
+
var atlas = this.atlas;
|
|
7849
|
+
var characters = atlas && atlas.characters;
|
|
7850
|
+
if (characters != null) {
|
|
7851
|
+
for (var i = 0, imax = value.length; i < imax; ++i) {
|
|
7852
|
+
var char = value[i];
|
|
7853
|
+
if (!(char in characters)) {
|
|
7854
|
+
return false;
|
|
7855
|
+
}
|
|
7856
|
+
}
|
|
7857
|
+
}
|
|
7858
|
+
else {
|
|
7859
|
+
return false;
|
|
7860
|
+
}
|
|
7861
|
+
return true;
|
|
7862
|
+
};
|
|
7863
|
+
Object.defineProperty(EShapeTextImpl.prototype, "length", {
|
|
7864
|
+
get: function () {
|
|
7865
|
+
return this._length;
|
|
7866
|
+
},
|
|
7867
|
+
enumerable: false,
|
|
7868
|
+
configurable: true
|
|
7869
|
+
});
|
|
7870
|
+
Object.defineProperty(EShapeTextImpl.prototype, "plength", {
|
|
7871
|
+
get: function () {
|
|
7872
|
+
return this._plength;
|
|
7873
|
+
},
|
|
7874
|
+
enumerable: false,
|
|
7875
|
+
configurable: true
|
|
7876
|
+
});
|
|
7852
7877
|
Object.defineProperty(EShapeTextImpl.prototype, "family", {
|
|
7853
7878
|
get: function () {
|
|
7854
7879
|
return this._family;
|
|
@@ -7982,7 +8007,18 @@ var EShapeTextImpl = /** @class */ (function () {
|
|
|
7982
8007
|
var isChangedUploaded = false;
|
|
7983
8008
|
if (value != null && this._value !== value) {
|
|
7984
8009
|
this._value = value;
|
|
7985
|
-
|
|
8010
|
+
var length_2 = value.length;
|
|
8011
|
+
this._length = length_2;
|
|
8012
|
+
if (this._plength < length_2) {
|
|
8013
|
+
this._plength = length_2;
|
|
8014
|
+
}
|
|
8015
|
+
if (this.isCompatible(value)) {
|
|
8016
|
+
isChangedUploaded = true;
|
|
8017
|
+
}
|
|
8018
|
+
else {
|
|
8019
|
+
this.atlas = undefined;
|
|
8020
|
+
isChangedDirty = true;
|
|
8021
|
+
}
|
|
7986
8022
|
}
|
|
7987
8023
|
if (color != null && this._color !== color) {
|
|
7988
8024
|
this._color = color;
|
|
@@ -8081,6 +8117,21 @@ var EShapeTextImpl = /** @class */ (function () {
|
|
|
8081
8117
|
return EShapeTextImpl;
|
|
8082
8118
|
}());
|
|
8083
8119
|
|
|
8120
|
+
/*
|
|
8121
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
8122
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8123
|
+
*/
|
|
8124
|
+
var toGradientSerialized = function (gradient) {
|
|
8125
|
+
var points = gradient.points;
|
|
8126
|
+
var result = "[".concat(gradient.direction);
|
|
8127
|
+
for (var i = 0, imax = points.length, j = 1; i < imax; i += 1, j += 3) {
|
|
8128
|
+
var point = points[i];
|
|
8129
|
+
result += ",".concat(point.color, ",").concat(point.alpha, ",").concat(point.position);
|
|
8130
|
+
}
|
|
8131
|
+
result += "]";
|
|
8132
|
+
return result;
|
|
8133
|
+
};
|
|
8134
|
+
|
|
8084
8135
|
/*
|
|
8085
8136
|
* Copyright (C) 2019 Toshiba Corporation
|
|
8086
8137
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -8149,11 +8200,9 @@ var EShapePrimitive = /** @class */ (function (_super) {
|
|
|
8149
8200
|
if (this._image !== image) {
|
|
8150
8201
|
if (image != null) {
|
|
8151
8202
|
this._image = image;
|
|
8152
|
-
this.imageSrc = image.src;
|
|
8153
8203
|
}
|
|
8154
8204
|
else {
|
|
8155
8205
|
this._image = undefined;
|
|
8156
|
-
this.imageSrc = undefined;
|
|
8157
8206
|
}
|
|
8158
8207
|
var parent_1 = this.parent;
|
|
8159
8208
|
if (parent_1 != null) {
|
|
@@ -8164,6 +8213,20 @@ var EShapePrimitive = /** @class */ (function (_super) {
|
|
|
8164
8213
|
enumerable: false,
|
|
8165
8214
|
configurable: true
|
|
8166
8215
|
});
|
|
8216
|
+
EShapePrimitive.prototype.serializeImage = function (manager) {
|
|
8217
|
+
var image = this._image;
|
|
8218
|
+
return image != null ? manager.addResource(image.url) : -1;
|
|
8219
|
+
};
|
|
8220
|
+
EShapePrimitive.prototype.serializeGradient = function (manager) {
|
|
8221
|
+
var gradient = this.gradient;
|
|
8222
|
+
if (gradient != null) {
|
|
8223
|
+
if (gradient.serialized == null) {
|
|
8224
|
+
gradient.serialized = toGradientSerialized(gradient);
|
|
8225
|
+
}
|
|
8226
|
+
return manager.addResource(gradient.serialized);
|
|
8227
|
+
}
|
|
8228
|
+
return -1;
|
|
8229
|
+
};
|
|
8167
8230
|
return EShapePrimitive;
|
|
8168
8231
|
}(EShapeBase));
|
|
8169
8232
|
|
|
@@ -8520,22 +8583,24 @@ var EShapeBar = /** @class */ (function (_super) {
|
|
|
8520
8583
|
*/
|
|
8521
8584
|
var BuilderBar = /** @class */ (function (_super) {
|
|
8522
8585
|
__extends(BuilderBar, _super);
|
|
8523
|
-
function BuilderBar(vertexOffset, indexOffset) {
|
|
8524
|
-
var _this = _super.call(this, vertexOffset, indexOffset, BAR_VERTEX_COUNT, BAR_INDEX_COUNT) || this;
|
|
8586
|
+
function BuilderBar(buffer, vertexOffset, indexOffset) {
|
|
8587
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, BAR_VERTEX_COUNT, BAR_INDEX_COUNT) || this;
|
|
8525
8588
|
_this.pointsId = -1;
|
|
8526
8589
|
_this.pointsStyle = EShapePointsStyle.NONE;
|
|
8527
8590
|
return _this;
|
|
8528
8591
|
}
|
|
8529
|
-
BuilderBar.prototype.init = function (
|
|
8592
|
+
BuilderBar.prototype.init = function () {
|
|
8530
8593
|
var voffset = this.vertexOffset;
|
|
8531
8594
|
var ioffset = this.indexOffset;
|
|
8595
|
+
var buffer = this.buffer;
|
|
8532
8596
|
buffer.updateClippings();
|
|
8533
8597
|
buffer.updateIndices();
|
|
8534
8598
|
buildBarClipping(buffer.clippings, voffset);
|
|
8535
8599
|
buildBarIndex(buffer.indices, voffset, ioffset);
|
|
8536
8600
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
8537
8601
|
};
|
|
8538
|
-
BuilderBar.prototype.update = function (
|
|
8602
|
+
BuilderBar.prototype.update = function (shape) {
|
|
8603
|
+
var buffer = this.buffer;
|
|
8539
8604
|
this.updateVertexStepAndColorFill(buffer, shape);
|
|
8540
8605
|
this.updateColorStroke(buffer, shape);
|
|
8541
8606
|
this.updateUv(buffer, shape);
|
|
@@ -8605,7 +8670,8 @@ var BuilderBar = /** @class */ (function (_super) {
|
|
|
8605
8670
|
* SPDX-License-Identifier: Apache-2.0
|
|
8606
8671
|
*/
|
|
8607
8672
|
var BuilderText = /** @class */ (function () {
|
|
8608
|
-
function BuilderText(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
8673
|
+
function BuilderText(buffer, vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
8674
|
+
this.buffer = buffer;
|
|
8609
8675
|
this.vertexOffset = vertexOffset;
|
|
8610
8676
|
this.indexOffset = indexOffset;
|
|
8611
8677
|
this.vertexCount = vertexCount;
|
|
@@ -8640,10 +8706,11 @@ var BuilderText = /** @class */ (function () {
|
|
|
8640
8706
|
this.clipping = false;
|
|
8641
8707
|
this.fitting = false;
|
|
8642
8708
|
}
|
|
8643
|
-
BuilderText.prototype.init = function (
|
|
8709
|
+
BuilderText.prototype.init = function () {
|
|
8644
8710
|
var vcount = this.vertexCount;
|
|
8645
8711
|
if (0 < vcount) {
|
|
8646
8712
|
// Clippings
|
|
8713
|
+
var buffer = this.buffer;
|
|
8647
8714
|
var voffset = this.vertexOffset;
|
|
8648
8715
|
buffer.updateClippings();
|
|
8649
8716
|
buildTextClipping(buffer.clippings, voffset, vcount);
|
|
@@ -8652,21 +8719,51 @@ var BuilderText = /** @class */ (function () {
|
|
|
8652
8719
|
buildTextIndex(buffer.indices, voffset, this.indexOffset, this.indexCount);
|
|
8653
8720
|
}
|
|
8654
8721
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
8722
|
+
return this;
|
|
8723
|
+
};
|
|
8724
|
+
BuilderText.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
8725
|
+
var tcount = toTextBufferCount(shape);
|
|
8726
|
+
var vertexCount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
8727
|
+
var indexCount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
8728
|
+
if (this.buffer !== buffer ||
|
|
8729
|
+
this.vertexOffset !== vertexOffset ||
|
|
8730
|
+
this.indexOffset !== indexOffset ||
|
|
8731
|
+
this.vertexCount !== vertexCount ||
|
|
8732
|
+
this.indexCount !== indexCount) {
|
|
8733
|
+
if (buffer.check(vertexOffset, indexOffset, vertexCount, indexCount)) {
|
|
8734
|
+
this.inited = BuilderFlag.NONE;
|
|
8735
|
+
this.buffer = buffer;
|
|
8736
|
+
this.vertexOffset = vertexOffset;
|
|
8737
|
+
this.indexOffset = indexOffset;
|
|
8738
|
+
this.vertexCount = vertexCount;
|
|
8739
|
+
this.indexCount = indexCount;
|
|
8740
|
+
this.init();
|
|
8741
|
+
return true;
|
|
8742
|
+
}
|
|
8743
|
+
else {
|
|
8744
|
+
return false;
|
|
8745
|
+
}
|
|
8746
|
+
}
|
|
8747
|
+
else {
|
|
8748
|
+
return true;
|
|
8749
|
+
}
|
|
8655
8750
|
};
|
|
8656
8751
|
BuilderText.prototype.isCompatible = function (shape) {
|
|
8657
8752
|
return toTextBufferCount(shape) << TEXT_VERTEX_COUNT_SHIFT === this.vertexCount;
|
|
8658
8753
|
};
|
|
8659
|
-
BuilderText.prototype.update = function (
|
|
8754
|
+
BuilderText.prototype.update = function (shape) {
|
|
8660
8755
|
var vcount = this.vertexCount;
|
|
8661
8756
|
if (0 < vcount) {
|
|
8662
8757
|
var textAtlas = shape.text.atlas;
|
|
8663
8758
|
if (textAtlas != null) {
|
|
8759
|
+
var buffer = this.buffer;
|
|
8664
8760
|
this.updateVertex(buffer, shape, textAtlas);
|
|
8665
8761
|
this.updateColorFill(buffer, shape);
|
|
8666
8762
|
this.updateColorStroke(buffer, shape);
|
|
8667
8763
|
this.updateStep(buffer, shape);
|
|
8668
8764
|
}
|
|
8669
8765
|
}
|
|
8766
|
+
return this;
|
|
8670
8767
|
};
|
|
8671
8768
|
BuilderText.prototype.updateVertex = function (buffer, shape, textAtlas) {
|
|
8672
8769
|
var size = shape.size;
|
|
@@ -8835,8 +8932,8 @@ var createBarUploaded = function (buffer, shape, voffset, ioffset, antialiasWeig
|
|
|
8835
8932
|
var icount = BAR_INDEX_COUNT + ticount;
|
|
8836
8933
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
8837
8934
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
8838
|
-
new BuilderBar(voffset, ioffset),
|
|
8839
|
-
new BuilderText(voffset + BAR_VERTEX_COUNT, ioffset + BAR_INDEX_COUNT, tvcount, ticount)
|
|
8935
|
+
new BuilderBar(buffer, voffset, ioffset),
|
|
8936
|
+
new BuilderText(buffer, voffset + BAR_VERTEX_COUNT, ioffset + BAR_INDEX_COUNT, tvcount, ticount)
|
|
8840
8937
|
]).init(shape);
|
|
8841
8938
|
}
|
|
8842
8939
|
return null;
|
|
@@ -17841,6 +17938,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
|
|
|
17841
17938
|
enumerable: false,
|
|
17842
17939
|
configurable: true
|
|
17843
17940
|
});
|
|
17941
|
+
EShapeGroupViewer.prototype.serializeGradient = function (manager) {
|
|
17942
|
+
return -1;
|
|
17943
|
+
};
|
|
17844
17944
|
Object.defineProperty(EShapeGroupViewer.prototype, "radius", {
|
|
17845
17945
|
get: function () {
|
|
17846
17946
|
return 0;
|
|
@@ -17861,6 +17961,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
|
|
|
17861
17961
|
enumerable: false,
|
|
17862
17962
|
configurable: true
|
|
17863
17963
|
});
|
|
17964
|
+
EShapeGroupViewer.prototype.serializeImage = function (manager) {
|
|
17965
|
+
return -1;
|
|
17966
|
+
};
|
|
17864
17967
|
Object.defineProperty(EShapeGroupViewer.prototype, "points", {
|
|
17865
17968
|
get: function () {
|
|
17866
17969
|
return undefined;
|
|
@@ -19753,6 +19856,8 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
19753
19856
|
this._valuesBaseLength = 0;
|
|
19754
19857
|
this._values = [];
|
|
19755
19858
|
this._segments = [];
|
|
19859
|
+
this._length = 0;
|
|
19860
|
+
this._plength = 0;
|
|
19756
19861
|
var parentSize = parent.size;
|
|
19757
19862
|
var parentSizeX = parentSize.x;
|
|
19758
19863
|
var parentSizeY = parentSize.y;
|
|
@@ -19764,7 +19869,14 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
19764
19869
|
}
|
|
19765
19870
|
Object.defineProperty(EShapeLinePoints.prototype, "length", {
|
|
19766
19871
|
get: function () {
|
|
19767
|
-
return this.
|
|
19872
|
+
return this._length;
|
|
19873
|
+
},
|
|
19874
|
+
enumerable: false,
|
|
19875
|
+
configurable: true
|
|
19876
|
+
});
|
|
19877
|
+
Object.defineProperty(EShapeLinePoints.prototype, "plength", {
|
|
19878
|
+
get: function () {
|
|
19879
|
+
return this._plength;
|
|
19768
19880
|
},
|
|
19769
19881
|
enumerable: false,
|
|
19770
19882
|
configurable: true
|
|
@@ -19821,7 +19933,6 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
19821
19933
|
if (this._formatter || this._style & EShapePointsStyle.FORMATTER_MASK) {
|
|
19822
19934
|
var uploaded = parent.uploaded;
|
|
19823
19935
|
if (uploaded && !uploaded.isCompatible(parent)) {
|
|
19824
|
-
parent.uploaded = undefined;
|
|
19825
19936
|
parent.toDirty();
|
|
19826
19937
|
}
|
|
19827
19938
|
}
|
|
@@ -19925,6 +20036,7 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
19925
20036
|
if (result == null) {
|
|
19926
20037
|
result = {
|
|
19927
20038
|
length: 0,
|
|
20039
|
+
plength: 0,
|
|
19928
20040
|
values: [],
|
|
19929
20041
|
segments: [],
|
|
19930
20042
|
boundary: [0, 0, 0, 0],
|
|
@@ -19935,6 +20047,9 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
19935
20047
|
var segments = this._segments;
|
|
19936
20048
|
var length_1 = values.length >> 1;
|
|
19937
20049
|
formatter(length_1, values, segments, style, result);
|
|
20050
|
+
if (result.plength < result.length) {
|
|
20051
|
+
result.plength = result.length;
|
|
20052
|
+
}
|
|
19938
20053
|
toPointsBoundary(result.values, result.boundary);
|
|
19939
20054
|
}
|
|
19940
20055
|
else {
|
|
@@ -20024,6 +20139,11 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
20024
20139
|
}
|
|
20025
20140
|
}
|
|
20026
20141
|
}
|
|
20142
|
+
var newLength = newValuesLength >> 1;
|
|
20143
|
+
this._length = newLength;
|
|
20144
|
+
if (this._plength < newLength) {
|
|
20145
|
+
this._plength = newLength;
|
|
20146
|
+
}
|
|
20027
20147
|
}
|
|
20028
20148
|
// Segments
|
|
20029
20149
|
if (newSegments != null) {
|
|
@@ -20089,7 +20209,6 @@ var EShapeLinePoints = /** @class */ (function () {
|
|
|
20089
20209
|
parent_1.updateUploaded();
|
|
20090
20210
|
}
|
|
20091
20211
|
else {
|
|
20092
|
-
parent_1.uploaded = undefined;
|
|
20093
20212
|
parent_1.toDirty();
|
|
20094
20213
|
}
|
|
20095
20214
|
}
|
|
@@ -21051,12 +21170,10 @@ var DynamicSDFFontGenerator = /** @class */ (function () {
|
|
|
21051
21170
|
}
|
|
21052
21171
|
}
|
|
21053
21172
|
};
|
|
21054
|
-
DynamicSDFFontGenerator.prototype.updateTexture = function (source) {
|
|
21173
|
+
DynamicSDFFontGenerator.prototype.updateTexture = function (width, height, source) {
|
|
21055
21174
|
var gl = this._gl;
|
|
21056
21175
|
var canvas = this._canvas;
|
|
21057
21176
|
if (gl != null && gl.isContextLost() !== true && canvas != null) {
|
|
21058
|
-
var width = source.width;
|
|
21059
|
-
var height = source.height;
|
|
21060
21177
|
if (canvas.width !== width || canvas.height !== height) {
|
|
21061
21178
|
canvas.width = width;
|
|
21062
21179
|
canvas.height = height;
|
|
@@ -21419,7 +21536,7 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
|
|
|
21419
21536
|
context.fillText(data.character, data.origin.x, data.origin.y);
|
|
21420
21537
|
}
|
|
21421
21538
|
// Convert to SDF font texture
|
|
21422
|
-
generator.updateTexture(canvas);
|
|
21539
|
+
generator.updateTexture(width, height, canvas);
|
|
21423
21540
|
generator.render();
|
|
21424
21541
|
generator.read(canvas);
|
|
21425
21542
|
return true;
|
|
@@ -21570,9 +21687,9 @@ var DynamicSDFFontAtlases = /** @class */ (function () {
|
|
|
21570
21687
|
*/
|
|
21571
21688
|
var DynamicAtlasItemImage = /** @class */ (function (_super) {
|
|
21572
21689
|
__extends(DynamicAtlasItemImage, _super);
|
|
21573
|
-
function DynamicAtlasItemImage(
|
|
21574
|
-
var _this = _super.call(this,
|
|
21575
|
-
_this.
|
|
21690
|
+
function DynamicAtlasItemImage(src, width, height, source, baseTexture) {
|
|
21691
|
+
var _this = _super.call(this, src, width / baseTexture.resolution, height / baseTexture.resolution, 0, baseTexture) || this;
|
|
21692
|
+
_this.source = source;
|
|
21576
21693
|
return _this;
|
|
21577
21694
|
}
|
|
21578
21695
|
DynamicAtlasItemImage.prototype.render = function (context) {
|
|
@@ -21581,12 +21698,21 @@ var DynamicAtlasItemImage = /** @class */ (function (_super) {
|
|
|
21581
21698
|
var y = frame.y;
|
|
21582
21699
|
var w = frame.width;
|
|
21583
21700
|
var h = frame.height;
|
|
21584
|
-
var
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
|
|
21701
|
+
var source = this.source;
|
|
21702
|
+
if (source instanceof ImageData) {
|
|
21703
|
+
context.putImageData(source, x, y);
|
|
21704
|
+
context.putImageData(source, x - 1, y, 0, 0, 1, h);
|
|
21705
|
+
context.putImageData(source, x, y - 1, 0, 0, w, 1);
|
|
21706
|
+
context.putImageData(source, x + w, y, w - 1, 0, 1, h);
|
|
21707
|
+
context.putImageData(source, x, y + h, 0, h - 1, w, 1);
|
|
21708
|
+
}
|
|
21709
|
+
else {
|
|
21710
|
+
context.drawImage(source, x, y, w, h);
|
|
21711
|
+
context.drawImage(source, 0, 0, 1, h, x - 1, y - 1, 1, h + 2);
|
|
21712
|
+
context.drawImage(source, 0, 0, w, 1, x, y - 1, w, 1);
|
|
21713
|
+
context.drawImage(source, w - 1, 0, 1, h, x + w, y - 1, 1, h + 2);
|
|
21714
|
+
context.drawImage(source, 0, h - 1, w, 1, x, y + h, w, 1);
|
|
21715
|
+
}
|
|
21590
21716
|
};
|
|
21591
21717
|
return DynamicAtlasItemImage;
|
|
21592
21718
|
}(DynamicAtlasItem));
|
|
@@ -21771,12 +21897,6 @@ var EShapeBuffer = /** @class */ (function () {
|
|
|
21771
21897
|
}
|
|
21772
21898
|
}
|
|
21773
21899
|
};
|
|
21774
|
-
EShapeBuffer.prototype.isCompatible = function (shape, uploaded, vindex, iindex) {
|
|
21775
|
-
return (uploaded.getBuffer() === this &&
|
|
21776
|
-
uploaded.getVertexOffset() === vindex &&
|
|
21777
|
-
uploaded.getIndexOffset() === iindex &&
|
|
21778
|
-
uploaded.isCompatible(shape));
|
|
21779
|
-
};
|
|
21780
21900
|
EShapeBuffer.prototype.update = function (iterator, antialiasWeight, noMoreThanOne) {
|
|
21781
21901
|
var builder = this._builder;
|
|
21782
21902
|
builder.begin();
|
|
@@ -21785,28 +21905,18 @@ var EShapeBuffer = /** @class */ (function () {
|
|
|
21785
21905
|
var shape = iterator.get();
|
|
21786
21906
|
for (; shape != null; shape = iterator.next()) {
|
|
21787
21907
|
var uploaded = shape.uploaded;
|
|
21788
|
-
if (uploaded == null || !this.isCompatible(shape, uploaded, vindex, iindex)) {
|
|
21789
|
-
break;
|
|
21790
|
-
}
|
|
21791
|
-
uploaded.update(shape);
|
|
21792
|
-
uploaded.buildUnit(builder);
|
|
21793
|
-
vindex += uploaded.getVertexCount();
|
|
21794
|
-
iindex += uploaded.getIndexCount();
|
|
21795
|
-
if (noMoreThanOne) {
|
|
21796
|
-
iterator.next();
|
|
21797
|
-
builder.end();
|
|
21798
|
-
this._vertexCount = vindex;
|
|
21799
|
-
this._indexCount = iindex;
|
|
21800
|
-
return 0 < builder.units.length;
|
|
21801
|
-
}
|
|
21802
|
-
}
|
|
21803
|
-
for (; shape != null; shape = iterator.next()) {
|
|
21804
|
-
var creater = EShapeUploadeds[shape.type] || EShapeUploadeds[EShapeType.GROUP];
|
|
21805
|
-
if (creater == null) {
|
|
21806
|
-
break;
|
|
21807
|
-
}
|
|
21808
|
-
var uploaded = creater(this, shape, vindex, iindex, antialiasWeight);
|
|
21809
21908
|
if (uploaded == null) {
|
|
21909
|
+
var creator = EShapeUploadeds[shape.type] || EShapeUploadeds[EShapeType.GROUP];
|
|
21910
|
+
if (creator == null) {
|
|
21911
|
+
break;
|
|
21912
|
+
}
|
|
21913
|
+
var newUploaded = creator(this, shape, vindex, iindex, antialiasWeight);
|
|
21914
|
+
if (newUploaded == null) {
|
|
21915
|
+
break;
|
|
21916
|
+
}
|
|
21917
|
+
uploaded = newUploaded;
|
|
21918
|
+
}
|
|
21919
|
+
else if (!uploaded.reinit(this, shape, vindex, iindex)) {
|
|
21810
21920
|
break;
|
|
21811
21921
|
}
|
|
21812
21922
|
uploaded.buildUnit(builder);
|
|
@@ -21955,24 +22065,18 @@ var EShapeRenderer = /** @class */ (function (_super) {
|
|
|
21955
22065
|
};
|
|
21956
22066
|
EShapeRenderer.prototype.updateAtlas = function (shape, atlas, fontAtlases, defaultTexture, baseTexture) {
|
|
21957
22067
|
// Texture
|
|
21958
|
-
// Do not access the shape.image.
|
|
22068
|
+
// Do not access the shape.image.source here.
|
|
21959
22069
|
// It slows down the rendering speed significantly.
|
|
21960
|
-
var
|
|
21961
|
-
if (
|
|
21962
|
-
var textureItem = atlas.get(
|
|
22070
|
+
var image = shape.image;
|
|
22071
|
+
if (image != null) {
|
|
22072
|
+
var textureItem = atlas.get(image.url);
|
|
21963
22073
|
if (textureItem != null) {
|
|
21964
22074
|
shape.texture = textureItem.texture;
|
|
21965
22075
|
}
|
|
21966
22076
|
else {
|
|
21967
|
-
var
|
|
21968
|
-
|
|
21969
|
-
|
|
21970
|
-
shape.texture = newTextureItem.texture;
|
|
21971
|
-
atlas.set(newTextureItem.id, newTextureItem);
|
|
21972
|
-
}
|
|
21973
|
-
else {
|
|
21974
|
-
shape.texture = defaultTexture;
|
|
21975
|
-
}
|
|
22077
|
+
var newTextureItem = new DynamicAtlasItemImage(image.url, image.width, image.height, image.source, baseTexture);
|
|
22078
|
+
shape.texture = newTextureItem.texture;
|
|
22079
|
+
atlas.set(newTextureItem.id, newTextureItem);
|
|
21976
22080
|
}
|
|
21977
22081
|
}
|
|
21978
22082
|
else {
|
|
@@ -22140,7 +22244,7 @@ var EShapeContainer = /** @class */ (function (_super) {
|
|
|
22140
22244
|
_this._pixelScale = 1;
|
|
22141
22245
|
_this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
|
|
22142
22246
|
_this._shapeScale = 1;
|
|
22143
|
-
_this._shapeScaleId = -1; // Since
|
|
22247
|
+
_this._shapeScaleId = -1; // Since Transform._worldID starts from zero.
|
|
22144
22248
|
_this._work = new pixi_js.Point();
|
|
22145
22249
|
_this._buffers = [];
|
|
22146
22250
|
return _this;
|
|
@@ -28857,345 +28961,6 @@ var DDynamicTextGeometry = /** @class */ (function (_super) {
|
|
|
28857
28961
|
return DDynamicTextGeometry;
|
|
28858
28962
|
}(pixi_js.MeshGeometry));
|
|
28859
28963
|
|
|
28860
|
-
/*
|
|
28861
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
28862
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
28863
|
-
*/
|
|
28864
|
-
var DDynamicTextStyle = /** @class */ (function () {
|
|
28865
|
-
function DDynamicTextStyle(options, onChange) {
|
|
28866
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
28867
|
-
this._id = 0;
|
|
28868
|
-
this._idApproved = -1;
|
|
28869
|
-
var defaultOptions = this.getDefaultOptions();
|
|
28870
|
-
if (options) {
|
|
28871
|
-
this._align = (_a = options.align) !== null && _a !== void 0 ? _a : defaultOptions.align;
|
|
28872
|
-
this._fontFamily = (_b = options.fontFamily) !== null && _b !== void 0 ? _b : defaultOptions.fontFamily;
|
|
28873
|
-
this._fontSize = (_c = options.fontSize) !== null && _c !== void 0 ? _c : defaultOptions.fontSize;
|
|
28874
|
-
this._fontStyle = (_d = options.fontStyle) !== null && _d !== void 0 ? _d : defaultOptions.fontStyle;
|
|
28875
|
-
this._fontVariant = (_e = options.fontVariant) !== null && _e !== void 0 ? _e : defaultOptions.fontVariant;
|
|
28876
|
-
this._fontWeight = (_f = options.fontWeight) !== null && _f !== void 0 ? _f : defaultOptions.fontWeight;
|
|
28877
|
-
this._fill = (_g = options.fill) !== null && _g !== void 0 ? _g : defaultOptions.fill;
|
|
28878
|
-
this._clipping = (_h = options.clipping) !== null && _h !== void 0 ? _h : defaultOptions.clipping;
|
|
28879
|
-
this._fitting = (_j = options.fitting) !== null && _j !== void 0 ? _j : defaultOptions.fitting;
|
|
28880
|
-
this._wordWrap = toEnum((_k = options.wordWrap) !== null && _k !== void 0 ? _k : defaultOptions.wordWrap, DDynamicTextStyleWordWrap);
|
|
28881
|
-
this._lineHeight = (_l = options.lineHeight) !== null && _l !== void 0 ? _l : defaultOptions.lineHeight;
|
|
28882
|
-
}
|
|
28883
|
-
else {
|
|
28884
|
-
this._align = defaultOptions.align;
|
|
28885
|
-
this._fontFamily = defaultOptions.fontFamily;
|
|
28886
|
-
this._fontSize = defaultOptions.fontSize;
|
|
28887
|
-
this._fontStyle = defaultOptions.fontStyle;
|
|
28888
|
-
this._fontVariant = defaultOptions.fontVariant;
|
|
28889
|
-
this._fontWeight = defaultOptions.fontWeight;
|
|
28890
|
-
this._fill = defaultOptions.fill;
|
|
28891
|
-
this._clipping = defaultOptions.clipping;
|
|
28892
|
-
this._fitting = defaultOptions.fitting;
|
|
28893
|
-
this._wordWrap = toEnum(defaultOptions.wordWrap, DDynamicTextStyleWordWrap);
|
|
28894
|
-
this._lineHeight = defaultOptions.lineHeight;
|
|
28895
|
-
}
|
|
28896
|
-
this._fontSizeFitted = this._fontSize;
|
|
28897
|
-
this._lineHeightFitted = this._lineHeight;
|
|
28898
|
-
this._isFontFitted = false;
|
|
28899
|
-
this._fontIdFontSize = this._fontSize;
|
|
28900
|
-
this._fontIdId = -1;
|
|
28901
|
-
this._fontId = "";
|
|
28902
|
-
this._fontIdApproved = "";
|
|
28903
|
-
this._fillApproved = 0x000000;
|
|
28904
|
-
this._onChange = onChange;
|
|
28905
|
-
}
|
|
28906
|
-
DDynamicTextStyle.prototype.getDefaultOptions = function () {
|
|
28907
|
-
var result = DDynamicTextStyle.DEFAULT_OPTIONS;
|
|
28908
|
-
if (result == null) {
|
|
28909
|
-
result = this.newDefaultOptions();
|
|
28910
|
-
DDynamicTextStyle.DEFAULT_OPTIONS = result;
|
|
28911
|
-
}
|
|
28912
|
-
return result;
|
|
28913
|
-
};
|
|
28914
|
-
DDynamicTextStyle.prototype.newDefaultOptions = function () {
|
|
28915
|
-
var theme = DThemes.getInstance().get("DBase");
|
|
28916
|
-
return {
|
|
28917
|
-
align: "left",
|
|
28918
|
-
fontFamily: theme.getFontFamilly(),
|
|
28919
|
-
fontSize: theme.getFontSize(),
|
|
28920
|
-
fontStyle: "normal",
|
|
28921
|
-
fontVariant: "normal",
|
|
28922
|
-
fontWeight: "normal",
|
|
28923
|
-
fill: theme.getColor(new DBaseStateSetImpl()),
|
|
28924
|
-
clipping: true,
|
|
28925
|
-
fitting: false,
|
|
28926
|
-
wordWrap: DDynamicTextStyleWordWrap.NONE,
|
|
28927
|
-
lineHeight: theme.getLineHeight()
|
|
28928
|
-
};
|
|
28929
|
-
};
|
|
28930
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "id", {
|
|
28931
|
-
get: function () {
|
|
28932
|
-
return this._id;
|
|
28933
|
-
},
|
|
28934
|
-
enumerable: false,
|
|
28935
|
-
configurable: true
|
|
28936
|
-
});
|
|
28937
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "idApproved", {
|
|
28938
|
-
get: function () {
|
|
28939
|
-
return this._idApproved;
|
|
28940
|
-
},
|
|
28941
|
-
enumerable: false,
|
|
28942
|
-
configurable: true
|
|
28943
|
-
});
|
|
28944
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontId", {
|
|
28945
|
-
get: function () {
|
|
28946
|
-
this.update();
|
|
28947
|
-
return this._fontId;
|
|
28948
|
-
},
|
|
28949
|
-
enumerable: false,
|
|
28950
|
-
configurable: true
|
|
28951
|
-
});
|
|
28952
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontIdFontSize", {
|
|
28953
|
-
get: function () {
|
|
28954
|
-
this.update();
|
|
28955
|
-
return this._fontSizeFitted;
|
|
28956
|
-
},
|
|
28957
|
-
enumerable: false,
|
|
28958
|
-
configurable: true
|
|
28959
|
-
});
|
|
28960
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontIdApproved", {
|
|
28961
|
-
get: function () {
|
|
28962
|
-
return this._fontIdApproved;
|
|
28963
|
-
},
|
|
28964
|
-
enumerable: false,
|
|
28965
|
-
configurable: true
|
|
28966
|
-
});
|
|
28967
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fill", {
|
|
28968
|
-
get: function () {
|
|
28969
|
-
return this._fill;
|
|
28970
|
-
},
|
|
28971
|
-
set: function (fill) {
|
|
28972
|
-
if (this._fill !== fill) {
|
|
28973
|
-
this._fill = fill;
|
|
28974
|
-
this.onChange();
|
|
28975
|
-
}
|
|
28976
|
-
},
|
|
28977
|
-
enumerable: false,
|
|
28978
|
-
configurable: true
|
|
28979
|
-
});
|
|
28980
|
-
DDynamicTextStyle.prototype.onChange = function () {
|
|
28981
|
-
this._id += 1;
|
|
28982
|
-
this._onChange();
|
|
28983
|
-
};
|
|
28984
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fillApproved", {
|
|
28985
|
-
get: function () {
|
|
28986
|
-
return this._fillApproved;
|
|
28987
|
-
},
|
|
28988
|
-
enumerable: false,
|
|
28989
|
-
configurable: true
|
|
28990
|
-
});
|
|
28991
|
-
DDynamicTextStyle.prototype.approve = function () {
|
|
28992
|
-
this.update();
|
|
28993
|
-
this._idApproved = this._id;
|
|
28994
|
-
this._fontIdApproved = this._fontId;
|
|
28995
|
-
this._fillApproved = this._fill;
|
|
28996
|
-
};
|
|
28997
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontFamily", {
|
|
28998
|
-
get: function () {
|
|
28999
|
-
return this._fontFamily;
|
|
29000
|
-
},
|
|
29001
|
-
set: function (fontFamily) {
|
|
29002
|
-
if (this._fontFamily !== fontFamily) {
|
|
29003
|
-
this._fontFamily = fontFamily;
|
|
29004
|
-
this.onChange();
|
|
29005
|
-
}
|
|
29006
|
-
},
|
|
29007
|
-
enumerable: false,
|
|
29008
|
-
configurable: true
|
|
29009
|
-
});
|
|
29010
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontSize", {
|
|
29011
|
-
get: function () {
|
|
29012
|
-
return this._fontSize;
|
|
29013
|
-
},
|
|
29014
|
-
set: function (fontSize) {
|
|
29015
|
-
if (this._fontSize !== fontSize) {
|
|
29016
|
-
this._fontSize = fontSize;
|
|
29017
|
-
this._fontSizeFitted = fontSize;
|
|
29018
|
-
this._lineHeightFitted = this._lineHeight;
|
|
29019
|
-
this._isFontFitted = false;
|
|
29020
|
-
this.onChange();
|
|
29021
|
-
}
|
|
29022
|
-
},
|
|
29023
|
-
enumerable: false,
|
|
29024
|
-
configurable: true
|
|
29025
|
-
});
|
|
29026
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontSizeFitted", {
|
|
29027
|
-
get: function () {
|
|
29028
|
-
return this._fontSizeFitted;
|
|
29029
|
-
},
|
|
29030
|
-
enumerable: false,
|
|
29031
|
-
configurable: true
|
|
29032
|
-
});
|
|
29033
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "isFontFitted", {
|
|
29034
|
-
get: function () {
|
|
29035
|
-
return this._isFontFitted;
|
|
29036
|
-
},
|
|
29037
|
-
enumerable: false,
|
|
29038
|
-
configurable: true
|
|
29039
|
-
});
|
|
29040
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontStyle", {
|
|
29041
|
-
get: function () {
|
|
29042
|
-
return this._fontStyle;
|
|
29043
|
-
},
|
|
29044
|
-
set: function (fontStyle) {
|
|
29045
|
-
if (this._fontStyle !== fontStyle) {
|
|
29046
|
-
this._fontStyle = fontStyle;
|
|
29047
|
-
this.onChange();
|
|
29048
|
-
}
|
|
29049
|
-
},
|
|
29050
|
-
enumerable: false,
|
|
29051
|
-
configurable: true
|
|
29052
|
-
});
|
|
29053
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontVariant", {
|
|
29054
|
-
get: function () {
|
|
29055
|
-
return this._fontVariant;
|
|
29056
|
-
},
|
|
29057
|
-
set: function (fontVariant) {
|
|
29058
|
-
if (this._fontVariant !== fontVariant) {
|
|
29059
|
-
this._fontVariant = fontVariant;
|
|
29060
|
-
this.onChange();
|
|
29061
|
-
}
|
|
29062
|
-
},
|
|
29063
|
-
enumerable: false,
|
|
29064
|
-
configurable: true
|
|
29065
|
-
});
|
|
29066
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fontWeight", {
|
|
29067
|
-
get: function () {
|
|
29068
|
-
return this._fontWeight;
|
|
29069
|
-
},
|
|
29070
|
-
set: function (fontWeight) {
|
|
29071
|
-
if (this._fontWeight !== fontWeight) {
|
|
29072
|
-
this._fontWeight = fontWeight;
|
|
29073
|
-
this.onChange();
|
|
29074
|
-
}
|
|
29075
|
-
},
|
|
29076
|
-
enumerable: false,
|
|
29077
|
-
configurable: true
|
|
29078
|
-
});
|
|
29079
|
-
DDynamicTextStyle.prototype.update = function () {
|
|
29080
|
-
if (this._fontIdId !== this._id) {
|
|
29081
|
-
this._fontIdId = this._id;
|
|
29082
|
-
var fontIdFontSize = this._fitting ? this._fontSizeFitted : this._fontSize;
|
|
29083
|
-
this._fontIdFontSize = fontIdFontSize;
|
|
29084
|
-
this._fontId = this.toFontId(fontIdFontSize);
|
|
29085
|
-
}
|
|
29086
|
-
};
|
|
29087
|
-
DDynamicTextStyle.prototype.toFontId = function (fontSize) {
|
|
29088
|
-
return "".concat(this._fontStyle, " ").concat(this._fontVariant, " ").concat(this._fontWeight, " ").concat(fontSize, "px ").concat(this._fontFamily);
|
|
29089
|
-
};
|
|
29090
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "clipping", {
|
|
29091
|
-
get: function () {
|
|
29092
|
-
return this._clipping;
|
|
29093
|
-
},
|
|
29094
|
-
set: function (clipping) {
|
|
29095
|
-
if (this._clipping !== clipping) {
|
|
29096
|
-
this._clipping = clipping;
|
|
29097
|
-
this.onChange();
|
|
29098
|
-
}
|
|
29099
|
-
},
|
|
29100
|
-
enumerable: false,
|
|
29101
|
-
configurable: true
|
|
29102
|
-
});
|
|
29103
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "fitting", {
|
|
29104
|
-
get: function () {
|
|
29105
|
-
return this._fitting;
|
|
29106
|
-
},
|
|
29107
|
-
set: function (fitting) {
|
|
29108
|
-
if (this._fitting !== fitting) {
|
|
29109
|
-
this._fitting = fitting;
|
|
29110
|
-
this.onChange();
|
|
29111
|
-
}
|
|
29112
|
-
},
|
|
29113
|
-
enumerable: false,
|
|
29114
|
-
configurable: true
|
|
29115
|
-
});
|
|
29116
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "wordWrap", {
|
|
29117
|
-
get: function () {
|
|
29118
|
-
return this._wordWrap;
|
|
29119
|
-
},
|
|
29120
|
-
set: function (wordWrap) {
|
|
29121
|
-
if (this._wordWrap !== wordWrap) {
|
|
29122
|
-
this._wordWrap = wordWrap;
|
|
29123
|
-
this.onChange();
|
|
29124
|
-
}
|
|
29125
|
-
},
|
|
29126
|
-
enumerable: false,
|
|
29127
|
-
configurable: true
|
|
29128
|
-
});
|
|
29129
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "lineHeight", {
|
|
29130
|
-
get: function () {
|
|
29131
|
-
return this._lineHeight;
|
|
29132
|
-
},
|
|
29133
|
-
set: function (lineHeight) {
|
|
29134
|
-
if (this._lineHeight !== lineHeight) {
|
|
29135
|
-
this._lineHeight = lineHeight;
|
|
29136
|
-
this._fontSizeFitted = this._fontSize;
|
|
29137
|
-
this._lineHeightFitted = lineHeight;
|
|
29138
|
-
this._isFontFitted = false;
|
|
29139
|
-
this.onChange();
|
|
29140
|
-
}
|
|
29141
|
-
},
|
|
29142
|
-
enumerable: false,
|
|
29143
|
-
configurable: true
|
|
29144
|
-
});
|
|
29145
|
-
Object.defineProperty(DDynamicTextStyle.prototype, "lineHeightFitted", {
|
|
29146
|
-
get: function () {
|
|
29147
|
-
return this._lineHeightFitted;
|
|
29148
|
-
},
|
|
29149
|
-
set: function (lineHeightFitted) {
|
|
29150
|
-
if (this._lineHeightFitted !== lineHeightFitted) {
|
|
29151
|
-
this._lineHeightFitted = lineHeightFitted;
|
|
29152
|
-
this.onChange();
|
|
29153
|
-
}
|
|
29154
|
-
},
|
|
29155
|
-
enumerable: false,
|
|
29156
|
-
configurable: true
|
|
29157
|
-
});
|
|
29158
|
-
DDynamicTextStyle.prototype.fit = function (fontSize, lineHeight) {
|
|
29159
|
-
var isChanged = false;
|
|
29160
|
-
if (fontSize < this._fontSizeFitted) {
|
|
29161
|
-
this._fontSizeFitted = fontSize;
|
|
29162
|
-
isChanged = true;
|
|
29163
|
-
}
|
|
29164
|
-
if (this._lineHeightFitted !== lineHeight) {
|
|
29165
|
-
this._lineHeightFitted = lineHeight;
|
|
29166
|
-
isChanged = true;
|
|
29167
|
-
}
|
|
29168
|
-
if (this._isFontFitted !== true) {
|
|
29169
|
-
this._isFontFitted = true;
|
|
29170
|
-
isChanged = true;
|
|
29171
|
-
}
|
|
29172
|
-
if (isChanged) {
|
|
29173
|
-
this.onChange();
|
|
29174
|
-
}
|
|
29175
|
-
return isChanged;
|
|
29176
|
-
};
|
|
29177
|
-
DDynamicTextStyle.prototype.unfit = function () {
|
|
29178
|
-
var isChanged = false;
|
|
29179
|
-
if (this._isFontFitted !== false) {
|
|
29180
|
-
this._isFontFitted = false;
|
|
29181
|
-
isChanged = true;
|
|
29182
|
-
}
|
|
29183
|
-
if (this._fontSizeFitted !== this._fontSize) {
|
|
29184
|
-
this._fontSizeFitted = this._fontSize;
|
|
29185
|
-
isChanged = true;
|
|
29186
|
-
}
|
|
29187
|
-
if (this._lineHeightFitted !== this._lineHeight) {
|
|
29188
|
-
this._lineHeightFitted = this._lineHeight;
|
|
29189
|
-
isChanged = true;
|
|
29190
|
-
}
|
|
29191
|
-
if (isChanged) {
|
|
29192
|
-
this.onChange();
|
|
29193
|
-
}
|
|
29194
|
-
return isChanged;
|
|
29195
|
-
};
|
|
29196
|
-
return DDynamicTextStyle;
|
|
29197
|
-
}());
|
|
29198
|
-
|
|
29199
28964
|
/*
|
|
29200
28965
|
* Copyright (C) 2019 Toshiba Corporation
|
|
29201
28966
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -29273,13 +29038,11 @@ var UtilFont = /** @class */ (function () {
|
|
|
29273
29038
|
*/
|
|
29274
29039
|
var DDynamicText = /** @class */ (function (_super) {
|
|
29275
29040
|
__extends(DDynamicText, _super);
|
|
29276
|
-
function DDynamicText(
|
|
29041
|
+
function DDynamicText(style) {
|
|
29277
29042
|
var _this = _super.call(this, new DDynamicTextGeometry(), new pixi_js.MeshMaterial(pixi_js.Texture.EMPTY)) || this;
|
|
29278
|
-
_this._style =
|
|
29279
|
-
|
|
29280
|
-
_this.
|
|
29281
|
-
_this._atlas = null;
|
|
29282
|
-
_this.update_();
|
|
29043
|
+
_this._style = style;
|
|
29044
|
+
style.on("change", function () {
|
|
29045
|
+
_this.onStyleChange();
|
|
29283
29046
|
});
|
|
29284
29047
|
_this._text = "";
|
|
29285
29048
|
_this._textApproved = "";
|
|
@@ -29303,15 +29066,21 @@ var DDynamicText = /** @class */ (function (_super) {
|
|
|
29303
29066
|
};
|
|
29304
29067
|
return _this;
|
|
29305
29068
|
}
|
|
29069
|
+
DDynamicText.prototype.onStyleChange = function () {
|
|
29070
|
+
this._isDirty = true;
|
|
29071
|
+
this._isGeometryDirty = true;
|
|
29072
|
+
this._atlas = null;
|
|
29073
|
+
this.update_();
|
|
29074
|
+
};
|
|
29306
29075
|
DDynamicText.prototype.update_ = function () {
|
|
29307
29076
|
var layer = DApplications.getLayer(this);
|
|
29308
29077
|
if (layer) {
|
|
29309
|
-
var style = this._style;
|
|
29310
29078
|
if (this._isDirty) {
|
|
29311
29079
|
this._isDirty = false;
|
|
29312
29080
|
var text = this._text;
|
|
29313
29081
|
var textApproved = this._textApproved;
|
|
29314
29082
|
this._textApproved = text;
|
|
29083
|
+
var style = this._style;
|
|
29315
29084
|
var fontId = style.fontId;
|
|
29316
29085
|
var fontIdApproved = style.fontIdApproved;
|
|
29317
29086
|
var fontIdFontSize = style.fontIdFontSize;
|
|
@@ -29504,203 +29273,737 @@ var DDynamicText = /** @class */ (function (_super) {
|
|
|
29504
29273
|
* Copyright (C) 2019 Toshiba Corporation
|
|
29505
29274
|
* SPDX-License-Identifier: Apache-2.0
|
|
29506
29275
|
*/
|
|
29507
|
-
var
|
|
29508
|
-
|
|
29509
|
-
|
|
29510
|
-
|
|
29511
|
-
var
|
|
29512
|
-
|
|
29513
|
-
|
|
29514
|
-
|
|
29515
|
-
|
|
29516
|
-
|
|
29517
|
-
|
|
29518
|
-
|
|
29519
|
-
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29527
|
-
|
|
29528
|
-
|
|
29529
|
-
|
|
29530
|
-
|
|
29531
|
-
|
|
29532
|
-
|
|
29276
|
+
var DDynamicTextStyle = /** @class */ (function (_super) {
|
|
29277
|
+
__extends(DDynamicTextStyle, _super);
|
|
29278
|
+
function DDynamicTextStyle(parent, theme, options) {
|
|
29279
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
29280
|
+
var _this = _super.call(this) || this;
|
|
29281
|
+
_this._id = 0;
|
|
29282
|
+
_this._idApproved = -1;
|
|
29283
|
+
if (options) {
|
|
29284
|
+
_this._fontFamily = (_a = options.fontFamily) !== null && _a !== void 0 ? _a : theme.getFontFamilly();
|
|
29285
|
+
_this._fontSize = (_b = options.fontSize) !== null && _b !== void 0 ? _b : theme.getFontSize();
|
|
29286
|
+
_this._fontStyle = (_c = options.fontStyle) !== null && _c !== void 0 ? _c : theme.getFontStyle();
|
|
29287
|
+
_this._fontVariant = (_d = options.fontVariant) !== null && _d !== void 0 ? _d : theme.getFontVariant();
|
|
29288
|
+
_this._fontWeight = (_e = options.fontWeight) !== null && _e !== void 0 ? _e : theme.getFontWeight();
|
|
29289
|
+
_this._clipping = (_f = options.clipping) !== null && _f !== void 0 ? _f : theme.getTextStyleClipping();
|
|
29290
|
+
_this._fitting = (_g = options.fitting) !== null && _g !== void 0 ? _g : theme.getTextStyleFitting();
|
|
29291
|
+
_this._wordWrap = toEnum((_h = options.wordWrap) !== null && _h !== void 0 ? _h : theme.getTextStyleWordWrap(), DDynamicTextStyleWordWrap);
|
|
29292
|
+
_this._lineHeight = (_j = options.lineHeight) !== null && _j !== void 0 ? _j : theme.getLineHeight();
|
|
29293
|
+
}
|
|
29294
|
+
else {
|
|
29295
|
+
_this._fontFamily = theme.getFontFamilly();
|
|
29296
|
+
_this._fontSize = theme.getFontSize();
|
|
29297
|
+
_this._fontStyle = theme.getFontStyle();
|
|
29298
|
+
_this._fontVariant = theme.getFontVariant();
|
|
29299
|
+
_this._fontWeight = theme.getFontWeight();
|
|
29300
|
+
_this._clipping = theme.getTextStyleClipping();
|
|
29301
|
+
_this._fitting = theme.getTextStyleFitting();
|
|
29302
|
+
_this._wordWrap = theme.getTextStyleWordWrap();
|
|
29303
|
+
_this._lineHeight = theme.getLineHeight();
|
|
29304
|
+
}
|
|
29305
|
+
_this._fill = theme.getColor(parent.state);
|
|
29306
|
+
_this._fontSizeFitted = _this._fontSize;
|
|
29307
|
+
_this._lineHeightFitted = _this._lineHeight;
|
|
29308
|
+
_this._isFontFitted = false;
|
|
29309
|
+
_this._fontIdFontSize = _this._fontSize;
|
|
29310
|
+
_this._fontIdId = -1;
|
|
29311
|
+
_this._fontId = "";
|
|
29312
|
+
_this._fontIdApproved = "";
|
|
29313
|
+
_this._fillApproved = 0x000000;
|
|
29314
|
+
return _this;
|
|
29533
29315
|
}
|
|
29534
|
-
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
|
|
29538
|
-
|
|
29539
|
-
|
|
29540
|
-
|
|
29541
|
-
|
|
29542
|
-
|
|
29543
|
-
|
|
29544
|
-
|
|
29545
|
-
|
|
29546
|
-
|
|
29547
|
-
|
|
29548
|
-
|
|
29549
|
-
|
|
29550
|
-
|
|
29551
|
-
|
|
29552
|
-
|
|
29316
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "id", {
|
|
29317
|
+
get: function () {
|
|
29318
|
+
return this._id;
|
|
29319
|
+
},
|
|
29320
|
+
enumerable: false,
|
|
29321
|
+
configurable: true
|
|
29322
|
+
});
|
|
29323
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "idApproved", {
|
|
29324
|
+
get: function () {
|
|
29325
|
+
return this._idApproved;
|
|
29326
|
+
},
|
|
29327
|
+
enumerable: false,
|
|
29328
|
+
configurable: true
|
|
29329
|
+
});
|
|
29330
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontId", {
|
|
29331
|
+
get: function () {
|
|
29332
|
+
this.update();
|
|
29333
|
+
return this._fontId;
|
|
29334
|
+
},
|
|
29335
|
+
enumerable: false,
|
|
29336
|
+
configurable: true
|
|
29337
|
+
});
|
|
29338
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontIdFontSize", {
|
|
29339
|
+
get: function () {
|
|
29340
|
+
this.update();
|
|
29341
|
+
return this._fontSizeFitted;
|
|
29342
|
+
},
|
|
29343
|
+
enumerable: false,
|
|
29344
|
+
configurable: true
|
|
29345
|
+
});
|
|
29346
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontIdApproved", {
|
|
29347
|
+
get: function () {
|
|
29348
|
+
return this._fontIdApproved;
|
|
29349
|
+
},
|
|
29350
|
+
enumerable: false,
|
|
29351
|
+
configurable: true
|
|
29352
|
+
});
|
|
29353
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fill", {
|
|
29354
|
+
get: function () {
|
|
29355
|
+
return this._fill;
|
|
29356
|
+
},
|
|
29357
|
+
set: function (fill) {
|
|
29358
|
+
if (this._fill !== fill) {
|
|
29359
|
+
this._fill = fill;
|
|
29360
|
+
this.onChange();
|
|
29361
|
+
}
|
|
29362
|
+
},
|
|
29363
|
+
enumerable: false,
|
|
29364
|
+
configurable: true
|
|
29365
|
+
});
|
|
29366
|
+
DDynamicTextStyle.prototype.onChange = function () {
|
|
29367
|
+
this._id += 1;
|
|
29368
|
+
this.emit("change", this);
|
|
29553
29369
|
};
|
|
29554
|
-
|
|
29555
|
-
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
function
|
|
29562
|
-
|
|
29563
|
-
|
|
29564
|
-
|
|
29565
|
-
|
|
29566
|
-
_super.prototype.init.call(this, options);
|
|
29567
|
-
var theme = this.theme;
|
|
29568
|
-
this._textValue = (_b = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : theme.newTextValue();
|
|
29569
|
-
this._textValueComputed = this.computeTextValue();
|
|
29570
|
-
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
29571
|
-
this._textColor = text === null || text === void 0 ? void 0 : text.color;
|
|
29572
|
-
this._textAlpha = text === null || text === void 0 ? void 0 : text.alpha;
|
|
29573
|
-
this._textStyle = toTextStyle(theme, options, this.state);
|
|
29574
|
-
this._textAlign = toTextAlign(theme, options);
|
|
29575
|
-
this._textFormatter = (_c = text === null || text === void 0 ? void 0 : text.formatter) !== null && _c !== void 0 ? _c : theme.getTextFormatter();
|
|
29576
|
-
this._isTextVisible = true;
|
|
29577
|
-
this._isOverflowMaskEnabled = (_d = options === null || options === void 0 ? void 0 : options.mask) !== null && _d !== void 0 ? _d : theme.isOverflowMaskEnabled();
|
|
29578
|
-
this.onTextChange();
|
|
29579
|
-
this.createOrUpdateText();
|
|
29370
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fillApproved", {
|
|
29371
|
+
get: function () {
|
|
29372
|
+
return this._fillApproved;
|
|
29373
|
+
},
|
|
29374
|
+
enumerable: false,
|
|
29375
|
+
configurable: true
|
|
29376
|
+
});
|
|
29377
|
+
DDynamicTextStyle.prototype.approve = function () {
|
|
29378
|
+
this.update();
|
|
29379
|
+
this._idApproved = this._id;
|
|
29380
|
+
this._fontIdApproved = this._fontId;
|
|
29381
|
+
this._fillApproved = this._fill;
|
|
29580
29382
|
};
|
|
29581
|
-
Object.defineProperty(
|
|
29383
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontFamily", {
|
|
29582
29384
|
get: function () {
|
|
29583
|
-
return this.
|
|
29385
|
+
return this._fontFamily;
|
|
29584
29386
|
},
|
|
29585
|
-
set: function (
|
|
29586
|
-
if (this.
|
|
29587
|
-
this.
|
|
29588
|
-
this.
|
|
29387
|
+
set: function (fontFamily) {
|
|
29388
|
+
if (this._fontFamily !== fontFamily) {
|
|
29389
|
+
this._fontFamily = fontFamily;
|
|
29390
|
+
this.onChange();
|
|
29589
29391
|
}
|
|
29590
29392
|
},
|
|
29591
29393
|
enumerable: false,
|
|
29592
29394
|
configurable: true
|
|
29593
29395
|
});
|
|
29594
|
-
|
|
29595
|
-
|
|
29396
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontSize", {
|
|
29397
|
+
get: function () {
|
|
29398
|
+
return this._fontSize;
|
|
29399
|
+
},
|
|
29400
|
+
set: function (fontSize) {
|
|
29401
|
+
if (this._fontSize !== fontSize) {
|
|
29402
|
+
this._fontSize = fontSize;
|
|
29403
|
+
this._fontSizeFitted = fontSize;
|
|
29404
|
+
this._lineHeightFitted = this._lineHeight;
|
|
29405
|
+
this._isFontFitted = false;
|
|
29406
|
+
this.onChange();
|
|
29407
|
+
}
|
|
29408
|
+
},
|
|
29409
|
+
enumerable: false,
|
|
29410
|
+
configurable: true
|
|
29411
|
+
});
|
|
29412
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontSizeFitted", {
|
|
29413
|
+
get: function () {
|
|
29414
|
+
return this._fontSizeFitted;
|
|
29415
|
+
},
|
|
29416
|
+
enumerable: false,
|
|
29417
|
+
configurable: true
|
|
29418
|
+
});
|
|
29419
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "isFontFitted", {
|
|
29420
|
+
get: function () {
|
|
29421
|
+
return this._isFontFitted;
|
|
29422
|
+
},
|
|
29423
|
+
enumerable: false,
|
|
29424
|
+
configurable: true
|
|
29425
|
+
});
|
|
29426
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontStyle", {
|
|
29427
|
+
get: function () {
|
|
29428
|
+
return this._fontStyle;
|
|
29429
|
+
},
|
|
29430
|
+
set: function (fontStyle) {
|
|
29431
|
+
if (this._fontStyle !== fontStyle) {
|
|
29432
|
+
this._fontStyle = fontStyle;
|
|
29433
|
+
this.onChange();
|
|
29434
|
+
}
|
|
29435
|
+
},
|
|
29436
|
+
enumerable: false,
|
|
29437
|
+
configurable: true
|
|
29438
|
+
});
|
|
29439
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontVariant", {
|
|
29440
|
+
get: function () {
|
|
29441
|
+
return this._fontVariant;
|
|
29442
|
+
},
|
|
29443
|
+
set: function (fontVariant) {
|
|
29444
|
+
if (this._fontVariant !== fontVariant) {
|
|
29445
|
+
this._fontVariant = fontVariant;
|
|
29446
|
+
this.onChange();
|
|
29447
|
+
}
|
|
29448
|
+
},
|
|
29449
|
+
enumerable: false,
|
|
29450
|
+
configurable: true
|
|
29451
|
+
});
|
|
29452
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fontWeight", {
|
|
29453
|
+
get: function () {
|
|
29454
|
+
return this._fontWeight;
|
|
29455
|
+
},
|
|
29456
|
+
set: function (fontWeight) {
|
|
29457
|
+
if (this._fontWeight !== fontWeight) {
|
|
29458
|
+
this._fontWeight = fontWeight;
|
|
29459
|
+
this.onChange();
|
|
29460
|
+
}
|
|
29461
|
+
},
|
|
29462
|
+
enumerable: false,
|
|
29463
|
+
configurable: true
|
|
29464
|
+
});
|
|
29465
|
+
DDynamicTextStyle.prototype.update = function () {
|
|
29466
|
+
if (this._fontIdId !== this._id) {
|
|
29467
|
+
this._fontIdId = this._id;
|
|
29468
|
+
var fontIdFontSize = this._fitting ? this._fontSizeFitted : this._fontSize;
|
|
29469
|
+
this._fontIdFontSize = fontIdFontSize;
|
|
29470
|
+
this._fontId = this.toFontId(fontIdFontSize);
|
|
29471
|
+
}
|
|
29596
29472
|
};
|
|
29597
|
-
|
|
29598
|
-
|
|
29599
|
-
|
|
29600
|
-
|
|
29601
|
-
|
|
29602
|
-
|
|
29603
|
-
|
|
29604
|
-
|
|
29473
|
+
DDynamicTextStyle.prototype.toFontId = function (fontSize) {
|
|
29474
|
+
return "".concat(this._fontStyle, " ").concat(this._fontVariant, " ").concat(this._fontWeight, " ").concat(fontSize, "px ").concat(this._fontFamily);
|
|
29475
|
+
};
|
|
29476
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "clipping", {
|
|
29477
|
+
get: function () {
|
|
29478
|
+
return this._clipping;
|
|
29479
|
+
},
|
|
29480
|
+
set: function (clipping) {
|
|
29481
|
+
if (this._clipping !== clipping) {
|
|
29482
|
+
this._clipping = clipping;
|
|
29483
|
+
this.onChange();
|
|
29605
29484
|
}
|
|
29606
|
-
|
|
29607
|
-
|
|
29485
|
+
},
|
|
29486
|
+
enumerable: false,
|
|
29487
|
+
configurable: true
|
|
29488
|
+
});
|
|
29489
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "fitting", {
|
|
29490
|
+
get: function () {
|
|
29491
|
+
return this._fitting;
|
|
29492
|
+
},
|
|
29493
|
+
set: function (fitting) {
|
|
29494
|
+
if (this._fitting !== fitting) {
|
|
29495
|
+
this._fitting = fitting;
|
|
29496
|
+
this.onChange();
|
|
29497
|
+
}
|
|
29498
|
+
},
|
|
29499
|
+
enumerable: false,
|
|
29500
|
+
configurable: true
|
|
29501
|
+
});
|
|
29502
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "wordWrap", {
|
|
29503
|
+
get: function () {
|
|
29504
|
+
return this._wordWrap;
|
|
29505
|
+
},
|
|
29506
|
+
set: function (wordWrap) {
|
|
29507
|
+
if (this._wordWrap !== wordWrap) {
|
|
29508
|
+
this._wordWrap = wordWrap;
|
|
29509
|
+
this.onChange();
|
|
29510
|
+
}
|
|
29511
|
+
},
|
|
29512
|
+
enumerable: false,
|
|
29513
|
+
configurable: true
|
|
29514
|
+
});
|
|
29515
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "lineHeight", {
|
|
29516
|
+
get: function () {
|
|
29517
|
+
return this._lineHeight;
|
|
29518
|
+
},
|
|
29519
|
+
set: function (lineHeight) {
|
|
29520
|
+
if (this._lineHeight !== lineHeight) {
|
|
29521
|
+
this._lineHeight = lineHeight;
|
|
29522
|
+
this._fontSizeFitted = this._fontSize;
|
|
29523
|
+
this._lineHeightFitted = lineHeight;
|
|
29524
|
+
this._isFontFitted = false;
|
|
29525
|
+
this.onChange();
|
|
29526
|
+
}
|
|
29527
|
+
},
|
|
29528
|
+
enumerable: false,
|
|
29529
|
+
configurable: true
|
|
29530
|
+
});
|
|
29531
|
+
Object.defineProperty(DDynamicTextStyle.prototype, "lineHeightFitted", {
|
|
29532
|
+
get: function () {
|
|
29533
|
+
return this._lineHeightFitted;
|
|
29534
|
+
},
|
|
29535
|
+
set: function (lineHeightFitted) {
|
|
29536
|
+
if (this._lineHeightFitted !== lineHeightFitted) {
|
|
29537
|
+
this._lineHeightFitted = lineHeightFitted;
|
|
29538
|
+
this.onChange();
|
|
29608
29539
|
}
|
|
29540
|
+
},
|
|
29541
|
+
enumerable: false,
|
|
29542
|
+
configurable: true
|
|
29543
|
+
});
|
|
29544
|
+
DDynamicTextStyle.prototype.fit = function (fontSize, lineHeight) {
|
|
29545
|
+
var isChanged = false;
|
|
29546
|
+
if (fontSize < this._fontSizeFitted) {
|
|
29547
|
+
this._fontSizeFitted = fontSize;
|
|
29548
|
+
isChanged = true;
|
|
29549
|
+
}
|
|
29550
|
+
if (this._lineHeightFitted !== lineHeight) {
|
|
29551
|
+
this._lineHeightFitted = lineHeight;
|
|
29552
|
+
isChanged = true;
|
|
29553
|
+
}
|
|
29554
|
+
if (this._isFontFitted !== true) {
|
|
29555
|
+
this._isFontFitted = true;
|
|
29556
|
+
isChanged = true;
|
|
29557
|
+
}
|
|
29558
|
+
if (isChanged) {
|
|
29559
|
+
this.onChange();
|
|
29609
29560
|
}
|
|
29610
|
-
return
|
|
29561
|
+
return isChanged;
|
|
29611
29562
|
};
|
|
29612
|
-
|
|
29613
|
-
var
|
|
29614
|
-
if (
|
|
29615
|
-
|
|
29616
|
-
|
|
29617
|
-
|
|
29618
|
-
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
|
|
29625
|
-
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
29563
|
+
DDynamicTextStyle.prototype.unfit = function () {
|
|
29564
|
+
var isChanged = false;
|
|
29565
|
+
if (this._isFontFitted !== false) {
|
|
29566
|
+
this._isFontFitted = false;
|
|
29567
|
+
isChanged = true;
|
|
29568
|
+
}
|
|
29569
|
+
if (this._fontSizeFitted !== this._fontSize) {
|
|
29570
|
+
this._fontSizeFitted = this._fontSize;
|
|
29571
|
+
isChanged = true;
|
|
29572
|
+
}
|
|
29573
|
+
if (this._lineHeightFitted !== this._lineHeight) {
|
|
29574
|
+
this._lineHeightFitted = this._lineHeight;
|
|
29575
|
+
isChanged = true;
|
|
29576
|
+
}
|
|
29577
|
+
if (isChanged) {
|
|
29578
|
+
this.onChange();
|
|
29579
|
+
}
|
|
29580
|
+
return isChanged;
|
|
29581
|
+
};
|
|
29582
|
+
return DDynamicTextStyle;
|
|
29583
|
+
}(pixi_js.utils.EventEmitter));
|
|
29584
|
+
|
|
29585
|
+
var DTextPieceAlignImpl = /** @class */ (function () {
|
|
29586
|
+
function DTextPieceAlignImpl(parent, theme, options) {
|
|
29587
|
+
var _a, _b;
|
|
29588
|
+
this._parent = parent;
|
|
29589
|
+
this._vertical = toEnum((_a = options === null || options === void 0 ? void 0 : options.vertical) !== null && _a !== void 0 ? _a : theme.getTextAlignVertical(), DAlignVertical);
|
|
29590
|
+
this._horizontal = toEnum((_b = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _b !== void 0 ? _b : theme.getTextAlignHorizontal(), DAlignHorizontal);
|
|
29591
|
+
}
|
|
29592
|
+
Object.defineProperty(DTextPieceAlignImpl.prototype, "vertical", {
|
|
29593
|
+
get: function () {
|
|
29594
|
+
return this._vertical;
|
|
29595
|
+
},
|
|
29596
|
+
set: function (vertical) {
|
|
29597
|
+
vertical = toEnum(vertical, DAlignVertical);
|
|
29598
|
+
if (this._vertical !== vertical) {
|
|
29599
|
+
this._vertical = vertical;
|
|
29600
|
+
this.onChange();
|
|
29632
29601
|
}
|
|
29633
|
-
|
|
29634
|
-
|
|
29635
|
-
|
|
29636
|
-
|
|
29602
|
+
},
|
|
29603
|
+
enumerable: false,
|
|
29604
|
+
configurable: true
|
|
29605
|
+
});
|
|
29606
|
+
Object.defineProperty(DTextPieceAlignImpl.prototype, "horizontal", {
|
|
29607
|
+
get: function () {
|
|
29608
|
+
return this._horizontal;
|
|
29609
|
+
},
|
|
29610
|
+
set: function (horizontal) {
|
|
29611
|
+
horizontal = toEnum(horizontal, DAlignHorizontal);
|
|
29612
|
+
if (this._horizontal !== horizontal) {
|
|
29613
|
+
this._horizontal = horizontal;
|
|
29614
|
+
this.onChange();
|
|
29615
|
+
}
|
|
29616
|
+
},
|
|
29617
|
+
enumerable: false,
|
|
29618
|
+
configurable: true
|
|
29619
|
+
});
|
|
29620
|
+
DTextPieceAlignImpl.prototype.set = function (vertical, horizontal) {
|
|
29621
|
+
var isChanged = false;
|
|
29622
|
+
if (vertical != null) {
|
|
29623
|
+
vertical = toEnum(vertical, DAlignVertical);
|
|
29624
|
+
if (this._vertical !== vertical) {
|
|
29625
|
+
this._vertical = vertical;
|
|
29626
|
+
isChanged = true;
|
|
29637
29627
|
}
|
|
29638
29628
|
}
|
|
29639
|
-
|
|
29640
|
-
|
|
29641
|
-
if (
|
|
29642
|
-
|
|
29643
|
-
|
|
29644
|
-
DApplications.update(this);
|
|
29629
|
+
if (horizontal != null) {
|
|
29630
|
+
horizontal = toEnum(horizontal, DAlignHorizontal);
|
|
29631
|
+
if (this._horizontal !== horizontal) {
|
|
29632
|
+
this._horizontal = horizontal;
|
|
29633
|
+
isChanged = true;
|
|
29645
29634
|
}
|
|
29646
29635
|
}
|
|
29636
|
+
if (isChanged) {
|
|
29637
|
+
this.onChange();
|
|
29638
|
+
}
|
|
29639
|
+
return this;
|
|
29647
29640
|
};
|
|
29648
|
-
|
|
29649
|
-
|
|
29641
|
+
DTextPieceAlignImpl.prototype.onChange = function () {
|
|
29642
|
+
var parent = this._parent;
|
|
29643
|
+
parent.toDirty();
|
|
29644
|
+
DApplications.update(parent);
|
|
29650
29645
|
};
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29646
|
+
return DTextPieceAlignImpl;
|
|
29647
|
+
}());
|
|
29648
|
+
|
|
29649
|
+
/*
|
|
29650
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
29651
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
29652
|
+
*/
|
|
29653
|
+
var DTextPieceStyleImpl = /** @class */ (function () {
|
|
29654
|
+
function DTextPieceStyleImpl(parent, style) {
|
|
29655
|
+
this._parent = parent;
|
|
29656
|
+
this._style = style;
|
|
29657
|
+
}
|
|
29658
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "fontFamily", {
|
|
29659
|
+
get: function () {
|
|
29660
|
+
return this._style.fontFamily;
|
|
29661
|
+
},
|
|
29662
|
+
set: function (fontFamily) {
|
|
29663
|
+
var style = this._style;
|
|
29664
|
+
if (style.fontFamily !== fontFamily) {
|
|
29665
|
+
style.fontFamily = fontFamily;
|
|
29666
|
+
this.onChange();
|
|
29657
29667
|
}
|
|
29658
|
-
|
|
29668
|
+
},
|
|
29669
|
+
enumerable: false,
|
|
29670
|
+
configurable: true
|
|
29671
|
+
});
|
|
29672
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "fontSize", {
|
|
29673
|
+
get: function () {
|
|
29674
|
+
return this._style.fontSize;
|
|
29675
|
+
},
|
|
29676
|
+
set: function (fontSize) {
|
|
29677
|
+
var style = this._style;
|
|
29678
|
+
if (style.fontSize !== fontSize) {
|
|
29679
|
+
style.fontSize = fontSize;
|
|
29680
|
+
this.onChange();
|
|
29681
|
+
}
|
|
29682
|
+
},
|
|
29683
|
+
enumerable: false,
|
|
29684
|
+
configurable: true
|
|
29685
|
+
});
|
|
29686
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "fontStyle", {
|
|
29687
|
+
get: function () {
|
|
29688
|
+
return this._style.fontStyle;
|
|
29689
|
+
},
|
|
29690
|
+
set: function (fontStyle) {
|
|
29691
|
+
var style = this._style;
|
|
29692
|
+
if (style.fontStyle !== fontStyle) {
|
|
29693
|
+
style.fontStyle = fontStyle;
|
|
29694
|
+
this.onChange();
|
|
29695
|
+
}
|
|
29696
|
+
},
|
|
29697
|
+
enumerable: false,
|
|
29698
|
+
configurable: true
|
|
29699
|
+
});
|
|
29700
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "fontVariant", {
|
|
29701
|
+
get: function () {
|
|
29702
|
+
return this._style.fontVariant;
|
|
29703
|
+
},
|
|
29704
|
+
set: function (fontVariant) {
|
|
29705
|
+
var style = this._style;
|
|
29706
|
+
if (style.fontVariant !== fontVariant) {
|
|
29707
|
+
style.fontVariant = fontVariant;
|
|
29708
|
+
this.onChange();
|
|
29709
|
+
}
|
|
29710
|
+
},
|
|
29711
|
+
enumerable: false,
|
|
29712
|
+
configurable: true
|
|
29713
|
+
});
|
|
29714
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "fontWeight", {
|
|
29715
|
+
get: function () {
|
|
29716
|
+
return this._style.fontWeight;
|
|
29717
|
+
},
|
|
29718
|
+
set: function (fontWeight) {
|
|
29719
|
+
var style = this._style;
|
|
29720
|
+
if (style.fontWeight !== fontWeight) {
|
|
29721
|
+
style.fontWeight = fontWeight;
|
|
29722
|
+
this.onChange();
|
|
29723
|
+
}
|
|
29724
|
+
},
|
|
29725
|
+
enumerable: false,
|
|
29726
|
+
configurable: true
|
|
29727
|
+
});
|
|
29728
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "clipping", {
|
|
29729
|
+
get: function () {
|
|
29730
|
+
return this._style.clipping;
|
|
29731
|
+
},
|
|
29732
|
+
set: function (clipping) {
|
|
29733
|
+
var style = this._style;
|
|
29734
|
+
if (style.clipping !== clipping) {
|
|
29735
|
+
style.clipping = clipping;
|
|
29736
|
+
this.onChange();
|
|
29737
|
+
}
|
|
29738
|
+
},
|
|
29739
|
+
enumerable: false,
|
|
29740
|
+
configurable: true
|
|
29741
|
+
});
|
|
29742
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "fitting", {
|
|
29743
|
+
get: function () {
|
|
29744
|
+
return this._style.fitting;
|
|
29745
|
+
},
|
|
29746
|
+
set: function (fitting) {
|
|
29747
|
+
var style = this._style;
|
|
29748
|
+
if (style.fitting !== fitting) {
|
|
29749
|
+
style.fitting = fitting;
|
|
29750
|
+
this.onChange();
|
|
29751
|
+
}
|
|
29752
|
+
},
|
|
29753
|
+
enumerable: false,
|
|
29754
|
+
configurable: true
|
|
29755
|
+
});
|
|
29756
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "wordWrap", {
|
|
29757
|
+
get: function () {
|
|
29758
|
+
return this._style.wordWrap;
|
|
29759
|
+
},
|
|
29760
|
+
set: function (wordWrap) {
|
|
29761
|
+
wordWrap = toEnum(wordWrap, DDynamicTextStyleWordWrap);
|
|
29762
|
+
var style = this._style;
|
|
29763
|
+
if (style.wordWrap !== wordWrap) {
|
|
29764
|
+
style.wordWrap = wordWrap;
|
|
29765
|
+
this.onChange();
|
|
29766
|
+
}
|
|
29767
|
+
},
|
|
29768
|
+
enumerable: false,
|
|
29769
|
+
configurable: true
|
|
29770
|
+
});
|
|
29771
|
+
Object.defineProperty(DTextPieceStyleImpl.prototype, "lineHeight", {
|
|
29772
|
+
get: function () {
|
|
29773
|
+
return this._style.lineHeight;
|
|
29774
|
+
},
|
|
29775
|
+
set: function (lineHeight) {
|
|
29776
|
+
var style = this._style;
|
|
29777
|
+
if (style.lineHeight !== lineHeight) {
|
|
29778
|
+
style.lineHeight = lineHeight;
|
|
29779
|
+
this.onChange();
|
|
29780
|
+
}
|
|
29781
|
+
},
|
|
29782
|
+
enumerable: false,
|
|
29783
|
+
configurable: true
|
|
29784
|
+
});
|
|
29785
|
+
DTextPieceStyleImpl.prototype.onChange = function () {
|
|
29786
|
+
DApplications.update(this._parent);
|
|
29787
|
+
};
|
|
29788
|
+
return DTextPieceStyleImpl;
|
|
29789
|
+
}());
|
|
29790
|
+
|
|
29791
|
+
var DTextPieceImpl = /** @class */ (function (_super) {
|
|
29792
|
+
__extends(DTextPieceImpl, _super);
|
|
29793
|
+
function DTextPieceImpl(parent, theme, options) {
|
|
29794
|
+
var _a, _b;
|
|
29795
|
+
var _this = _super.call(this) || this;
|
|
29796
|
+
_this._parent = parent;
|
|
29797
|
+
_this._theme = theme;
|
|
29798
|
+
_this._value = (_a = options === null || options === void 0 ? void 0 : options.value) !== null && _a !== void 0 ? _a : theme.newTextValue();
|
|
29799
|
+
_this._computed = _this.newComputed();
|
|
29800
|
+
_this._color = options === null || options === void 0 ? void 0 : options.color;
|
|
29801
|
+
_this._alpha = options === null || options === void 0 ? void 0 : options.alpha;
|
|
29802
|
+
var dstyle = new DDynamicTextStyle(parent, theme, options === null || options === void 0 ? void 0 : options.style);
|
|
29803
|
+
_this._dstyle = dstyle;
|
|
29804
|
+
_this._style = new DTextPieceStyleImpl(parent, dstyle);
|
|
29805
|
+
_this._align = new DTextPieceAlignImpl(parent, theme, options === null || options === void 0 ? void 0 : options.align);
|
|
29806
|
+
_this._formatter = (_b = options === null || options === void 0 ? void 0 : options.formatter) !== null && _b !== void 0 ? _b : theme.getTextFormatter();
|
|
29807
|
+
_this._isVisible = true;
|
|
29808
|
+
_this.onComputedChange();
|
|
29809
|
+
if (_this.updateObject()) {
|
|
29810
|
+
parent.toDirty();
|
|
29811
|
+
DApplications.update(parent);
|
|
29659
29812
|
}
|
|
29660
|
-
return
|
|
29813
|
+
return _this;
|
|
29814
|
+
}
|
|
29815
|
+
Object.defineProperty(DTextPieceImpl.prototype, "value", {
|
|
29816
|
+
get: function () {
|
|
29817
|
+
return this._value;
|
|
29818
|
+
},
|
|
29819
|
+
set: function (value) {
|
|
29820
|
+
if (this._value !== value) {
|
|
29821
|
+
this._value = value;
|
|
29822
|
+
this.onValueChange();
|
|
29823
|
+
}
|
|
29824
|
+
},
|
|
29825
|
+
enumerable: false,
|
|
29826
|
+
configurable: true
|
|
29827
|
+
});
|
|
29828
|
+
DTextPieceImpl.prototype.getValue = function () {
|
|
29829
|
+
return this._value;
|
|
29661
29830
|
};
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
var textX = 0;
|
|
29667
|
-
var pleft = padding.getLeft();
|
|
29668
|
-
var alignHorizontal = align.horizontal;
|
|
29669
|
-
if (auto.width.isOn || alignHorizontal === DAlignHorizontal.LEFT) {
|
|
29670
|
-
textX = pleft;
|
|
29831
|
+
DTextPieceImpl.prototype.setValue = function (value, forcibly) {
|
|
29832
|
+
if (forcibly || this._value !== value) {
|
|
29833
|
+
this._value = value;
|
|
29834
|
+
this.onValueChange(forcibly);
|
|
29671
29835
|
}
|
|
29672
|
-
|
|
29673
|
-
|
|
29674
|
-
|
|
29675
|
-
|
|
29676
|
-
|
|
29677
|
-
|
|
29836
|
+
};
|
|
29837
|
+
DTextPieceImpl.prototype.onValueChange = function (forcibly) {
|
|
29838
|
+
var newComputed = this.newComputed();
|
|
29839
|
+
if (forcibly || this._computed !== newComputed) {
|
|
29840
|
+
this._computed = newComputed;
|
|
29841
|
+
this.onComputedChange();
|
|
29842
|
+
if (this.updateObject()) {
|
|
29843
|
+
var parent_1 = this._parent;
|
|
29844
|
+
parent_1.toDirty();
|
|
29845
|
+
DApplications.update(parent_1);
|
|
29678
29846
|
}
|
|
29679
|
-
|
|
29680
|
-
|
|
29847
|
+
}
|
|
29848
|
+
};
|
|
29849
|
+
DTextPieceImpl.prototype.compute = function (forcibly) {
|
|
29850
|
+
this.onValueChange(forcibly);
|
|
29851
|
+
};
|
|
29852
|
+
Object.defineProperty(DTextPieceImpl.prototype, "computed", {
|
|
29853
|
+
get: function () {
|
|
29854
|
+
return this._computed;
|
|
29855
|
+
},
|
|
29856
|
+
enumerable: false,
|
|
29857
|
+
configurable: true
|
|
29858
|
+
});
|
|
29859
|
+
Object.defineProperty(DTextPieceImpl.prototype, "formatter", {
|
|
29860
|
+
get: function () {
|
|
29861
|
+
return this._formatter;
|
|
29862
|
+
},
|
|
29863
|
+
set: function (formatter) {
|
|
29864
|
+
if (this._formatter !== formatter) {
|
|
29865
|
+
this._formatter = formatter;
|
|
29866
|
+
this.onValueChange(true);
|
|
29867
|
+
}
|
|
29868
|
+
},
|
|
29869
|
+
enumerable: false,
|
|
29870
|
+
configurable: true
|
|
29871
|
+
});
|
|
29872
|
+
Object.defineProperty(DTextPieceImpl.prototype, "color", {
|
|
29873
|
+
get: function () {
|
|
29874
|
+
return this._color;
|
|
29875
|
+
},
|
|
29876
|
+
set: function (color) {
|
|
29877
|
+
if (this._color !== color) {
|
|
29878
|
+
this._color = color;
|
|
29879
|
+
this.onColorChange();
|
|
29880
|
+
}
|
|
29881
|
+
},
|
|
29882
|
+
enumerable: false,
|
|
29883
|
+
configurable: true
|
|
29884
|
+
});
|
|
29885
|
+
Object.defineProperty(DTextPieceImpl.prototype, "alpha", {
|
|
29886
|
+
get: function () {
|
|
29887
|
+
return this._alpha;
|
|
29888
|
+
},
|
|
29889
|
+
set: function (alpha) {
|
|
29890
|
+
if (this._alpha !== alpha) {
|
|
29891
|
+
this._alpha = alpha;
|
|
29892
|
+
this.onColorChange();
|
|
29893
|
+
}
|
|
29894
|
+
},
|
|
29895
|
+
enumerable: false,
|
|
29896
|
+
configurable: true
|
|
29897
|
+
});
|
|
29898
|
+
DTextPieceImpl.prototype.onColorChange = function () {
|
|
29899
|
+
var object = this._object;
|
|
29900
|
+
if (object != null) {
|
|
29901
|
+
var parent_2 = this._parent;
|
|
29902
|
+
var state = parent_2.state;
|
|
29903
|
+
var color = this.newColor(state);
|
|
29904
|
+
var alpha = this.newAlpha(state);
|
|
29905
|
+
var style = object.style;
|
|
29906
|
+
if (style.fill !== color || object.alpha !== alpha) {
|
|
29907
|
+
style.fill = color;
|
|
29908
|
+
object.alpha = alpha;
|
|
29909
|
+
DApplications.update(parent_2);
|
|
29681
29910
|
}
|
|
29682
29911
|
}
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29912
|
+
};
|
|
29913
|
+
Object.defineProperty(DTextPieceImpl.prototype, "align", {
|
|
29914
|
+
get: function () {
|
|
29915
|
+
return this._align;
|
|
29916
|
+
},
|
|
29917
|
+
enumerable: false,
|
|
29918
|
+
configurable: true
|
|
29919
|
+
});
|
|
29920
|
+
Object.defineProperty(DTextPieceImpl.prototype, "style", {
|
|
29921
|
+
get: function () {
|
|
29922
|
+
return this._style;
|
|
29923
|
+
},
|
|
29924
|
+
enumerable: false,
|
|
29925
|
+
configurable: true
|
|
29926
|
+
});
|
|
29927
|
+
Object.defineProperty(DTextPieceImpl.prototype, "object", {
|
|
29928
|
+
get: function () {
|
|
29929
|
+
return this._object;
|
|
29930
|
+
},
|
|
29931
|
+
enumerable: false,
|
|
29932
|
+
configurable: true
|
|
29933
|
+
});
|
|
29934
|
+
DTextPieceImpl.prototype.update = function (layouter) {
|
|
29935
|
+
// Compute a value
|
|
29936
|
+
var newComputed = this.newComputed();
|
|
29937
|
+
if (this._computed !== newComputed) {
|
|
29938
|
+
this._computed = newComputed;
|
|
29939
|
+
this.onComputedChange();
|
|
29940
|
+
this.updateObject();
|
|
29941
|
+
}
|
|
29942
|
+
var object = this._object;
|
|
29943
|
+
if (object != null) {
|
|
29944
|
+
// Update the color
|
|
29945
|
+
var state = this._parent.state;
|
|
29946
|
+
object.style.fill = this.newColor(state);
|
|
29947
|
+
object.alpha = this.newAlpha(state);
|
|
29948
|
+
// Layout
|
|
29949
|
+
layouter.set(object);
|
|
29950
|
+
}
|
|
29951
|
+
else {
|
|
29952
|
+
// Layout
|
|
29953
|
+
layouter.set(null);
|
|
29954
|
+
}
|
|
29955
|
+
};
|
|
29956
|
+
DTextPieceImpl.prototype.updateObject = function () {
|
|
29957
|
+
var computed = this._computed;
|
|
29958
|
+
if (computed !== undefined) {
|
|
29959
|
+
var formatted = this._formatter(computed, this);
|
|
29960
|
+
var object = this._object;
|
|
29961
|
+
if (object == null) {
|
|
29962
|
+
if (0 < formatted.length) {
|
|
29963
|
+
var newObject = this.newObject();
|
|
29964
|
+
newObject.visible = this._isVisible;
|
|
29965
|
+
this._object = newObject;
|
|
29966
|
+
var parent_3 = this._parent;
|
|
29967
|
+
parent_3.addChild(newObject);
|
|
29968
|
+
var overflowMask = parent_3.getOverflowMask();
|
|
29969
|
+
if (overflowMask) {
|
|
29970
|
+
newObject.mask = overflowMask;
|
|
29971
|
+
}
|
|
29972
|
+
newObject.text = formatted;
|
|
29973
|
+
return true;
|
|
29974
|
+
}
|
|
29975
|
+
}
|
|
29976
|
+
else if (object.text !== formatted) {
|
|
29977
|
+
object.text = formatted;
|
|
29978
|
+
return true;
|
|
29979
|
+
}
|
|
29688
29980
|
}
|
|
29689
29981
|
else {
|
|
29690
|
-
var
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
|
|
29982
|
+
var object = this._object;
|
|
29983
|
+
if (object != null && object.text !== "") {
|
|
29984
|
+
object.text = "";
|
|
29985
|
+
return true;
|
|
29986
|
+
}
|
|
29987
|
+
}
|
|
29988
|
+
return false;
|
|
29989
|
+
};
|
|
29990
|
+
DTextPieceImpl.prototype.newComputed = function () {
|
|
29991
|
+
var value = this._value;
|
|
29992
|
+
if (value !== undefined) {
|
|
29993
|
+
if (isFunction(value)) {
|
|
29994
|
+
var result = value(this._parent.state);
|
|
29995
|
+
if (result !== undefined) {
|
|
29996
|
+
return result;
|
|
29997
|
+
}
|
|
29695
29998
|
}
|
|
29696
29999
|
else {
|
|
29697
|
-
|
|
30000
|
+
return value;
|
|
29698
30001
|
}
|
|
29699
30002
|
}
|
|
29700
|
-
|
|
30003
|
+
return this._theme.getTextValue(this._parent.state);
|
|
29701
30004
|
};
|
|
29702
|
-
|
|
29703
|
-
var color = this.
|
|
30005
|
+
DTextPieceImpl.prototype.newColor = function (state) {
|
|
30006
|
+
var color = this._color;
|
|
29704
30007
|
if (color !== undefined) {
|
|
29705
30008
|
if (isFunction(color)) {
|
|
29706
30009
|
var result = color(state);
|
|
@@ -29712,10 +30015,10 @@ var DTextBase = /** @class */ (function (_super) {
|
|
|
29712
30015
|
return color;
|
|
29713
30016
|
}
|
|
29714
30017
|
}
|
|
29715
|
-
return
|
|
30018
|
+
return this._theme.getColor(state);
|
|
29716
30019
|
};
|
|
29717
|
-
|
|
29718
|
-
var alpha = this.
|
|
30020
|
+
DTextPieceImpl.prototype.newAlpha = function (state) {
|
|
30021
|
+
var alpha = this._alpha;
|
|
29719
30022
|
if (alpha !== undefined) {
|
|
29720
30023
|
if (isFunction(alpha)) {
|
|
29721
30024
|
var result = alpha(state);
|
|
@@ -29727,57 +30030,144 @@ var DTextBase = /** @class */ (function (_super) {
|
|
|
29727
30030
|
return alpha;
|
|
29728
30031
|
}
|
|
29729
30032
|
}
|
|
29730
|
-
return
|
|
30033
|
+
return this._theme.getAlpha(state);
|
|
29731
30034
|
};
|
|
29732
|
-
|
|
29733
|
-
|
|
29734
|
-
var state = this.state;
|
|
29735
|
-
text.style.fill = this.getTextColor(theme, state);
|
|
29736
|
-
text.alpha = this.getTextAlpha(theme, state);
|
|
30035
|
+
DTextPieceImpl.prototype.newObject = function () {
|
|
30036
|
+
return new DDynamicText(this._dstyle);
|
|
29737
30037
|
};
|
|
29738
|
-
|
|
29739
|
-
|
|
29740
|
-
|
|
29741
|
-
|
|
29742
|
-
|
|
29743
|
-
|
|
29744
|
-
|
|
30038
|
+
Object.defineProperty(DTextPieceImpl.prototype, "visible", {
|
|
30039
|
+
get: function () {
|
|
30040
|
+
var object = this._object;
|
|
30041
|
+
if (object != null) {
|
|
30042
|
+
return object.visible;
|
|
30043
|
+
}
|
|
30044
|
+
return this._isVisible;
|
|
30045
|
+
},
|
|
30046
|
+
set: function (visible) {
|
|
30047
|
+
var object = this._object;
|
|
30048
|
+
if (object != null) {
|
|
30049
|
+
object.visible = visible;
|
|
30050
|
+
}
|
|
30051
|
+
this._isVisible = visible;
|
|
30052
|
+
},
|
|
30053
|
+
enumerable: false,
|
|
30054
|
+
configurable: true
|
|
30055
|
+
});
|
|
30056
|
+
DTextPieceImpl.prototype.show = function () {
|
|
30057
|
+
this.visible = true;
|
|
30058
|
+
return this;
|
|
29745
30059
|
};
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
30060
|
+
DTextPieceImpl.prototype.hide = function () {
|
|
30061
|
+
this.visible = false;
|
|
30062
|
+
return this;
|
|
30063
|
+
};
|
|
30064
|
+
DTextPieceImpl.prototype.isShown = function () {
|
|
30065
|
+
return this.visible;
|
|
30066
|
+
};
|
|
30067
|
+
DTextPieceImpl.prototype.onComputedChange = function () {
|
|
30068
|
+
this.emit("change", this);
|
|
30069
|
+
};
|
|
30070
|
+
DTextPieceImpl.prototype.destroy = function () {
|
|
30071
|
+
var object = this._object;
|
|
30072
|
+
if (object) {
|
|
30073
|
+
this._object = undefined;
|
|
30074
|
+
object.destroy();
|
|
29752
30075
|
}
|
|
30076
|
+
return this;
|
|
29753
30077
|
};
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
|
|
29757
|
-
|
|
30078
|
+
return DTextPieceImpl;
|
|
30079
|
+
}(pixi_js.utils.EventEmitter));
|
|
30080
|
+
|
|
30081
|
+
/*
|
|
30082
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
30083
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
30084
|
+
*/
|
|
30085
|
+
/**
|
|
30086
|
+
* A base class for UI classes with a text support.
|
|
30087
|
+
* See {@link DTextBaseEvents} for event defaults.
|
|
30088
|
+
*/
|
|
30089
|
+
var DTextBase = /** @class */ (function (_super) {
|
|
30090
|
+
__extends(DTextBase, _super);
|
|
30091
|
+
function DTextBase() {
|
|
30092
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30093
|
+
}
|
|
30094
|
+
DTextBase.prototype.init = function (options) {
|
|
30095
|
+
_super.prototype.init.call(this, options);
|
|
30096
|
+
this.getText();
|
|
30097
|
+
};
|
|
30098
|
+
DTextBase.prototype.getOverflowMask = function () {
|
|
30099
|
+
var result = this._overflowMask;
|
|
30100
|
+
if (result === undefined) {
|
|
30101
|
+
result = this.newOverflowMask();
|
|
30102
|
+
this._overflowMask = result;
|
|
29758
30103
|
}
|
|
29759
|
-
|
|
30104
|
+
return null;
|
|
29760
30105
|
};
|
|
29761
|
-
DTextBase.prototype.
|
|
29762
|
-
var
|
|
29763
|
-
if (
|
|
29764
|
-
|
|
30106
|
+
DTextBase.prototype.newOverflowMask = function () {
|
|
30107
|
+
var _a, _b;
|
|
30108
|
+
if ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.mask) !== null && _b !== void 0 ? _b : this.theme.isOverflowMaskEnabled()) {
|
|
30109
|
+
var result = new DBaseOverflowMaskSimple(this);
|
|
30110
|
+
this._reflowable.add(result);
|
|
30111
|
+
this.toDirty();
|
|
30112
|
+
return result;
|
|
30113
|
+
}
|
|
30114
|
+
else {
|
|
30115
|
+
return null;
|
|
29765
30116
|
}
|
|
29766
|
-
|
|
30117
|
+
};
|
|
30118
|
+
Object.defineProperty(DTextBase.prototype, "text", {
|
|
30119
|
+
get: function () {
|
|
30120
|
+
var _a;
|
|
30121
|
+
return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = this.newText()));
|
|
30122
|
+
},
|
|
30123
|
+
set: function (text) {
|
|
30124
|
+
this.text.value = text;
|
|
30125
|
+
},
|
|
30126
|
+
enumerable: false,
|
|
30127
|
+
configurable: true
|
|
30128
|
+
});
|
|
30129
|
+
DTextBase.prototype.getText = function () {
|
|
30130
|
+
var _a;
|
|
30131
|
+
return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = this.newText()));
|
|
30132
|
+
};
|
|
30133
|
+
DTextBase.prototype.newText = function () {
|
|
30134
|
+
var _a;
|
|
30135
|
+
return new DTextPieceImpl(this, this.theme, (_a = this._options) === null || _a === void 0 ? void 0 : _a.text);
|
|
29767
30136
|
};
|
|
29768
30137
|
DTextBase.prototype.onReflow = function () {
|
|
29769
30138
|
_super.prototype.onReflow.call(this);
|
|
29770
|
-
this.
|
|
30139
|
+
this.onReflowTextAndImage();
|
|
30140
|
+
};
|
|
30141
|
+
DTextBase.prototype.getLayouter = function () {
|
|
30142
|
+
var _a;
|
|
30143
|
+
return ((_a = DTextBase.LAYOUTER) !== null && _a !== void 0 ? _a : (DTextBase.LAYOUTER = new DImagePieceLayouter()));
|
|
30144
|
+
};
|
|
30145
|
+
DTextBase.prototype.onReflowTextAndImage = function () {
|
|
30146
|
+
var layouter = this.getLayouter();
|
|
30147
|
+
var text = this.getText();
|
|
30148
|
+
text.update(layouter);
|
|
30149
|
+
var auto = this._auto;
|
|
30150
|
+
layouter.execute(this._padding, text.align, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
|
|
30151
|
+
layouter.clear();
|
|
29771
30152
|
};
|
|
29772
30153
|
DTextBase.prototype.isRefitable = function (target) {
|
|
29773
|
-
|
|
30154
|
+
if (_super.prototype.isRefitable.call(this, target)) {
|
|
30155
|
+
return true;
|
|
30156
|
+
}
|
|
30157
|
+
if (target != null) {
|
|
30158
|
+
var text = this._text;
|
|
30159
|
+
if (text != null && target === text.object) {
|
|
30160
|
+
return true;
|
|
30161
|
+
}
|
|
30162
|
+
}
|
|
30163
|
+
return false;
|
|
29774
30164
|
};
|
|
29775
30165
|
DTextBase.prototype.applyTitle = function () {
|
|
29776
|
-
var
|
|
29777
|
-
if (this._title.length <= 0 &&
|
|
30166
|
+
var object = this.text.object;
|
|
30167
|
+
if (this._title.length <= 0 && object != null && object.clipped) {
|
|
29778
30168
|
var layer = DApplications.getLayer(this);
|
|
29779
30169
|
if (layer) {
|
|
29780
|
-
layer.view.title =
|
|
30170
|
+
layer.view.title = object.text;
|
|
29781
30171
|
}
|
|
29782
30172
|
}
|
|
29783
30173
|
else {
|
|
@@ -29791,7 +30181,6 @@ var DTextBase = /** @class */ (function (_super) {
|
|
|
29791
30181
|
// Text
|
|
29792
30182
|
var text = this._text;
|
|
29793
30183
|
if (text) {
|
|
29794
|
-
this._text = null;
|
|
29795
30184
|
text.destroy();
|
|
29796
30185
|
}
|
|
29797
30186
|
// Overflow mask
|
|
@@ -30423,7 +30812,7 @@ var DImagePieceContainerImpl = /** @class */ (function () {
|
|
|
30423
30812
|
}
|
|
30424
30813
|
return false;
|
|
30425
30814
|
};
|
|
30426
|
-
DImagePieceContainerImpl.prototype.
|
|
30815
|
+
DImagePieceContainerImpl.prototype.update = function (layouter) {
|
|
30427
30816
|
var pieces = this._pieces;
|
|
30428
30817
|
for (var i = 0, imax = pieces.length; i < imax; ++i) {
|
|
30429
30818
|
var piece = pieces[i];
|
|
@@ -30433,6 +30822,54 @@ var DImagePieceContainerImpl = /** @class */ (function () {
|
|
|
30433
30822
|
layouter.add(piece);
|
|
30434
30823
|
}
|
|
30435
30824
|
};
|
|
30825
|
+
Object.defineProperty(DImagePieceContainerImpl.prototype, "object", {
|
|
30826
|
+
get: function () {
|
|
30827
|
+
return this._pieces[0].object;
|
|
30828
|
+
},
|
|
30829
|
+
enumerable: false,
|
|
30830
|
+
configurable: true
|
|
30831
|
+
});
|
|
30832
|
+
Object.defineProperty(DImagePieceContainerImpl.prototype, "align", {
|
|
30833
|
+
get: function () {
|
|
30834
|
+
return this._pieces[0].align;
|
|
30835
|
+
},
|
|
30836
|
+
enumerable: false,
|
|
30837
|
+
configurable: true
|
|
30838
|
+
});
|
|
30839
|
+
Object.defineProperty(DImagePieceContainerImpl.prototype, "margin", {
|
|
30840
|
+
get: function () {
|
|
30841
|
+
return this._pieces[0].margin;
|
|
30842
|
+
},
|
|
30843
|
+
enumerable: false,
|
|
30844
|
+
configurable: true
|
|
30845
|
+
});
|
|
30846
|
+
Object.defineProperty(DImagePieceContainerImpl.prototype, "tint", {
|
|
30847
|
+
get: function () {
|
|
30848
|
+
return this._pieces[0].tint;
|
|
30849
|
+
},
|
|
30850
|
+
enumerable: false,
|
|
30851
|
+
configurable: true
|
|
30852
|
+
});
|
|
30853
|
+
Object.defineProperty(DImagePieceContainerImpl.prototype, "source", {
|
|
30854
|
+
get: function () {
|
|
30855
|
+
return this._pieces[0].source;
|
|
30856
|
+
},
|
|
30857
|
+
set: function (source) {
|
|
30858
|
+
this._pieces[0].source = source;
|
|
30859
|
+
},
|
|
30860
|
+
enumerable: false,
|
|
30861
|
+
configurable: true
|
|
30862
|
+
});
|
|
30863
|
+
Object.defineProperty(DImagePieceContainerImpl.prototype, "rotation", {
|
|
30864
|
+
get: function () {
|
|
30865
|
+
return this._pieces[0].rotation;
|
|
30866
|
+
},
|
|
30867
|
+
set: function (rotation) {
|
|
30868
|
+
this._pieces[0].rotation = rotation;
|
|
30869
|
+
},
|
|
30870
|
+
enumerable: false,
|
|
30871
|
+
configurable: true
|
|
30872
|
+
});
|
|
30436
30873
|
DImagePieceContainerImpl.prototype.add = function (options) {
|
|
30437
30874
|
var result = this.newImage(this._theme, options);
|
|
30438
30875
|
this._pieces.push(result);
|
|
@@ -30507,24 +30944,13 @@ var DImageBase = /** @class */ (function (_super) {
|
|
|
30507
30944
|
_super.prototype.onStateChange.call(this, newState, oldState);
|
|
30508
30945
|
this.getImage().onStateChange(newState, oldState);
|
|
30509
30946
|
};
|
|
30510
|
-
DImageBase.prototype.
|
|
30511
|
-
this.
|
|
30512
|
-
this.
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
var _a;
|
|
30516
|
-
var layouter = ((_a = DImageBase.LAYOUTER) !== null && _a !== void 0 ? _a : (DImageBase.LAYOUTER = new DImagePieceLayouter()));
|
|
30517
|
-
this.getImage().updateTextAndImage(layouter);
|
|
30518
|
-
var text = this._text;
|
|
30519
|
-
if (text != null) {
|
|
30520
|
-
this.updateTextColor(text);
|
|
30521
|
-
layouter.set(text);
|
|
30522
|
-
}
|
|
30523
|
-
else {
|
|
30524
|
-
layouter.set(null);
|
|
30525
|
-
}
|
|
30947
|
+
DImageBase.prototype.onReflowTextAndImage = function () {
|
|
30948
|
+
var layouter = this.getLayouter();
|
|
30949
|
+
this.getImage().update(layouter);
|
|
30950
|
+
var text = this.getText();
|
|
30951
|
+
text.update(layouter);
|
|
30526
30952
|
var auto = this._auto;
|
|
30527
|
-
layouter.execute(this._padding,
|
|
30953
|
+
layouter.execute(this._padding, text.align, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
|
|
30528
30954
|
layouter.clear();
|
|
30529
30955
|
};
|
|
30530
30956
|
DImageBase.prototype.isRefitable = function (target) {
|
|
@@ -31813,16 +32239,16 @@ var DInput = /** @class */ (function (_super) {
|
|
|
31813
32239
|
return _this.containsPoint(point);
|
|
31814
32240
|
},
|
|
31815
32241
|
onStart: function () {
|
|
31816
|
-
_this.
|
|
32242
|
+
_this.text.hide();
|
|
31817
32243
|
},
|
|
31818
32244
|
onCancel: function () {
|
|
31819
|
-
_this.
|
|
32245
|
+
_this.text.show();
|
|
31820
32246
|
},
|
|
31821
32247
|
onEnd: function () {
|
|
31822
32248
|
// DO NOTHING
|
|
31823
32249
|
},
|
|
31824
32250
|
getValue: function () {
|
|
31825
|
-
return _this.
|
|
32251
|
+
return _this.text.computed;
|
|
31826
32252
|
},
|
|
31827
32253
|
onValueInput: function (newValue) {
|
|
31828
32254
|
_this.onValueInput(newValue);
|
|
@@ -31841,7 +32267,7 @@ var DInput = /** @class */ (function (_super) {
|
|
|
31841
32267
|
};
|
|
31842
32268
|
Object.defineProperty(DInput.prototype, "value", {
|
|
31843
32269
|
get: function () {
|
|
31844
|
-
return this.
|
|
32270
|
+
return this.text.computed;
|
|
31845
32271
|
},
|
|
31846
32272
|
set: function (value) {
|
|
31847
32273
|
this.text = value;
|
|
@@ -31849,9 +32275,13 @@ var DInput = /** @class */ (function (_super) {
|
|
|
31849
32275
|
enumerable: false,
|
|
31850
32276
|
configurable: true
|
|
31851
32277
|
});
|
|
31852
|
-
DInput.prototype.
|
|
31853
|
-
|
|
31854
|
-
|
|
32278
|
+
DInput.prototype.newText = function () {
|
|
32279
|
+
var _this = this;
|
|
32280
|
+
var result = _super.prototype.newText.call(this);
|
|
32281
|
+
result.on("change", function () {
|
|
32282
|
+
_this.validate();
|
|
32283
|
+
});
|
|
32284
|
+
return result;
|
|
31855
32285
|
};
|
|
31856
32286
|
DInput.prototype.onValueChange = function (newValue, oldValue) {
|
|
31857
32287
|
this.emit("change", newValue, oldValue, this);
|
|
@@ -35110,7 +35540,7 @@ var imageElementCache = {};
|
|
|
35110
35540
|
var toImageElement = function (dataUrl) {
|
|
35111
35541
|
var cachedImageElement = imageElementCache[dataUrl];
|
|
35112
35542
|
if (cachedImageElement != null) {
|
|
35113
|
-
if (
|
|
35543
|
+
if ("url" in cachedImageElement) {
|
|
35114
35544
|
return Promise.resolve(cachedImageElement);
|
|
35115
35545
|
}
|
|
35116
35546
|
else {
|
|
@@ -35121,8 +35551,14 @@ var toImageElement = function (dataUrl) {
|
|
|
35121
35551
|
var result = new Promise(function (resolve, reject) {
|
|
35122
35552
|
var imageElement = document.createElement("img");
|
|
35123
35553
|
imageElement.onload = function () {
|
|
35124
|
-
|
|
35125
|
-
|
|
35554
|
+
var resolved = {
|
|
35555
|
+
url: dataUrl,
|
|
35556
|
+
width: imageElement.width,
|
|
35557
|
+
height: imageElement.height,
|
|
35558
|
+
source: imageElement
|
|
35559
|
+
};
|
|
35560
|
+
imageElementCache[dataUrl] = resolved;
|
|
35561
|
+
resolve(resolved);
|
|
35126
35562
|
};
|
|
35127
35563
|
imageElement.onabort = imageElement.onerror = function () {
|
|
35128
35564
|
reject();
|
|
@@ -36237,18 +36673,20 @@ var buildRectangleRoundedUv = function (uvs, voffset, textureUvs, worldSize) {
|
|
|
36237
36673
|
*/
|
|
36238
36674
|
var BuilderRectangleRounded = /** @class */ (function (_super) {
|
|
36239
36675
|
__extends(BuilderRectangleRounded, _super);
|
|
36240
|
-
function BuilderRectangleRounded(vertexOffset, indexOffset
|
|
36241
|
-
var _this = _super.call(this, vertexOffset, indexOffset,
|
|
36676
|
+
function BuilderRectangleRounded(buffer, vertexOffset, indexOffset) {
|
|
36677
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_ROUNDED_VERTEX_COUNT, RECTANGLE_ROUNDED_INDEX_COUNT) || this;
|
|
36242
36678
|
_this.radius = 0;
|
|
36243
36679
|
_this.corner = 0;
|
|
36244
36680
|
return _this;
|
|
36245
36681
|
}
|
|
36246
|
-
BuilderRectangleRounded.prototype.init = function (
|
|
36682
|
+
BuilderRectangleRounded.prototype.init = function () {
|
|
36683
|
+
var buffer = this.buffer;
|
|
36247
36684
|
buffer.updateIndices();
|
|
36248
36685
|
buildRectangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
36249
36686
|
this.inited |= BuilderFlag.INDEX;
|
|
36250
36687
|
};
|
|
36251
|
-
BuilderRectangleRounded.prototype.update = function (
|
|
36688
|
+
BuilderRectangleRounded.prototype.update = function (shape) {
|
|
36689
|
+
var buffer = this.buffer;
|
|
36252
36690
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
36253
36691
|
this.updateColorFill(buffer, shape);
|
|
36254
36692
|
this.updateColorStroke(buffer, shape);
|
|
@@ -36330,8 +36768,8 @@ var createRectangleRoundedUploaded = function (buffer, shape, voffset, ioffset,
|
|
|
36330
36768
|
var icount = RECTANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
36331
36769
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
36332
36770
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
36333
|
-
new BuilderRectangleRounded(voffset, ioffset
|
|
36334
|
-
new BuilderText(voffset + RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset + RECTANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
|
|
36771
|
+
new BuilderRectangleRounded(buffer, voffset, ioffset),
|
|
36772
|
+
new BuilderText(buffer, voffset + RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset + RECTANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
|
|
36335
36773
|
]).init(shape);
|
|
36336
36774
|
}
|
|
36337
36775
|
return null;
|
|
@@ -37202,10 +37640,11 @@ var buildCircleUv = function (uvs, voffset, textureUvs) {
|
|
|
37202
37640
|
*/
|
|
37203
37641
|
var BuilderCircle = /** @class */ (function (_super) {
|
|
37204
37642
|
__extends(BuilderCircle, _super);
|
|
37205
|
-
function BuilderCircle(vertexOffset, indexOffset) {
|
|
37206
|
-
return _super.call(this, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
|
|
37643
|
+
function BuilderCircle(buffer, vertexOffset, indexOffset) {
|
|
37644
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
|
|
37207
37645
|
}
|
|
37208
|
-
BuilderCircle.prototype.init = function (
|
|
37646
|
+
BuilderCircle.prototype.init = function () {
|
|
37647
|
+
var buffer = this.buffer;
|
|
37209
37648
|
buffer.updateClippings();
|
|
37210
37649
|
buffer.updateIndices();
|
|
37211
37650
|
var voffset = this.vertexOffset;
|
|
@@ -37213,7 +37652,8 @@ var BuilderCircle = /** @class */ (function (_super) {
|
|
|
37213
37652
|
buildCircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
37214
37653
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37215
37654
|
};
|
|
37216
|
-
BuilderCircle.prototype.update = function (
|
|
37655
|
+
BuilderCircle.prototype.update = function (shape) {
|
|
37656
|
+
var buffer = this.buffer;
|
|
37217
37657
|
this.updateVertexAndStep(buffer, shape);
|
|
37218
37658
|
this.updateColorFill(buffer, shape);
|
|
37219
37659
|
this.updateColorStroke(buffer, shape);
|
|
@@ -37279,8 +37719,8 @@ var createCircleUploaded = function (buffer, shape, voffset, ioffset, antialiasW
|
|
|
37279
37719
|
var icount = CIRCLE_INDEX_COUNT + ticount;
|
|
37280
37720
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
37281
37721
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
37282
|
-
new BuilderCircle(voffset, ioffset),
|
|
37283
|
-
new BuilderText(voffset + CIRCLE_VERTEX_COUNT, ioffset + CIRCLE_INDEX_COUNT, tvcount, ticount)
|
|
37722
|
+
new BuilderCircle(buffer, voffset, ioffset),
|
|
37723
|
+
new BuilderText(buffer, voffset + CIRCLE_VERTEX_COUNT, ioffset + CIRCLE_INDEX_COUNT, tvcount, ticount)
|
|
37284
37724
|
]).init(shape);
|
|
37285
37725
|
}
|
|
37286
37726
|
return null;
|
|
@@ -37305,21 +37745,22 @@ var loadShapeCircle = function () {
|
|
|
37305
37745
|
|
|
37306
37746
|
var LINE_FMIN = 0.00001;
|
|
37307
37747
|
var LINE_WORK_POINT = new pixi_js.Point();
|
|
37308
|
-
var
|
|
37748
|
+
var toPointCount = function (points) {
|
|
37309
37749
|
if (points) {
|
|
37310
|
-
return points.formatted.
|
|
37750
|
+
return points.formatted.plength;
|
|
37311
37751
|
}
|
|
37312
37752
|
return 0;
|
|
37313
37753
|
};
|
|
37314
37754
|
var toLinePointCount = function (points) {
|
|
37315
|
-
|
|
37755
|
+
var pointCount = toPointCount(points);
|
|
37756
|
+
return ((pointCount >> 4) + (0 < (pointCount & 0xf) ? 1 : 0)) << 4;
|
|
37316
37757
|
};
|
|
37317
37758
|
var toLineVertexCount = function (pointCount, isClosed) {
|
|
37318
37759
|
if (isClosed) {
|
|
37319
|
-
return pointCount
|
|
37760
|
+
return (pointCount << 2) + 2;
|
|
37320
37761
|
}
|
|
37321
37762
|
else {
|
|
37322
|
-
return pointCount
|
|
37763
|
+
return pointCount << 2;
|
|
37323
37764
|
}
|
|
37324
37765
|
};
|
|
37325
37766
|
var toLineIndexCount = function (pointCount, isClosed) {
|
|
@@ -37707,24 +38148,53 @@ var buildTransformedLineClosedSegmentVertexStepAndColorFill = function (vertices
|
|
|
37707
38148
|
*/
|
|
37708
38149
|
var BuilderLine = /** @class */ (function (_super) {
|
|
37709
38150
|
__extends(BuilderLine, _super);
|
|
37710
|
-
function BuilderLine(vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
37711
|
-
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
38151
|
+
function BuilderLine(buffer, vertexOffset, indexOffset, vertexCount, indexCount) {
|
|
38152
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
37712
38153
|
_this.pointId = -1;
|
|
37713
38154
|
_this.pointCount = 0;
|
|
37714
38155
|
_this.pointsClosed = false;
|
|
37715
38156
|
_this.length = 1;
|
|
37716
38157
|
return _this;
|
|
37717
38158
|
}
|
|
37718
|
-
BuilderLine.prototype.init = function (
|
|
38159
|
+
BuilderLine.prototype.init = function () {
|
|
38160
|
+
var buffer = this.buffer;
|
|
37719
38161
|
buffer.updateIndices();
|
|
37720
38162
|
buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
|
|
37721
38163
|
this.inited |= BuilderFlag.INDEX;
|
|
37722
38164
|
};
|
|
38165
|
+
BuilderLine.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
38166
|
+
var pointCount = toLinePointCount(shape.points);
|
|
38167
|
+
var vertexCount = toLineVertexCount(pointCount, true);
|
|
38168
|
+
var indexCount = toLineIndexCount(pointCount, true);
|
|
38169
|
+
if (this.buffer !== buffer ||
|
|
38170
|
+
this.vertexOffset !== vertexOffset ||
|
|
38171
|
+
this.indexOffset !== indexOffset ||
|
|
38172
|
+
this.vertexCount !== vertexCount ||
|
|
38173
|
+
this.indexCount !== indexCount) {
|
|
38174
|
+
if (buffer.check(vertexOffset, indexOffset, vertexCount, indexCount)) {
|
|
38175
|
+
this.inited = BuilderFlag.NONE;
|
|
38176
|
+
this.buffer = buffer;
|
|
38177
|
+
this.vertexOffset = vertexOffset;
|
|
38178
|
+
this.indexOffset = indexOffset;
|
|
38179
|
+
this.vertexCount = vertexCount;
|
|
38180
|
+
this.indexCount = indexCount;
|
|
38181
|
+
this.init();
|
|
38182
|
+
return true;
|
|
38183
|
+
}
|
|
38184
|
+
else {
|
|
38185
|
+
return false;
|
|
38186
|
+
}
|
|
38187
|
+
}
|
|
38188
|
+
else {
|
|
38189
|
+
return true;
|
|
38190
|
+
}
|
|
38191
|
+
};
|
|
37723
38192
|
BuilderLine.prototype.isCompatible = function (shape) {
|
|
37724
38193
|
var vcount = toLineVertexCount(toLinePointCount(shape.points), true);
|
|
37725
38194
|
return vcount === this.vertexCount;
|
|
37726
38195
|
};
|
|
37727
|
-
BuilderLine.prototype.update = function (
|
|
38196
|
+
BuilderLine.prototype.update = function (shape) {
|
|
38197
|
+
var buffer = this.buffer;
|
|
37728
38198
|
this.updateLineClipping(buffer, shape);
|
|
37729
38199
|
this.updateLineVertexStepAndColorFill(buffer, shape);
|
|
37730
38200
|
this.updateColorStroke(buffer, shape);
|
|
@@ -37973,19 +38443,21 @@ var BuilderMarkerBase = /** @class */ (function (_super) {
|
|
|
37973
38443
|
*/
|
|
37974
38444
|
var BuilderMarkerTriangle = /** @class */ (function (_super) {
|
|
37975
38445
|
__extends(BuilderMarkerTriangle, _super);
|
|
37976
|
-
function BuilderMarkerTriangle(vertexOffset, indexOffset) {
|
|
37977
|
-
var _this = _super.call(this, vertexOffset, indexOffset, TRIANGLE_VERTEX_COUNT, TRIANGLE_INDEX_COUNT) || this;
|
|
38446
|
+
function BuilderMarkerTriangle(buffer, vertexOffset, indexOffset) {
|
|
38447
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_VERTEX_COUNT, TRIANGLE_INDEX_COUNT) || this;
|
|
37978
38448
|
_this.pointId = -1;
|
|
37979
38449
|
return _this;
|
|
37980
38450
|
}
|
|
37981
|
-
BuilderMarkerTriangle.prototype.init = function (
|
|
38451
|
+
BuilderMarkerTriangle.prototype.init = function () {
|
|
38452
|
+
var buffer = this.buffer;
|
|
37982
38453
|
buffer.updateClippings();
|
|
37983
38454
|
buffer.updateIndices();
|
|
37984
38455
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
37985
38456
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
37986
38457
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
37987
38458
|
};
|
|
37988
|
-
BuilderMarkerTriangle.prototype.update = function (
|
|
38459
|
+
BuilderMarkerTriangle.prototype.update = function (shape) {
|
|
38460
|
+
var buffer = this.buffer;
|
|
37989
38461
|
this.updateVertexStepAndUv(buffer, shape);
|
|
37990
38462
|
this.updateColorFill(buffer, shape);
|
|
37991
38463
|
this.updateColorStroke(buffer, shape);
|
|
@@ -38090,12 +38562,13 @@ var BuilderMarkerTriangleTail = /** @class */ (function (_super) {
|
|
|
38090
38562
|
*/
|
|
38091
38563
|
var BuilderMarkerCircle = /** @class */ (function (_super) {
|
|
38092
38564
|
__extends(BuilderMarkerCircle, _super);
|
|
38093
|
-
function BuilderMarkerCircle(vertexOffset, indexOffset) {
|
|
38094
|
-
var _this = _super.call(this, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
|
|
38565
|
+
function BuilderMarkerCircle(buffer, vertexOffset, indexOffset) {
|
|
38566
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
|
|
38095
38567
|
_this.pointId = -1;
|
|
38096
38568
|
return _this;
|
|
38097
38569
|
}
|
|
38098
|
-
BuilderMarkerCircle.prototype.init = function (
|
|
38570
|
+
BuilderMarkerCircle.prototype.init = function () {
|
|
38571
|
+
var buffer = this.buffer;
|
|
38099
38572
|
buffer.updateClippings();
|
|
38100
38573
|
buffer.updateIndices();
|
|
38101
38574
|
var vertexOffset = this.vertexOffset;
|
|
@@ -38103,7 +38576,8 @@ var BuilderMarkerCircle = /** @class */ (function (_super) {
|
|
|
38103
38576
|
buildCircleIndex(buffer.indices, vertexOffset, this.indexOffset);
|
|
38104
38577
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
38105
38578
|
};
|
|
38106
|
-
BuilderMarkerCircle.prototype.update = function (
|
|
38579
|
+
BuilderMarkerCircle.prototype.update = function (shape) {
|
|
38580
|
+
var buffer = this.buffer;
|
|
38107
38581
|
this.updateVertexAndStep(buffer, shape);
|
|
38108
38582
|
this.updateColorFill(buffer, shape);
|
|
38109
38583
|
this.updateColorStroke(buffer, shape);
|
|
@@ -38211,20 +38685,27 @@ var BuilderMarkerCircleTail = /** @class */ (function (_super) {
|
|
|
38211
38685
|
* SPDX-License-Identifier: Apache-2.0
|
|
38212
38686
|
*/
|
|
38213
38687
|
var BuilderNull = /** @class */ (function () {
|
|
38214
|
-
function BuilderNull(vertexOffset, indexOffset) {
|
|
38688
|
+
function BuilderNull(buffer, vertexOffset, indexOffset) {
|
|
38689
|
+
this.buffer = buffer;
|
|
38215
38690
|
this.vertexOffset = vertexOffset;
|
|
38216
38691
|
this.indexOffset = indexOffset;
|
|
38217
38692
|
this.vertexCount = 0;
|
|
38218
38693
|
this.indexCount = 0;
|
|
38219
38694
|
this.texture = null;
|
|
38220
38695
|
}
|
|
38221
|
-
BuilderNull.prototype.init = function (
|
|
38222
|
-
|
|
38696
|
+
BuilderNull.prototype.init = function () {
|
|
38697
|
+
return this;
|
|
38698
|
+
};
|
|
38699
|
+
BuilderNull.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
38700
|
+
this.buffer = buffer;
|
|
38701
|
+
this.vertexOffset = vertexOffset;
|
|
38702
|
+
this.indexOffset = indexOffset;
|
|
38703
|
+
return true;
|
|
38223
38704
|
};
|
|
38224
38705
|
BuilderNull.prototype.isCompatible = function (shape) {
|
|
38225
38706
|
return true;
|
|
38226
38707
|
};
|
|
38227
|
-
BuilderNull.prototype.update = function (
|
|
38708
|
+
BuilderNull.prototype.update = function (shape) {
|
|
38228
38709
|
this.texture = toTexture(shape);
|
|
38229
38710
|
};
|
|
38230
38711
|
BuilderNull.prototype.buildUnit = function (builder) {
|
|
@@ -38654,17 +39135,19 @@ var buildRectangleUv = function (uvs, voffset, textureUvs, worldSize) {
|
|
|
38654
39135
|
*/
|
|
38655
39136
|
var BuilderMarkerRectangle = /** @class */ (function (_super) {
|
|
38656
39137
|
__extends(BuilderMarkerRectangle, _super);
|
|
38657
|
-
function BuilderMarkerRectangle(vertexOffset, indexOffset) {
|
|
38658
|
-
var _this = _super.call(this, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
|
|
39138
|
+
function BuilderMarkerRectangle(buffer, vertexOffset, indexOffset) {
|
|
39139
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
|
|
38659
39140
|
_this.pointId = -1;
|
|
38660
39141
|
return _this;
|
|
38661
39142
|
}
|
|
38662
|
-
BuilderMarkerRectangle.prototype.init = function (
|
|
39143
|
+
BuilderMarkerRectangle.prototype.init = function () {
|
|
39144
|
+
var buffer = this.buffer;
|
|
38663
39145
|
buffer.updateIndices();
|
|
38664
39146
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
38665
39147
|
this.inited |= BuilderFlag.INDEX;
|
|
38666
39148
|
};
|
|
38667
|
-
BuilderMarkerRectangle.prototype.update = function (
|
|
39149
|
+
BuilderMarkerRectangle.prototype.update = function (shape) {
|
|
39150
|
+
var buffer = this.buffer;
|
|
38668
39151
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
38669
39152
|
this.updateColorFill(buffer, shape);
|
|
38670
39153
|
this.updateColorStroke(buffer, shape);
|
|
@@ -38803,31 +39286,31 @@ var toMarkerIndexCount = function (type) {
|
|
|
38803
39286
|
}
|
|
38804
39287
|
return 0;
|
|
38805
39288
|
};
|
|
38806
|
-
var toBuilderMarkerHead = function (type, vertexOffset, indexOffset) {
|
|
39289
|
+
var toBuilderMarkerHead = function (type, buffer, vertexOffset, indexOffset) {
|
|
38807
39290
|
switch (type) {
|
|
38808
39291
|
case EShapePointsMarkerType.NONE:
|
|
38809
|
-
return new BuilderNull(vertexOffset, indexOffset);
|
|
39292
|
+
return new BuilderNull(buffer, vertexOffset, indexOffset);
|
|
38810
39293
|
case EShapePointsMarkerType.CIRCLE:
|
|
38811
|
-
return new BuilderMarkerCircleHead(vertexOffset, indexOffset);
|
|
39294
|
+
return new BuilderMarkerCircleHead(buffer, vertexOffset, indexOffset);
|
|
38812
39295
|
case EShapePointsMarkerType.TRIANGLE:
|
|
38813
|
-
return new BuilderMarkerTriangleHead(vertexOffset, indexOffset);
|
|
39296
|
+
return new BuilderMarkerTriangleHead(buffer, vertexOffset, indexOffset);
|
|
38814
39297
|
case EShapePointsMarkerType.RECTANGLE:
|
|
38815
|
-
return new BuilderMarkerRectangleHead(vertexOffset, indexOffset);
|
|
39298
|
+
return new BuilderMarkerRectangleHead(buffer, vertexOffset, indexOffset);
|
|
38816
39299
|
}
|
|
38817
|
-
return new BuilderNull(vertexOffset, indexOffset);
|
|
39300
|
+
return new BuilderNull(buffer, vertexOffset, indexOffset);
|
|
38818
39301
|
};
|
|
38819
|
-
var toBuilderMarkerTail = function (type, vertexOffset, indexOffset) {
|
|
39302
|
+
var toBuilderMarkerTail = function (type, buffer, vertexOffset, indexOffset) {
|
|
38820
39303
|
switch (type) {
|
|
38821
39304
|
case EShapePointsMarkerType.NONE:
|
|
38822
|
-
return new BuilderNull(vertexOffset, indexOffset);
|
|
39305
|
+
return new BuilderNull(buffer, vertexOffset, indexOffset);
|
|
38823
39306
|
case EShapePointsMarkerType.CIRCLE:
|
|
38824
|
-
return new BuilderMarkerCircleTail(vertexOffset, indexOffset);
|
|
39307
|
+
return new BuilderMarkerCircleTail(buffer, vertexOffset, indexOffset);
|
|
38825
39308
|
case EShapePointsMarkerType.TRIANGLE:
|
|
38826
|
-
return new BuilderMarkerTriangleTail(vertexOffset, indexOffset);
|
|
39309
|
+
return new BuilderMarkerTriangleTail(buffer, vertexOffset, indexOffset);
|
|
38827
39310
|
case EShapePointsMarkerType.RECTANGLE:
|
|
38828
|
-
return new BuilderMarkerRectangleTail(vertexOffset, indexOffset);
|
|
39311
|
+
return new BuilderMarkerRectangleTail(buffer, vertexOffset, indexOffset);
|
|
38829
39312
|
}
|
|
38830
|
-
return new BuilderNull(vertexOffset, indexOffset);
|
|
39313
|
+
return new BuilderNull(buffer, vertexOffset, indexOffset);
|
|
38831
39314
|
};
|
|
38832
39315
|
var createLineUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
|
|
38833
39316
|
// Line
|
|
@@ -38864,10 +39347,10 @@ var createLineUploaded = function (buffer, shape, voffset, ioffset, antialiasWei
|
|
|
38864
39347
|
var icount = licount + mhicount + mticount + ticount;
|
|
38865
39348
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
38866
39349
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
38867
|
-
new BuilderLine(voffset, ioffset, lvcount, licount),
|
|
38868
|
-
toBuilderMarkerTail(mttype, mtvoffset, mtioffset),
|
|
38869
|
-
toBuilderMarkerHead(mhtype, mhvoffset, mhioffset),
|
|
38870
|
-
new BuilderText(tvoffset, tioffset, tvcount, ticount)
|
|
39350
|
+
new BuilderLine(buffer, voffset, ioffset, lvcount, licount),
|
|
39351
|
+
toBuilderMarkerTail(mttype, buffer, mtvoffset, mtioffset),
|
|
39352
|
+
toBuilderMarkerHead(mhtype, buffer, mhvoffset, mhioffset),
|
|
39353
|
+
new BuilderText(buffer, tvoffset, tioffset, tvcount, ticount)
|
|
38871
39354
|
]).init(shape);
|
|
38872
39355
|
}
|
|
38873
39356
|
return null;
|
|
@@ -39366,15 +39849,17 @@ var loadShapeConnectorLine = function () {
|
|
|
39366
39849
|
*/
|
|
39367
39850
|
var BuilderRectanglePivoted = /** @class */ (function (_super) {
|
|
39368
39851
|
__extends(BuilderRectanglePivoted, _super);
|
|
39369
|
-
function BuilderRectanglePivoted() {
|
|
39370
|
-
return _super
|
|
39852
|
+
function BuilderRectanglePivoted(buffer, vertexOffset, indexOffset) {
|
|
39853
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
|
|
39371
39854
|
}
|
|
39372
|
-
BuilderRectanglePivoted.prototype.init = function (
|
|
39855
|
+
BuilderRectanglePivoted.prototype.init = function () {
|
|
39856
|
+
var buffer = this.buffer;
|
|
39373
39857
|
buffer.updateIndices();
|
|
39374
39858
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
39375
39859
|
this.inited |= BuilderFlag.INDEX;
|
|
39376
39860
|
};
|
|
39377
|
-
BuilderRectanglePivoted.prototype.update = function (
|
|
39861
|
+
BuilderRectanglePivoted.prototype.update = function (shape) {
|
|
39862
|
+
var buffer = this.buffer;
|
|
39378
39863
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
39379
39864
|
this.updateColorFill(buffer, shape);
|
|
39380
39865
|
this.updateColorStroke(buffer, shape);
|
|
@@ -39447,8 +39932,8 @@ var createRectanglePivotedUploaded = function (buffer, shape, voffset, ioffset,
|
|
|
39447
39932
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
39448
39933
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
39449
39934
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
39450
|
-
new BuilderRectanglePivoted(voffset, ioffset
|
|
39451
|
-
new BuilderText(voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
|
|
39935
|
+
new BuilderRectanglePivoted(buffer, voffset, ioffset),
|
|
39936
|
+
new BuilderText(buffer, voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
|
|
39452
39937
|
]).init(shape);
|
|
39453
39938
|
}
|
|
39454
39939
|
return null;
|
|
@@ -39466,7 +39951,7 @@ var createGroupUploaded = function (buffer, shape, voffset, ioffset) {
|
|
|
39466
39951
|
var icount = ticount;
|
|
39467
39952
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
39468
39953
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
39469
|
-
new BuilderText(voffset, ioffset, tvcount, ticount)
|
|
39954
|
+
new BuilderText(buffer, voffset, ioffset, tvcount, ticount)
|
|
39470
39955
|
]).init(shape);
|
|
39471
39956
|
}
|
|
39472
39957
|
return null;
|
|
@@ -39753,6 +40238,20 @@ var EShapeGroupPoints = /** @class */ (function () {
|
|
|
39753
40238
|
enumerable: false,
|
|
39754
40239
|
configurable: true
|
|
39755
40240
|
});
|
|
40241
|
+
Object.defineProperty(EShapeGroupPoints.prototype, "plength", {
|
|
40242
|
+
get: function () {
|
|
40243
|
+
var children = this._parent.children;
|
|
40244
|
+
if (0 < children.length) {
|
|
40245
|
+
var points = children[children.length - 1].points;
|
|
40246
|
+
if (points != null) {
|
|
40247
|
+
return points.plength;
|
|
40248
|
+
}
|
|
40249
|
+
}
|
|
40250
|
+
return 0;
|
|
40251
|
+
},
|
|
40252
|
+
enumerable: false,
|
|
40253
|
+
configurable: true
|
|
40254
|
+
});
|
|
39756
40255
|
Object.defineProperty(EShapeGroupPoints.prototype, "id", {
|
|
39757
40256
|
get: function () {
|
|
39758
40257
|
var children = this._parent.children;
|
|
@@ -40214,6 +40713,9 @@ var EShapeGroup = /** @class */ (function (_super) {
|
|
|
40214
40713
|
enumerable: false,
|
|
40215
40714
|
configurable: true
|
|
40216
40715
|
});
|
|
40716
|
+
EShapeGroup.prototype.serializeGradient = function (manager) {
|
|
40717
|
+
return -1;
|
|
40718
|
+
};
|
|
40217
40719
|
Object.defineProperty(EShapeGroup.prototype, "radius", {
|
|
40218
40720
|
get: function () {
|
|
40219
40721
|
var children = this.children;
|
|
@@ -40251,6 +40753,9 @@ var EShapeGroup = /** @class */ (function (_super) {
|
|
|
40251
40753
|
enumerable: false,
|
|
40252
40754
|
configurable: true
|
|
40253
40755
|
});
|
|
40756
|
+
EShapeGroup.prototype.serializeImage = function (manager) {
|
|
40757
|
+
return -1;
|
|
40758
|
+
};
|
|
40254
40759
|
Object.defineProperty(EShapeGroup.prototype, "points", {
|
|
40255
40760
|
get: function () {
|
|
40256
40761
|
var children = this.children;
|
|
@@ -40455,15 +40960,17 @@ var loadShapeGroupShadowed = function () {
|
|
|
40455
40960
|
*/
|
|
40456
40961
|
var BuilderRectangle = /** @class */ (function (_super) {
|
|
40457
40962
|
__extends(BuilderRectangle, _super);
|
|
40458
|
-
function BuilderRectangle() {
|
|
40459
|
-
return _super
|
|
40963
|
+
function BuilderRectangle(buffer, vertexOffset, indexOffset) {
|
|
40964
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
|
|
40460
40965
|
}
|
|
40461
|
-
BuilderRectangle.prototype.init = function (
|
|
40966
|
+
BuilderRectangle.prototype.init = function () {
|
|
40967
|
+
var buffer = this.buffer;
|
|
40462
40968
|
buffer.updateIndices();
|
|
40463
40969
|
buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
40464
40970
|
this.inited |= BuilderFlag.INDEX;
|
|
40465
40971
|
};
|
|
40466
|
-
BuilderRectangle.prototype.update = function (
|
|
40972
|
+
BuilderRectangle.prototype.update = function (shape) {
|
|
40973
|
+
var buffer = this.buffer;
|
|
40467
40974
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
40468
40975
|
this.updateColorFill(buffer, shape);
|
|
40469
40976
|
this.updateColorStroke(buffer, shape);
|
|
@@ -40536,8 +41043,8 @@ var createRectangleUploaded = function (buffer, shape, voffset, ioffset, antiali
|
|
|
40536
41043
|
var icount = RECTANGLE_INDEX_COUNT + ticount;
|
|
40537
41044
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
40538
41045
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
40539
|
-
new BuilderRectangle(voffset, ioffset
|
|
40540
|
-
new BuilderText(voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
|
|
41046
|
+
new BuilderRectangle(buffer, voffset, ioffset),
|
|
41047
|
+
new BuilderText(buffer, voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
|
|
40541
41048
|
]).init(shape);
|
|
40542
41049
|
}
|
|
40543
41050
|
return null;
|
|
@@ -40772,21 +41279,23 @@ var buildImageSdfUv = function (uvs, voffset, textureUv) {
|
|
|
40772
41279
|
*/
|
|
40773
41280
|
var BuilderImageSdf = /** @class */ (function (_super) {
|
|
40774
41281
|
__extends(BuilderImageSdf, _super);
|
|
40775
|
-
function BuilderImageSdf(vertexOffset, indexOffset) {
|
|
40776
|
-
var _this = _super.call(this, vertexOffset, indexOffset, IMAGE_SDF_VERTEX_COUNT, IMAGE_SDF_INDEX_COUNT) || this;
|
|
41282
|
+
function BuilderImageSdf(buffer, vertexOffset, indexOffset) {
|
|
41283
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, IMAGE_SDF_VERTEX_COUNT, IMAGE_SDF_INDEX_COUNT) || this;
|
|
40777
41284
|
_this.textureWidth = -1;
|
|
40778
41285
|
_this.textureHeight = -1;
|
|
40779
41286
|
return _this;
|
|
40780
41287
|
}
|
|
40781
|
-
BuilderImageSdf.prototype.init = function (
|
|
41288
|
+
BuilderImageSdf.prototype.init = function () {
|
|
40782
41289
|
var voffset = this.vertexOffset;
|
|
41290
|
+
var buffer = this.buffer;
|
|
40783
41291
|
buffer.updateClippings();
|
|
40784
41292
|
buffer.updateIndices();
|
|
40785
41293
|
buildImageSdfClipping(buffer.clippings, voffset);
|
|
40786
41294
|
buildImageSdfIndex(buffer.indices, voffset, this.indexOffset);
|
|
40787
41295
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
40788
41296
|
};
|
|
40789
|
-
BuilderImageSdf.prototype.update = function (
|
|
41297
|
+
BuilderImageSdf.prototype.update = function (shape) {
|
|
41298
|
+
var buffer = this.buffer;
|
|
40790
41299
|
this.updateVertexAndStep(buffer, shape);
|
|
40791
41300
|
this.updateColorFill(buffer, shape);
|
|
40792
41301
|
this.updateColorStroke(buffer, shape);
|
|
@@ -40862,8 +41371,8 @@ var createImageSdfUploaded = function (buffer, shape, voffset, ioffset, antialia
|
|
|
40862
41371
|
var icount = IMAGE_SDF_INDEX_COUNT + ticount;
|
|
40863
41372
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
40864
41373
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
40865
|
-
new BuilderImageSdf(voffset, ioffset),
|
|
40866
|
-
new BuilderText(voffset + IMAGE_SDF_VERTEX_COUNT, ioffset + IMAGE_SDF_INDEX_COUNT, tvcount, ticount)
|
|
41374
|
+
new BuilderImageSdf(buffer, voffset, ioffset),
|
|
41375
|
+
new BuilderText(buffer, voffset + IMAGE_SDF_VERTEX_COUNT, ioffset + IMAGE_SDF_INDEX_COUNT, tvcount, ticount)
|
|
40867
41376
|
]).init(shape);
|
|
40868
41377
|
}
|
|
40869
41378
|
return null;
|
|
@@ -40907,20 +41416,27 @@ var loadShapeImageSdf = function () {
|
|
|
40907
41416
|
* SPDX-License-Identifier: Apache-2.0
|
|
40908
41417
|
*/
|
|
40909
41418
|
var BuilderLabel = /** @class */ (function () {
|
|
40910
|
-
function BuilderLabel(vertexOffset, indexOffset
|
|
41419
|
+
function BuilderLabel(buffer, vertexOffset, indexOffset) {
|
|
41420
|
+
this.buffer = buffer;
|
|
40911
41421
|
this.vertexOffset = vertexOffset;
|
|
40912
41422
|
this.indexOffset = indexOffset;
|
|
40913
|
-
this.vertexCount =
|
|
40914
|
-
this.indexCount =
|
|
41423
|
+
this.vertexCount = 0;
|
|
41424
|
+
this.indexCount = 0;
|
|
40915
41425
|
this.texture = null;
|
|
40916
41426
|
}
|
|
40917
|
-
BuilderLabel.prototype.init = function (
|
|
40918
|
-
|
|
41427
|
+
BuilderLabel.prototype.init = function () {
|
|
41428
|
+
return this;
|
|
41429
|
+
};
|
|
41430
|
+
BuilderLabel.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
41431
|
+
this.buffer = buffer;
|
|
41432
|
+
this.vertexOffset = vertexOffset;
|
|
41433
|
+
this.indexOffset = indexOffset;
|
|
41434
|
+
return true;
|
|
40919
41435
|
};
|
|
40920
41436
|
BuilderLabel.prototype.isCompatible = function (shape) {
|
|
40921
41437
|
return true;
|
|
40922
41438
|
};
|
|
40923
|
-
BuilderLabel.prototype.update = function (
|
|
41439
|
+
BuilderLabel.prototype.update = function (shape) {
|
|
40924
41440
|
this.texture = toTexture(shape);
|
|
40925
41441
|
};
|
|
40926
41442
|
BuilderLabel.prototype.buildUnit = function (builder) {
|
|
@@ -40947,8 +41463,8 @@ var createLabelUploaded = function (buffer, shape, voffset, ioffset, antialiasWe
|
|
|
40947
41463
|
var icount = ticount;
|
|
40948
41464
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
40949
41465
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
40950
|
-
new BuilderLabel(voffset, ioffset
|
|
40951
|
-
new BuilderText(voffset, ioffset, tvcount, ticount)
|
|
41466
|
+
new BuilderLabel(buffer, voffset, ioffset),
|
|
41467
|
+
new BuilderText(buffer, voffset, ioffset, tvcount, ticount)
|
|
40952
41468
|
]).init(shape);
|
|
40953
41469
|
}
|
|
40954
41470
|
return null;
|
|
@@ -41084,7 +41600,7 @@ var buildNullUv = function (uvs, voffset, vcount) {
|
|
|
41084
41600
|
};
|
|
41085
41601
|
|
|
41086
41602
|
var toLineOfAnyPointCount = function (pointCount) {
|
|
41087
|
-
return
|
|
41603
|
+
return ((pointCount >> 4) + (0 < (pointCount & 0xf) ? 1 : 0)) << 4;
|
|
41088
41604
|
};
|
|
41089
41605
|
var buildLineOfAnyColor = function (voffset, vcountPerPoint, point, pointCount, colors, isEnabled, colorDef, alphaDef) {
|
|
41090
41606
|
if (isEnabled) {
|
|
@@ -41138,8 +41654,8 @@ var buildLineOfAnyColor = function (voffset, vcountPerPoint, point, pointCount,
|
|
|
41138
41654
|
*/
|
|
41139
41655
|
var BuilderLineOfAny = /** @class */ (function (_super) {
|
|
41140
41656
|
__extends(BuilderLineOfAny, _super);
|
|
41141
|
-
function BuilderLineOfAny(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
41142
|
-
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
41657
|
+
function BuilderLineOfAny(buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) {
|
|
41658
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount) || this;
|
|
41143
41659
|
_this.pointId = -1;
|
|
41144
41660
|
_this.pointCount = 0;
|
|
41145
41661
|
_this.pointCountReserved = pointCountReserved;
|
|
@@ -41147,10 +41663,39 @@ var BuilderLineOfAny = /** @class */ (function (_super) {
|
|
|
41147
41663
|
_this.pointOffsetId = -1;
|
|
41148
41664
|
_this.pointFillId = -1;
|
|
41149
41665
|
_this.pointStrokeId = -1;
|
|
41666
|
+
_this.vcountPerPoint = vcountPerPoint;
|
|
41667
|
+
_this.icountPerPoint = icountPerPoint;
|
|
41150
41668
|
return _this;
|
|
41151
41669
|
}
|
|
41670
|
+
BuilderLineOfAny.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
|
|
41671
|
+
var pointCount = toLineOfAnyPointCount(toPointCount(shape.points));
|
|
41672
|
+
if (this.buffer !== buffer ||
|
|
41673
|
+
this.vertexOffset !== vertexOffset ||
|
|
41674
|
+
this.indexOffset !== indexOffset ||
|
|
41675
|
+
this.pointCountReserved !== pointCount) {
|
|
41676
|
+
var vertexCount = pointCount * this.vcountPerPoint;
|
|
41677
|
+
var indexCount = pointCount * this.icountPerPoint;
|
|
41678
|
+
if (buffer.check(vertexOffset, indexOffset, vertexCount, indexCount)) {
|
|
41679
|
+
this.inited = BuilderFlag.NONE;
|
|
41680
|
+
this.buffer = buffer;
|
|
41681
|
+
this.vertexOffset = vertexOffset;
|
|
41682
|
+
this.indexOffset = indexOffset;
|
|
41683
|
+
this.vertexCount = vertexCount;
|
|
41684
|
+
this.indexCount = indexCount;
|
|
41685
|
+
this.pointCountReserved = pointCount;
|
|
41686
|
+
this.init();
|
|
41687
|
+
return true;
|
|
41688
|
+
}
|
|
41689
|
+
else {
|
|
41690
|
+
return false;
|
|
41691
|
+
}
|
|
41692
|
+
}
|
|
41693
|
+
else {
|
|
41694
|
+
return true;
|
|
41695
|
+
}
|
|
41696
|
+
};
|
|
41152
41697
|
BuilderLineOfAny.prototype.isCompatible = function (shape) {
|
|
41153
|
-
var pointCount = toLineOfAnyPointCount(
|
|
41698
|
+
var pointCount = toLineOfAnyPointCount(toPointCount(shape.points));
|
|
41154
41699
|
return pointCount === this.pointCountReserved;
|
|
41155
41700
|
};
|
|
41156
41701
|
BuilderLineOfAny.prototype.updateLineOfAnyColorFill = function (buffer, shape, points, vcountPerPoint) {
|
|
@@ -41162,7 +41707,9 @@ var BuilderLineOfAny = /** @class */ (function (_super) {
|
|
|
41162
41707
|
var colorFill = fill.color;
|
|
41163
41708
|
var alphaFill = isFillEnabled ? fill.alpha : 0;
|
|
41164
41709
|
var isFillChanged = colorFill !== this.colorFill || alphaFill !== this.alphaFill;
|
|
41165
|
-
|
|
41710
|
+
var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
|
|
41711
|
+
if (isNotInited || isPointFillChanged || isFillChanged) {
|
|
41712
|
+
this.inited |= BuilderFlag.COLOR_FILL;
|
|
41166
41713
|
this.colorFill = colorFill;
|
|
41167
41714
|
this.alphaFill = alphaFill;
|
|
41168
41715
|
this.pointFillId = pointFillId;
|
|
@@ -41637,6 +42184,8 @@ var EShapeLineOfAnyPointsImpl = /** @class */ (function () {
|
|
|
41637
42184
|
this._values = [];
|
|
41638
42185
|
this._valuesLength = 0;
|
|
41639
42186
|
this._segments = [];
|
|
42187
|
+
this._length = 0;
|
|
42188
|
+
this._plength = 0;
|
|
41640
42189
|
this._size = new EShapeLineOfAnyPointsPointImpl(this, EShapeDefaults.SIZE_X, EShapeDefaults.SIZE_Y);
|
|
41641
42190
|
this._offset = new EShapeLineOfAnyPointsPointImpl(this, 0, 0);
|
|
41642
42191
|
this._fill = new EShapeLineOfAnyPointsFillImpl(parent);
|
|
@@ -41645,7 +42194,14 @@ var EShapeLineOfAnyPointsImpl = /** @class */ (function () {
|
|
|
41645
42194
|
}
|
|
41646
42195
|
Object.defineProperty(EShapeLineOfAnyPointsImpl.prototype, "length", {
|
|
41647
42196
|
get: function () {
|
|
41648
|
-
return this.
|
|
42197
|
+
return this._length;
|
|
42198
|
+
},
|
|
42199
|
+
enumerable: false,
|
|
42200
|
+
configurable: true
|
|
42201
|
+
});
|
|
42202
|
+
Object.defineProperty(EShapeLineOfAnyPointsImpl.prototype, "plength", {
|
|
42203
|
+
get: function () {
|
|
42204
|
+
return this._plength;
|
|
41649
42205
|
},
|
|
41650
42206
|
enumerable: false,
|
|
41651
42207
|
configurable: true
|
|
@@ -41790,6 +42346,11 @@ var EShapeLineOfAnyPointsImpl = /** @class */ (function () {
|
|
|
41790
42346
|
isUpdated = true;
|
|
41791
42347
|
}
|
|
41792
42348
|
}
|
|
42349
|
+
var newLength = newValuesLength >> 1;
|
|
42350
|
+
this._length = newLength;
|
|
42351
|
+
if (this._plength < newLength) {
|
|
42352
|
+
this._plength = newLength;
|
|
42353
|
+
}
|
|
41793
42354
|
}
|
|
41794
42355
|
//
|
|
41795
42356
|
if (isDirty) {
|
|
@@ -41801,7 +42362,6 @@ var EShapeLineOfAnyPointsImpl = /** @class */ (function () {
|
|
|
41801
42362
|
parent_1.updateUploaded();
|
|
41802
42363
|
}
|
|
41803
42364
|
else {
|
|
41804
|
-
parent_1.uploaded = undefined;
|
|
41805
42365
|
parent_1.toDirty();
|
|
41806
42366
|
}
|
|
41807
42367
|
}
|
|
@@ -41876,7 +42436,8 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
|
|
|
41876
42436
|
function BuilderLineOfCircles() {
|
|
41877
42437
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
41878
42438
|
}
|
|
41879
|
-
BuilderLineOfCircles.prototype.init = function (
|
|
42439
|
+
BuilderLineOfCircles.prototype.init = function () {
|
|
42440
|
+
var buffer = this.buffer;
|
|
41880
42441
|
buffer.updateClippings();
|
|
41881
42442
|
buffer.updateIndices();
|
|
41882
42443
|
var clippings = buffer.clippings;
|
|
@@ -41892,9 +42453,10 @@ var BuilderLineOfCircles = /** @class */ (function (_super) {
|
|
|
41892
42453
|
}
|
|
41893
42454
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
41894
42455
|
};
|
|
41895
|
-
BuilderLineOfCircles.prototype.update = function (
|
|
42456
|
+
BuilderLineOfCircles.prototype.update = function (shape) {
|
|
41896
42457
|
var points = shape.points;
|
|
41897
42458
|
if (points instanceof EShapeLineOfAnyPointsImpl) {
|
|
42459
|
+
var buffer = this.buffer;
|
|
41898
42460
|
this.updateVertexAndStep(buffer, shape, points);
|
|
41899
42461
|
this.updateLineOfAnyColorFill(buffer, shape, points, CIRCLE_VERTEX_COUNT);
|
|
41900
42462
|
this.updateLineOfAnyColorStroke(buffer, shape, points, CIRCLE_VERTEX_COUNT);
|
|
@@ -42012,15 +42574,15 @@ var createLineOfAnyUploaded = function (buffer, shape, voffset, vcountPerPoint,
|
|
|
42012
42574
|
var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
|
|
42013
42575
|
var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
|
|
42014
42576
|
var points = shape.points;
|
|
42015
|
-
var pointCount = toLineOfAnyPointCount(
|
|
42577
|
+
var pointCount = toLineOfAnyPointCount(toPointCount(points));
|
|
42016
42578
|
var pvcount = pointCount * vcountPerPoint;
|
|
42017
42579
|
var picount = pointCount * icountPerPoint;
|
|
42018
42580
|
var vcount = pvcount + tvcount;
|
|
42019
42581
|
var icount = picount + ticount;
|
|
42020
42582
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
42021
42583
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
42022
|
-
new constructor(voffset, ioffset, pvcount, picount, pointCount),
|
|
42023
|
-
new BuilderText(voffset + pvcount, ioffset + picount, tvcount, ticount)
|
|
42584
|
+
new constructor(buffer, voffset, ioffset, pvcount, picount, pointCount, vcountPerPoint, icountPerPoint),
|
|
42585
|
+
new BuilderText(buffer, voffset + pvcount, ioffset + picount, tvcount, ticount)
|
|
42024
42586
|
]).init(shape);
|
|
42025
42587
|
}
|
|
42026
42588
|
return null;
|
|
@@ -42103,13 +42665,14 @@ var loadShapeLineOfCircles = function () {
|
|
|
42103
42665
|
*/
|
|
42104
42666
|
var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
42105
42667
|
__extends(BuilderLineOfRectangleRoundeds, _super);
|
|
42106
|
-
function BuilderLineOfRectangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
42107
|
-
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
42668
|
+
function BuilderLineOfRectangleRoundeds(buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) {
|
|
42669
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) || this;
|
|
42108
42670
|
_this.radius = 0;
|
|
42109
42671
|
_this.corner = 0;
|
|
42110
42672
|
return _this;
|
|
42111
42673
|
}
|
|
42112
|
-
BuilderLineOfRectangleRoundeds.prototype.init = function (
|
|
42674
|
+
BuilderLineOfRectangleRoundeds.prototype.init = function () {
|
|
42675
|
+
var buffer = this.buffer;
|
|
42113
42676
|
buffer.updateIndices();
|
|
42114
42677
|
var indices = buffer.indices;
|
|
42115
42678
|
var voffset = this.vertexOffset;
|
|
@@ -42121,9 +42684,10 @@ var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
|
|
|
42121
42684
|
}
|
|
42122
42685
|
this.inited |= BuilderFlag.INDEX;
|
|
42123
42686
|
};
|
|
42124
|
-
BuilderLineOfRectangleRoundeds.prototype.update = function (
|
|
42687
|
+
BuilderLineOfRectangleRoundeds.prototype.update = function (shape) {
|
|
42125
42688
|
var points = shape.points;
|
|
42126
42689
|
if (points instanceof EShapeLineOfAnyPointsImpl) {
|
|
42690
|
+
var buffer = this.buffer;
|
|
42127
42691
|
this.updateVertexClippingStepAndUv(buffer, shape, points);
|
|
42128
42692
|
this.updateLineOfAnyColorFill(buffer, shape, points, RECTANGLE_ROUNDED_VERTEX_COUNT);
|
|
42129
42693
|
this.updateLineOfAnyColorStroke(buffer, shape, points, RECTANGLE_ROUNDED_VERTEX_COUNT);
|
|
@@ -42342,7 +42906,8 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
42342
42906
|
function BuilderLineOfRectangles() {
|
|
42343
42907
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
42344
42908
|
}
|
|
42345
|
-
BuilderLineOfRectangles.prototype.init = function (
|
|
42909
|
+
BuilderLineOfRectangles.prototype.init = function () {
|
|
42910
|
+
var buffer = this.buffer;
|
|
42346
42911
|
buffer.updateIndices();
|
|
42347
42912
|
var indices = buffer.indices;
|
|
42348
42913
|
var voffset = this.vertexOffset;
|
|
@@ -42354,9 +42919,10 @@ var BuilderLineOfRectangles = /** @class */ (function (_super) {
|
|
|
42354
42919
|
}
|
|
42355
42920
|
this.inited |= BuilderFlag.INDEX;
|
|
42356
42921
|
};
|
|
42357
|
-
BuilderLineOfRectangles.prototype.update = function (
|
|
42922
|
+
BuilderLineOfRectangles.prototype.update = function (shape) {
|
|
42358
42923
|
var points = shape.points;
|
|
42359
42924
|
if (points instanceof EShapeLineOfAnyPointsImpl) {
|
|
42925
|
+
var buffer = this.buffer;
|
|
42360
42926
|
this.updateVertexClippingStepAndUv(buffer, shape, points);
|
|
42361
42927
|
this.updateLineOfAnyColorFill(buffer, shape, points, RECTANGLE_VERTEX_COUNT);
|
|
42362
42928
|
this.updateLineOfAnyColorStroke(buffer, shape, points, RECTANGLE_VERTEX_COUNT);
|
|
@@ -42967,13 +43533,14 @@ var buildTriangleRoundedUv = function (uvs, voffset, textureUvs, radius, worldSi
|
|
|
42967
43533
|
*/
|
|
42968
43534
|
var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
42969
43535
|
__extends(BuilderLineOfTriangleRoundeds, _super);
|
|
42970
|
-
function BuilderLineOfTriangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
|
|
42971
|
-
var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
|
|
43536
|
+
function BuilderLineOfTriangleRoundeds(buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) {
|
|
43537
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) || this;
|
|
42972
43538
|
_this.radius = 0;
|
|
42973
43539
|
_this.corner = 0;
|
|
42974
43540
|
return _this;
|
|
42975
43541
|
}
|
|
42976
|
-
BuilderLineOfTriangleRoundeds.prototype.init = function (
|
|
43542
|
+
BuilderLineOfTriangleRoundeds.prototype.init = function () {
|
|
43543
|
+
var buffer = this.buffer;
|
|
42977
43544
|
buffer.updateIndices();
|
|
42978
43545
|
var voffset = this.vertexOffset;
|
|
42979
43546
|
var ioffset = this.indexOffset;
|
|
@@ -42984,9 +43551,10 @@ var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
|
|
|
42984
43551
|
}
|
|
42985
43552
|
this.inited |= BuilderFlag.INDEX;
|
|
42986
43553
|
};
|
|
42987
|
-
BuilderLineOfTriangleRoundeds.prototype.update = function (
|
|
43554
|
+
BuilderLineOfTriangleRoundeds.prototype.update = function (shape) {
|
|
42988
43555
|
var points = shape.points;
|
|
42989
43556
|
if (points instanceof EShapeLineOfAnyPointsImpl) {
|
|
43557
|
+
var buffer = this.buffer;
|
|
42990
43558
|
this.updateVertexClippingStepAndUv(buffer, shape, points);
|
|
42991
43559
|
this.updateLineOfAnyColorFill(buffer, shape, points, TRIANGLE_ROUNDED_VERTEX_COUNT);
|
|
42992
43560
|
this.updateLineOfAnyColorStroke(buffer, shape, points, TRIANGLE_ROUNDED_VERTEX_COUNT);
|
|
@@ -43349,7 +43917,8 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
43349
43917
|
function BuilderLineOfTriangles() {
|
|
43350
43918
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
43351
43919
|
}
|
|
43352
|
-
BuilderLineOfTriangles.prototype.init = function (
|
|
43920
|
+
BuilderLineOfTriangles.prototype.init = function () {
|
|
43921
|
+
var buffer = this.buffer;
|
|
43353
43922
|
buffer.updateClippings();
|
|
43354
43923
|
buffer.updateIndices();
|
|
43355
43924
|
var clippings = buffer.clippings;
|
|
@@ -43365,9 +43934,10 @@ var BuilderLineOfTriangles = /** @class */ (function (_super) {
|
|
|
43365
43934
|
}
|
|
43366
43935
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43367
43936
|
};
|
|
43368
|
-
BuilderLineOfTriangles.prototype.update = function (
|
|
43937
|
+
BuilderLineOfTriangles.prototype.update = function (shape) {
|
|
43369
43938
|
var points = shape.points;
|
|
43370
43939
|
if (points instanceof EShapeLineOfAnyPointsImpl) {
|
|
43940
|
+
var buffer = this.buffer;
|
|
43371
43941
|
this.updateVertexStepAndUvs(buffer, shape, points);
|
|
43372
43942
|
this.updateLineOfAnyColorFill(buffer, shape, points, TRIANGLE_VERTEX_COUNT);
|
|
43373
43943
|
this.updateLineOfAnyColorStroke(buffer, shape, points, TRIANGLE_VERTEX_COUNT);
|
|
@@ -43573,7 +44143,7 @@ var loadShapeLineOfTriangles = function () {
|
|
|
43573
44143
|
*/
|
|
43574
44144
|
var createNullUploaded = function (buffer, shape, voffset, ioffset) {
|
|
43575
44145
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, 0, 0, [
|
|
43576
|
-
new BuilderNull(voffset, ioffset)
|
|
44146
|
+
new BuilderNull(buffer, voffset, ioffset)
|
|
43577
44147
|
]).init(shape);
|
|
43578
44148
|
};
|
|
43579
44149
|
|
|
@@ -43793,10 +44363,11 @@ var buildSemicircleUv = function (uvs, voffset, textureUvs) {
|
|
|
43793
44363
|
*/
|
|
43794
44364
|
var BuilderSemicircle = /** @class */ (function (_super) {
|
|
43795
44365
|
__extends(BuilderSemicircle, _super);
|
|
43796
|
-
function BuilderSemicircle(vertexOffset, indexOffset) {
|
|
43797
|
-
return _super.call(this, vertexOffset, indexOffset, SEMICIRCLE_VERTEX_COUNT, SEMICIRCLE_INDEX_COUNT) || this;
|
|
44366
|
+
function BuilderSemicircle(buffer, vertexOffset, indexOffset) {
|
|
44367
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, SEMICIRCLE_VERTEX_COUNT, SEMICIRCLE_INDEX_COUNT) || this;
|
|
43798
44368
|
}
|
|
43799
|
-
BuilderSemicircle.prototype.init = function (
|
|
44369
|
+
BuilderSemicircle.prototype.init = function () {
|
|
44370
|
+
var buffer = this.buffer;
|
|
43800
44371
|
buffer.updateClippings();
|
|
43801
44372
|
buffer.updateIndices();
|
|
43802
44373
|
var voffset = this.vertexOffset;
|
|
@@ -43804,7 +44375,8 @@ var BuilderSemicircle = /** @class */ (function (_super) {
|
|
|
43804
44375
|
buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
|
|
43805
44376
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43806
44377
|
};
|
|
43807
|
-
BuilderSemicircle.prototype.update = function (
|
|
44378
|
+
BuilderSemicircle.prototype.update = function (shape) {
|
|
44379
|
+
var buffer = this.buffer;
|
|
43808
44380
|
this.updateVertexAndStep(buffer, shape);
|
|
43809
44381
|
this.updateColorFill(buffer, shape);
|
|
43810
44382
|
this.updateColorStroke(buffer, shape);
|
|
@@ -43870,8 +44442,8 @@ var createSemicircleUploaded = function (buffer, shape, voffset, ioffset, antial
|
|
|
43870
44442
|
var icount = SEMICIRCLE_INDEX_COUNT + ticount;
|
|
43871
44443
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
43872
44444
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
43873
|
-
new BuilderSemicircle(voffset, ioffset),
|
|
43874
|
-
new BuilderText(voffset + SEMICIRCLE_VERTEX_COUNT, ioffset + SEMICIRCLE_INDEX_COUNT, tvcount, ticount)
|
|
44445
|
+
new BuilderSemicircle(buffer, voffset, ioffset),
|
|
44446
|
+
new BuilderText(buffer, voffset + SEMICIRCLE_VERTEX_COUNT, ioffset + SEMICIRCLE_INDEX_COUNT, tvcount, ticount)
|
|
43875
44447
|
]).init(shape);
|
|
43876
44448
|
}
|
|
43877
44449
|
return null;
|
|
@@ -43940,17 +44512,19 @@ var loadShapeSemicircle = function () {
|
|
|
43940
44512
|
*/
|
|
43941
44513
|
var BuilderTriangle = /** @class */ (function (_super) {
|
|
43942
44514
|
__extends(BuilderTriangle, _super);
|
|
43943
|
-
function BuilderTriangle() {
|
|
43944
|
-
return _super
|
|
44515
|
+
function BuilderTriangle(buffer, vertexOffset, indexOffset) {
|
|
44516
|
+
return _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_VERTEX_COUNT, TRIANGLE_INDEX_COUNT) || this;
|
|
43945
44517
|
}
|
|
43946
|
-
BuilderTriangle.prototype.init = function (
|
|
44518
|
+
BuilderTriangle.prototype.init = function () {
|
|
44519
|
+
var buffer = this.buffer;
|
|
43947
44520
|
buffer.updateClippings();
|
|
43948
44521
|
buffer.updateIndices();
|
|
43949
44522
|
buildTriangleClipping(buffer.clippings, this.vertexOffset);
|
|
43950
44523
|
buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
43951
44524
|
this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
|
|
43952
44525
|
};
|
|
43953
|
-
BuilderTriangle.prototype.update = function (
|
|
44526
|
+
BuilderTriangle.prototype.update = function (shape) {
|
|
44527
|
+
var buffer = this.buffer;
|
|
43954
44528
|
this.updateVertexStepAndUv(buffer, shape);
|
|
43955
44529
|
this.updateColorFill(buffer, shape);
|
|
43956
44530
|
this.updateColorStroke(buffer, shape);
|
|
@@ -44012,8 +44586,8 @@ var createTriangleUploaded = function (buffer, shape, voffset, ioffset, antialia
|
|
|
44012
44586
|
var icount = TRIANGLE_INDEX_COUNT + ticount;
|
|
44013
44587
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
44014
44588
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
44015
|
-
new BuilderTriangle(voffset, ioffset
|
|
44016
|
-
new BuilderText(voffset + TRIANGLE_VERTEX_COUNT, ioffset + TRIANGLE_INDEX_COUNT, tvcount, ticount)
|
|
44589
|
+
new BuilderTriangle(buffer, voffset, ioffset),
|
|
44590
|
+
new BuilderText(buffer, voffset + TRIANGLE_VERTEX_COUNT, ioffset + TRIANGLE_INDEX_COUNT, tvcount, ticount)
|
|
44017
44591
|
]).init(shape);
|
|
44018
44592
|
}
|
|
44019
44593
|
return null;
|
|
@@ -44042,18 +44616,20 @@ var loadShapeTriangle = function () {
|
|
|
44042
44616
|
*/
|
|
44043
44617
|
var BuilderTriangleRounded = /** @class */ (function (_super) {
|
|
44044
44618
|
__extends(BuilderTriangleRounded, _super);
|
|
44045
|
-
function BuilderTriangleRounded(vertexOffset, indexOffset
|
|
44046
|
-
var _this = _super.call(this, vertexOffset, indexOffset,
|
|
44619
|
+
function BuilderTriangleRounded(buffer, vertexOffset, indexOffset) {
|
|
44620
|
+
var _this = _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_ROUNDED_VERTEX_COUNT, TRIANGLE_ROUNDED_INDEX_COUNT) || this;
|
|
44047
44621
|
_this.radius = 0;
|
|
44048
44622
|
_this.corner = 0;
|
|
44049
44623
|
return _this;
|
|
44050
44624
|
}
|
|
44051
|
-
BuilderTriangleRounded.prototype.init = function (
|
|
44625
|
+
BuilderTriangleRounded.prototype.init = function () {
|
|
44626
|
+
var buffer = this.buffer;
|
|
44052
44627
|
buffer.updateIndices();
|
|
44053
44628
|
buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
|
|
44054
44629
|
this.inited |= BuilderFlag.INDEX;
|
|
44055
44630
|
};
|
|
44056
|
-
BuilderTriangleRounded.prototype.update = function (
|
|
44631
|
+
BuilderTriangleRounded.prototype.update = function (shape) {
|
|
44632
|
+
var buffer = this.buffer;
|
|
44057
44633
|
this.updateVertexClippingStepAndUv(buffer, shape);
|
|
44058
44634
|
this.updateColorFill(buffer, shape);
|
|
44059
44635
|
this.updateColorStroke(buffer, shape);
|
|
@@ -44129,8 +44705,8 @@ var createTriangleRoundedUploaded = function (buffer, shape, voffset, ioffset, a
|
|
|
44129
44705
|
var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
|
|
44130
44706
|
if (buffer.check(voffset, ioffset, vcount, icount)) {
|
|
44131
44707
|
return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
|
|
44132
|
-
new BuilderTriangleRounded(voffset, ioffset
|
|
44133
|
-
new BuilderText(voffset + TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset + TRIANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
|
|
44708
|
+
new BuilderTriangleRounded(buffer, voffset, ioffset),
|
|
44709
|
+
new BuilderText(buffer, voffset + TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset + TRIANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
|
|
44134
44710
|
]).init(shape);
|
|
44135
44711
|
}
|
|
44136
44712
|
return null;
|
|
@@ -44341,9 +44917,9 @@ var DMenuItemText = /** @class */ (function (_super) {
|
|
|
44341
44917
|
var shortcuts = this._shortcuts;
|
|
44342
44918
|
if (shortcuts != null && 0 < shortcuts.length) {
|
|
44343
44919
|
var shortcut = shortcuts[0];
|
|
44344
|
-
var shortcutText = this.
|
|
44920
|
+
var shortcutText = this.newShortcutText();
|
|
44345
44921
|
this._shortcutText = shortcutText;
|
|
44346
|
-
this.snippet.add(
|
|
44922
|
+
this.snippet.add(shortcutText, true);
|
|
44347
44923
|
shortcutText.text = UtilKeyboardEvent.toString(shortcut);
|
|
44348
44924
|
}
|
|
44349
44925
|
else {
|
|
@@ -44351,6 +44927,10 @@ var DMenuItemText = /** @class */ (function (_super) {
|
|
|
44351
44927
|
}
|
|
44352
44928
|
this._shortcutMargin = this.theme.getShortcutTextMargin();
|
|
44353
44929
|
};
|
|
44930
|
+
DMenuItemText.prototype.newShortcutText = function () {
|
|
44931
|
+
var _a, _b;
|
|
44932
|
+
return new DDynamicText(new DDynamicTextStyle(this, this.theme, (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.style));
|
|
44933
|
+
};
|
|
44354
44934
|
DMenuItemText.prototype.updateShortcutText = function () {
|
|
44355
44935
|
var text = this._shortcutText;
|
|
44356
44936
|
var margin = this._shortcutMargin;
|
|
@@ -44375,8 +44955,7 @@ var DMenuItemText = /** @class */ (function (_super) {
|
|
|
44375
44955
|
text.position.set(textX, textY);
|
|
44376
44956
|
}
|
|
44377
44957
|
};
|
|
44378
|
-
DMenuItemText.prototype.
|
|
44379
|
-
_super.prototype.updateTextColor.call(this, text);
|
|
44958
|
+
DMenuItemText.prototype.updateShortcutColor = function () {
|
|
44380
44959
|
var shortcutText = this._shortcutText;
|
|
44381
44960
|
if (shortcutText != null) {
|
|
44382
44961
|
var theme = this.theme;
|
|
@@ -44385,8 +44964,9 @@ var DMenuItemText = /** @class */ (function (_super) {
|
|
|
44385
44964
|
shortcutText.alpha = theme.getShortcutAlpha(state);
|
|
44386
44965
|
}
|
|
44387
44966
|
};
|
|
44388
|
-
DMenuItemText.prototype.
|
|
44389
|
-
_super.prototype.
|
|
44967
|
+
DMenuItemText.prototype.onReflow = function () {
|
|
44968
|
+
_super.prototype.onReflow.call(this);
|
|
44969
|
+
this.updateShortcutColor();
|
|
44390
44970
|
this.updateShortcutText();
|
|
44391
44971
|
};
|
|
44392
44972
|
DMenuItemText.prototype.getType = function () {
|
|
@@ -46086,9 +46666,9 @@ var EShapeActionValueMiscWrite = /** @class */ (function (_super) {
|
|
|
46086
46666
|
*/
|
|
46087
46667
|
var createImageSdf = function (dataUrl, convertToSdf) {
|
|
46088
46668
|
if (convertToSdf) {
|
|
46089
|
-
return toImageElement(dataUrl).then(function (
|
|
46669
|
+
return toImageElement(dataUrl).then(function (image) {
|
|
46090
46670
|
var generator = DynamicSDFFontGenerator.getInstance().init();
|
|
46091
|
-
generator.updateTexture(
|
|
46671
|
+
generator.updateTexture(image.width, image.height, image.source);
|
|
46092
46672
|
generator.render();
|
|
46093
46673
|
var canvas = document.createElement("canvas");
|
|
46094
46674
|
generator.read(canvas);
|
|
@@ -46096,8 +46676,8 @@ var createImageSdf = function (dataUrl, convertToSdf) {
|
|
|
46096
46676
|
});
|
|
46097
46677
|
}
|
|
46098
46678
|
else {
|
|
46099
|
-
return toImageElement(dataUrl).then(function (
|
|
46100
|
-
return new EShapeImageSdf(
|
|
46679
|
+
return toImageElement(dataUrl).then(function (image) {
|
|
46680
|
+
return new EShapeImageSdf(image);
|
|
46101
46681
|
});
|
|
46102
46682
|
}
|
|
46103
46683
|
};
|
|
@@ -46107,8 +46687,8 @@ var createImageSdf = function (dataUrl, convertToSdf) {
|
|
|
46107
46687
|
* SPDX-License-Identifier: Apache-2.0
|
|
46108
46688
|
*/
|
|
46109
46689
|
var createImage = function (dataUrl) {
|
|
46110
|
-
return toImageElement(dataUrl).then(function (
|
|
46111
|
-
return new EShapeImage(
|
|
46690
|
+
return toImageElement(dataUrl).then(function (image) {
|
|
46691
|
+
return new EShapeImage(image);
|
|
46112
46692
|
});
|
|
46113
46693
|
};
|
|
46114
46694
|
|
|
@@ -50161,6 +50741,12 @@ var DThemeWhiteInput = /** @class */ (function (_super) {
|
|
|
50161
50741
|
}
|
|
50162
50742
|
return DThemeWhiteConstants.BORDER_COLOR;
|
|
50163
50743
|
};
|
|
50744
|
+
DThemeWhiteInput.prototype.getOutlineColor = function (state) {
|
|
50745
|
+
if (state.isInvalid) {
|
|
50746
|
+
return DThemeWhiteConstants.INVALID_COLOR;
|
|
50747
|
+
}
|
|
50748
|
+
return _super.prototype.getOutlineColor.call(this, state);
|
|
50749
|
+
};
|
|
50164
50750
|
DThemeWhiteInput.prototype.getHeight = function () {
|
|
50165
50751
|
return this.getLineHeight();
|
|
50166
50752
|
};
|
|
@@ -52165,14 +52751,14 @@ var loadThemeWhitePane = function () {
|
|
|
52165
52751
|
* Copyright (C) 2019 Toshiba Corporation
|
|
52166
52752
|
* SPDX-License-Identifier: Apache-2.0
|
|
52167
52753
|
*/
|
|
52168
|
-
var formatter$l = function (
|
|
52169
|
-
if (
|
|
52170
|
-
var
|
|
52171
|
-
if (isString(
|
|
52172
|
-
return
|
|
52754
|
+
var formatter$l = function (item) {
|
|
52755
|
+
if (item) {
|
|
52756
|
+
var value = item.text.value;
|
|
52757
|
+
if (isString(value)) {
|
|
52758
|
+
return value;
|
|
52173
52759
|
}
|
|
52174
|
-
else if (
|
|
52175
|
-
var computed =
|
|
52760
|
+
else if (value != null) {
|
|
52761
|
+
var computed = value(item.state);
|
|
52176
52762
|
if (computed != null) {
|
|
52177
52763
|
return computed;
|
|
52178
52764
|
}
|
|
@@ -52198,19 +52784,19 @@ var DThemeWhiteSelect = /** @class */ (function (_super) {
|
|
|
52198
52784
|
* Copyright (C) 2019 Toshiba Corporation
|
|
52199
52785
|
* SPDX-License-Identifier: Apache-2.0
|
|
52200
52786
|
*/
|
|
52201
|
-
var formatter$k = function (
|
|
52202
|
-
if (
|
|
52787
|
+
var formatter$k = function (items) {
|
|
52788
|
+
if (items) {
|
|
52203
52789
|
var result = "";
|
|
52204
52790
|
var delimiter = "";
|
|
52205
|
-
for (var i = 0, imax =
|
|
52206
|
-
var
|
|
52207
|
-
var
|
|
52208
|
-
if (isString(
|
|
52209
|
-
result += delimiter +
|
|
52791
|
+
for (var i = 0, imax = items.length; i < imax; ++i) {
|
|
52792
|
+
var item = items[i];
|
|
52793
|
+
var value = item.text.value;
|
|
52794
|
+
if (isString(value)) {
|
|
52795
|
+
result += delimiter + value;
|
|
52210
52796
|
delimiter = ", ";
|
|
52211
52797
|
}
|
|
52212
|
-
else if (
|
|
52213
|
-
var computed =
|
|
52798
|
+
else if (value != null) {
|
|
52799
|
+
var computed = value(item.state);
|
|
52214
52800
|
if (computed != null) {
|
|
52215
52801
|
result += delimiter + computed;
|
|
52216
52802
|
delimiter = ", ";
|
|
@@ -61135,6 +61721,12 @@ var DThemeDarkInput = /** @class */ (function (_super) {
|
|
|
61135
61721
|
}
|
|
61136
61722
|
return null;
|
|
61137
61723
|
};
|
|
61724
|
+
DThemeDarkInput.prototype.getOutlineColor = function (state) {
|
|
61725
|
+
if (state.isInvalid) {
|
|
61726
|
+
return DThemeDarkConstants.INVALID_COLOR;
|
|
61727
|
+
}
|
|
61728
|
+
return _super.prototype.getOutlineColor.call(this, state);
|
|
61729
|
+
};
|
|
61138
61730
|
DThemeDarkInput.prototype.getHeight = function () {
|
|
61139
61731
|
return this.getLineHeight();
|
|
61140
61732
|
};
|
|
@@ -63137,14 +63729,14 @@ var loadThemeDarkPane = function () {
|
|
|
63137
63729
|
* Copyright (C) 2019 Toshiba Corporation
|
|
63138
63730
|
* SPDX-License-Identifier: Apache-2.0
|
|
63139
63731
|
*/
|
|
63140
|
-
var formatter$a = function (
|
|
63141
|
-
if (
|
|
63142
|
-
var
|
|
63143
|
-
if (isString(
|
|
63144
|
-
return
|
|
63732
|
+
var formatter$a = function (item) {
|
|
63733
|
+
if (item) {
|
|
63734
|
+
var value = item.text.value;
|
|
63735
|
+
if (isString(value)) {
|
|
63736
|
+
return value;
|
|
63145
63737
|
}
|
|
63146
|
-
else if (
|
|
63147
|
-
var computed =
|
|
63738
|
+
else if (value != null) {
|
|
63739
|
+
var computed = value(item.state);
|
|
63148
63740
|
if (computed != null) {
|
|
63149
63741
|
return computed;
|
|
63150
63742
|
}
|
|
@@ -63170,19 +63762,19 @@ var DThemeDarkSelect = /** @class */ (function (_super) {
|
|
|
63170
63762
|
* Copyright (C) 2019 Toshiba Corporation
|
|
63171
63763
|
* SPDX-License-Identifier: Apache-2.0
|
|
63172
63764
|
*/
|
|
63173
|
-
var formatter$9 = function (
|
|
63174
|
-
if (
|
|
63765
|
+
var formatter$9 = function (items) {
|
|
63766
|
+
if (items) {
|
|
63175
63767
|
var result = "";
|
|
63176
63768
|
var delimiter = "";
|
|
63177
|
-
for (var i = 0, imax =
|
|
63178
|
-
var
|
|
63179
|
-
var
|
|
63180
|
-
if (isString(
|
|
63181
|
-
result += delimiter +
|
|
63769
|
+
for (var i = 0, imax = items.length; i < imax; ++i) {
|
|
63770
|
+
var item = items[i];
|
|
63771
|
+
var value = item.text.value;
|
|
63772
|
+
if (isString(value)) {
|
|
63773
|
+
result += delimiter + value;
|
|
63182
63774
|
delimiter = ", ";
|
|
63183
63775
|
}
|
|
63184
|
-
else if (
|
|
63185
|
-
var computed =
|
|
63776
|
+
else if (value != null) {
|
|
63777
|
+
var computed = value(item.state);
|
|
63186
63778
|
if (computed != null) {
|
|
63187
63779
|
result += delimiter + computed;
|
|
63188
63780
|
delimiter = ", ";
|
|
@@ -74032,7 +74624,7 @@ var DButtonColorGradient = /** @class */ (function (_super) {
|
|
|
74032
74624
|
var view = DPickerColorGradientView.from(1, 10, checkers, texture);
|
|
74033
74625
|
this._view = view;
|
|
74034
74626
|
view.setRectangle(0, 0, 0, texture.width, texture.height);
|
|
74035
|
-
view.setData(0, this.
|
|
74627
|
+
view.setData(0, this.text.computed);
|
|
74036
74628
|
view.update();
|
|
74037
74629
|
this.image = view;
|
|
74038
74630
|
}
|
|
@@ -74041,13 +74633,13 @@ var DButtonColorGradient = /** @class */ (function (_super) {
|
|
|
74041
74633
|
DButtonColorGradient.prototype.onActivate = function (e) {
|
|
74042
74634
|
var _this = this;
|
|
74043
74635
|
_super.prototype.onActivate.call(this, e);
|
|
74044
|
-
var
|
|
74636
|
+
var computed = this.text.computed;
|
|
74045
74637
|
var dialog = this.dialog;
|
|
74046
|
-
if (
|
|
74047
|
-
dialog.value.fromObject(
|
|
74638
|
+
if (computed != null) {
|
|
74639
|
+
dialog.value.fromObject(computed);
|
|
74048
74640
|
}
|
|
74049
74641
|
dialog.open(this).then(function (newValue) {
|
|
74050
|
-
_this.onValueChange(newValue, _this.toClone(
|
|
74642
|
+
_this.onValueChange(newValue, _this.toClone(computed));
|
|
74051
74643
|
});
|
|
74052
74644
|
};
|
|
74053
74645
|
DButtonColorGradient.prototype.toClone = function (value) {
|
|
@@ -74058,17 +74650,15 @@ var DButtonColorGradient = /** @class */ (function (_super) {
|
|
|
74058
74650
|
return result;
|
|
74059
74651
|
};
|
|
74060
74652
|
DButtonColorGradient.prototype.onValueChange = function (newValue, oldValue) {
|
|
74061
|
-
var
|
|
74062
|
-
if (
|
|
74063
|
-
|
|
74653
|
+
var computed = this.text.computed;
|
|
74654
|
+
if (computed != null) {
|
|
74655
|
+
computed.fromObject(newValue);
|
|
74064
74656
|
}
|
|
74065
74657
|
var view = this._view;
|
|
74066
74658
|
if (view != null) {
|
|
74067
74659
|
view.update();
|
|
74068
74660
|
}
|
|
74069
|
-
this.
|
|
74070
|
-
this.createOrUpdateText();
|
|
74071
|
-
DApplications.update(this);
|
|
74661
|
+
this.text.compute(true);
|
|
74072
74662
|
this.emit("change", newValue, oldValue, this);
|
|
74073
74663
|
};
|
|
74074
74664
|
Object.defineProperty(DButtonColorGradient.prototype, "dialog", {
|
|
@@ -74101,7 +74691,7 @@ var DButtonColorGradient = /** @class */ (function (_super) {
|
|
|
74101
74691
|
};
|
|
74102
74692
|
Object.defineProperty(DButtonColorGradient.prototype, "value", {
|
|
74103
74693
|
get: function () {
|
|
74104
|
-
return this.
|
|
74694
|
+
return this.text.computed;
|
|
74105
74695
|
},
|
|
74106
74696
|
enumerable: false,
|
|
74107
74697
|
configurable: true
|
|
@@ -74190,14 +74780,14 @@ var DButtonColor = /** @class */ (function (_super) {
|
|
|
74190
74780
|
var _this = this;
|
|
74191
74781
|
_super.prototype.onActivate.call(this, e);
|
|
74192
74782
|
var dialog = this.dialog;
|
|
74193
|
-
var
|
|
74194
|
-
if (
|
|
74783
|
+
var computed = this.text.computed;
|
|
74784
|
+
if (computed != null) {
|
|
74195
74785
|
var dialogCurrent = dialog.current;
|
|
74196
|
-
dialogCurrent.color =
|
|
74197
|
-
dialogCurrent.alpha =
|
|
74786
|
+
dialogCurrent.color = computed.color;
|
|
74787
|
+
dialogCurrent.alpha = computed.alpha;
|
|
74198
74788
|
var dialogNew = dialog.new;
|
|
74199
|
-
dialogNew.color =
|
|
74200
|
-
dialogNew.alpha =
|
|
74789
|
+
dialogNew.color = computed.color;
|
|
74790
|
+
dialogNew.alpha = computed.alpha;
|
|
74201
74791
|
}
|
|
74202
74792
|
dialog.open(this).then(function () {
|
|
74203
74793
|
_this.onValueChange(_this.toClone(dialog.new), _this.toClone(dialog.current));
|
|
@@ -74210,10 +74800,10 @@ var DButtonColor = /** @class */ (function (_super) {
|
|
|
74210
74800
|
};
|
|
74211
74801
|
};
|
|
74212
74802
|
DButtonColor.prototype.onValueChange = function (newValue, oldValue) {
|
|
74213
|
-
var
|
|
74214
|
-
if (
|
|
74215
|
-
|
|
74216
|
-
|
|
74803
|
+
var computed = this.text.computed;
|
|
74804
|
+
if (computed != null) {
|
|
74805
|
+
computed.color = newValue.color;
|
|
74806
|
+
computed.alpha = newValue.alpha;
|
|
74217
74807
|
}
|
|
74218
74808
|
this.onColorChange();
|
|
74219
74809
|
this.emit("change", newValue, oldValue, this);
|
|
@@ -74221,16 +74811,12 @@ var DButtonColor = /** @class */ (function (_super) {
|
|
|
74221
74811
|
DButtonColor.prototype.onColorChange = function () {
|
|
74222
74812
|
var image = this.image.get(0);
|
|
74223
74813
|
if (image != null) {
|
|
74224
|
-
var
|
|
74225
|
-
if (
|
|
74226
|
-
image.tint.color =
|
|
74814
|
+
var computed = this.text.computed;
|
|
74815
|
+
if (computed != null) {
|
|
74816
|
+
image.tint.color = computed.color;
|
|
74227
74817
|
}
|
|
74228
74818
|
}
|
|
74229
|
-
this.
|
|
74230
|
-
};
|
|
74231
|
-
DButtonColor.prototype.updateTextForcibly = function () {
|
|
74232
|
-
this.onTextChange();
|
|
74233
|
-
this.createOrUpdateText();
|
|
74819
|
+
this.text.compute(true);
|
|
74234
74820
|
};
|
|
74235
74821
|
Object.defineProperty(DButtonColor.prototype, "dialog", {
|
|
74236
74822
|
get: function () {
|
|
@@ -74274,13 +74860,14 @@ var DButtonColor = /** @class */ (function (_super) {
|
|
|
74274
74860
|
});
|
|
74275
74861
|
DButtonColor.prototype.newValue = function () {
|
|
74276
74862
|
var _this = this;
|
|
74277
|
-
var
|
|
74278
|
-
|
|
74279
|
-
|
|
74863
|
+
var text = this.text;
|
|
74864
|
+
var computed = text.computed;
|
|
74865
|
+
return new DPickerColorAndAlpha(computed, function (color) {
|
|
74866
|
+
computed.color = color;
|
|
74280
74867
|
_this.onColorChange();
|
|
74281
74868
|
}, function (alpha) {
|
|
74282
|
-
|
|
74283
|
-
|
|
74869
|
+
computed.alpha = alpha;
|
|
74870
|
+
text.compute(true);
|
|
74284
74871
|
});
|
|
74285
74872
|
};
|
|
74286
74873
|
DButtonColor.prototype.getType = function () {
|
|
@@ -74317,7 +74904,7 @@ var DButtonDate = /** @class */ (function (_super) {
|
|
|
74317
74904
|
var _this = this;
|
|
74318
74905
|
var _a, _b;
|
|
74319
74906
|
_super.prototype.onActivate.call(this, e);
|
|
74320
|
-
var value = (_b = (_a = this.
|
|
74907
|
+
var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
|
|
74321
74908
|
var dialog = this.dialog;
|
|
74322
74909
|
dialog.current = new Date(value);
|
|
74323
74910
|
dialog.new = new Date(value);
|
|
@@ -74361,11 +74948,11 @@ var DButtonDate = /** @class */ (function (_super) {
|
|
|
74361
74948
|
Object.defineProperty(DButtonDate.prototype, "value", {
|
|
74362
74949
|
get: function () {
|
|
74363
74950
|
var _a;
|
|
74364
|
-
return (_a = this.
|
|
74951
|
+
return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
|
|
74365
74952
|
},
|
|
74366
74953
|
set: function (value) {
|
|
74367
|
-
var
|
|
74368
|
-
if (
|
|
74954
|
+
var computed = this.text.computed;
|
|
74955
|
+
if (computed === undefined || computed.getTime() !== value.getTime()) {
|
|
74369
74956
|
this.text = value;
|
|
74370
74957
|
}
|
|
74371
74958
|
},
|
|
@@ -74391,7 +74978,7 @@ var DButtonDatetime = /** @class */ (function (_super) {
|
|
|
74391
74978
|
var _this = this;
|
|
74392
74979
|
var _a, _b;
|
|
74393
74980
|
_super.prototype.onActivate.call(this, e);
|
|
74394
|
-
var value = (_b = (_a = this.
|
|
74981
|
+
var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
|
|
74395
74982
|
var dialog = this.dialog;
|
|
74396
74983
|
dialog.current = new Date(value);
|
|
74397
74984
|
dialog.new = new Date(value);
|
|
@@ -74444,11 +75031,11 @@ var DButtonDatetime = /** @class */ (function (_super) {
|
|
|
74444
75031
|
Object.defineProperty(DButtonDatetime.prototype, "value", {
|
|
74445
75032
|
get: function () {
|
|
74446
75033
|
var _a;
|
|
74447
|
-
return (_a = this.
|
|
75034
|
+
return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
|
|
74448
75035
|
},
|
|
74449
75036
|
set: function (value) {
|
|
74450
|
-
var
|
|
74451
|
-
if (
|
|
75037
|
+
var computed = this.text.computed;
|
|
75038
|
+
if (computed === undefined || computed.getTime() !== value.getTime()) {
|
|
74452
75039
|
this.text = value;
|
|
74453
75040
|
}
|
|
74454
75041
|
},
|
|
@@ -77533,7 +78120,7 @@ var DButtonSelect = /** @class */ (function (_super) {
|
|
|
77533
78120
|
var _a;
|
|
77534
78121
|
_super.prototype.onActivate.call(this, e);
|
|
77535
78122
|
var dialog = this.dialog;
|
|
77536
|
-
var oldValue = (_a = this.
|
|
78123
|
+
var oldValue = (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
|
|
77537
78124
|
this._dialogSetter(dialog, oldValue);
|
|
77538
78125
|
dialog.open(this).then(function () {
|
|
77539
78126
|
var newValue = _this._dialogGetter(dialog);
|
|
@@ -77566,7 +78153,7 @@ var DButtonSelect = /** @class */ (function (_super) {
|
|
|
77566
78153
|
Object.defineProperty(DButtonSelect.prototype, "value", {
|
|
77567
78154
|
get: function () {
|
|
77568
78155
|
var _a;
|
|
77569
|
-
return (_a = this.
|
|
78156
|
+
return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
|
|
77570
78157
|
},
|
|
77571
78158
|
set: function (value) {
|
|
77572
78159
|
this.text = value;
|
|
@@ -77593,7 +78180,7 @@ var DButtonTime = /** @class */ (function (_super) {
|
|
|
77593
78180
|
var _this = this;
|
|
77594
78181
|
var _a, _b;
|
|
77595
78182
|
_super.prototype.onActivate.call(this, e);
|
|
77596
|
-
var value = (_b = (_a = this.
|
|
78183
|
+
var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
|
|
77597
78184
|
var dialog = this.dialog;
|
|
77598
78185
|
dialog.current = new Date(value);
|
|
77599
78186
|
dialog.new = new Date(value);
|
|
@@ -77645,11 +78232,11 @@ var DButtonTime = /** @class */ (function (_super) {
|
|
|
77645
78232
|
Object.defineProperty(DButtonTime.prototype, "value", {
|
|
77646
78233
|
get: function () {
|
|
77647
78234
|
var _a;
|
|
77648
|
-
return (_a = this.
|
|
78235
|
+
return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
|
|
77649
78236
|
},
|
|
77650
78237
|
set: function (value) {
|
|
77651
|
-
var
|
|
77652
|
-
if (
|
|
78238
|
+
var computed = this.text.computed;
|
|
78239
|
+
if (computed === undefined || computed.getTime() !== value.getTime()) {
|
|
77653
78240
|
this.text = value;
|
|
77654
78241
|
}
|
|
77655
78242
|
},
|
|
@@ -86789,7 +87376,7 @@ var DDialogProcessing = /** @class */ (function (_super) {
|
|
|
86789
87376
|
_this._delayDone = (_a = delay === null || delay === void 0 ? void 0 : delay.done) !== null && _a !== void 0 ? _a : theme.getDoneDelay();
|
|
86790
87377
|
var delayClose = delay === null || delay === void 0 ? void 0 : delay.close;
|
|
86791
87378
|
_this._delayClose = delayClose !== undefined ? delayClose : theme.getCloseDelay();
|
|
86792
|
-
_this._messageText = _this.message.text;
|
|
87379
|
+
_this._messageText = _this.message.text.value;
|
|
86793
87380
|
return _this;
|
|
86794
87381
|
}
|
|
86795
87382
|
DDialogProcessing.prototype.newMessage = function (options) {
|
|
@@ -87147,7 +87734,7 @@ var DIndicatorProcessing = /** @class */ (function () {
|
|
|
87147
87734
|
}
|
|
87148
87735
|
state.unlock();
|
|
87149
87736
|
if (this._isTextEnabled) {
|
|
87150
|
-
this._textValueBackup = parent.text;
|
|
87737
|
+
this._textValueBackup = parent.text.value;
|
|
87151
87738
|
var textValue = this._textValue;
|
|
87152
87739
|
if (textValue !== undefined) {
|
|
87153
87740
|
parent.text = textValue;
|
|
@@ -90248,7 +90835,7 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
|
|
|
90248
90835
|
var selecting = this._column.selecting;
|
|
90249
90836
|
var dialog = selecting.dialog;
|
|
90250
90837
|
if (dialog) {
|
|
90251
|
-
var oldValue_1 = (_a = this.
|
|
90838
|
+
var oldValue_1 = (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
|
|
90252
90839
|
selecting.setter(dialog, oldValue_1);
|
|
90253
90840
|
dialog.open(this).then(function () {
|
|
90254
90841
|
var newValue = selecting.getter(dialog);
|
|
@@ -90305,11 +90892,8 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
|
|
|
90305
90892
|
});
|
|
90306
90893
|
Object.defineProperty(DTableBodyCellSelectDialog.prototype, "value", {
|
|
90307
90894
|
get: function () {
|
|
90308
|
-
var
|
|
90309
|
-
|
|
90310
|
-
return textValueComputed;
|
|
90311
|
-
}
|
|
90312
|
-
return null;
|
|
90895
|
+
var _a;
|
|
90896
|
+
return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
|
|
90313
90897
|
},
|
|
90314
90898
|
set: function (value) {
|
|
90315
90899
|
this.text = value;
|
|
@@ -90321,10 +90905,7 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
|
|
|
90321
90905
|
this._row = row;
|
|
90322
90906
|
this._rowIndex = rowIndex;
|
|
90323
90907
|
if (forcibly) {
|
|
90324
|
-
this.
|
|
90325
|
-
this._textValueComputed = value;
|
|
90326
|
-
this.onTextChange();
|
|
90327
|
-
this.createOrUpdateText();
|
|
90908
|
+
this.text.setValue(value, true);
|
|
90328
90909
|
}
|
|
90329
90910
|
else {
|
|
90330
90911
|
this.text = value;
|
|
@@ -90453,7 +91034,7 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
|
|
|
90453
91034
|
promise().then(function (newValue) {
|
|
90454
91035
|
var _a;
|
|
90455
91036
|
if (_this._isSyncEnabled) {
|
|
90456
|
-
var oldValue = (_a = _this.
|
|
91037
|
+
var oldValue = (_a = _this.text.computed) !== null && _a !== void 0 ? _a : null;
|
|
90457
91038
|
if (newValue !== oldValue) {
|
|
90458
91039
|
_this.text = newValue;
|
|
90459
91040
|
_this.onValueChange(newValue, oldValue);
|
|
@@ -90506,11 +91087,8 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
|
|
|
90506
91087
|
});
|
|
90507
91088
|
Object.defineProperty(DTableBodyCellSelectPromise.prototype, "value", {
|
|
90508
91089
|
get: function () {
|
|
90509
|
-
var
|
|
90510
|
-
|
|
90511
|
-
return textValueComputed;
|
|
90512
|
-
}
|
|
90513
|
-
return null;
|
|
91090
|
+
var _a;
|
|
91091
|
+
return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
|
|
90514
91092
|
},
|
|
90515
91093
|
set: function (value) {
|
|
90516
91094
|
this.text = value;
|
|
@@ -90522,10 +91100,7 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
|
|
|
90522
91100
|
this._row = row;
|
|
90523
91101
|
this._rowIndex = rowIndex;
|
|
90524
91102
|
if (forcibly) {
|
|
90525
|
-
this.
|
|
90526
|
-
this._textValueComputed = value;
|
|
90527
|
-
this.onTextChange();
|
|
90528
|
-
this.createOrUpdateText();
|
|
91103
|
+
this.text.setValue(value, true);
|
|
90529
91104
|
}
|
|
90530
91105
|
else {
|
|
90531
91106
|
this.text = value;
|
|
@@ -90980,24 +91555,21 @@ var DTableBodyCellDate = /** @class */ (function (_super) {
|
|
|
90980
91555
|
this._rowIndex = rowIndex;
|
|
90981
91556
|
if (value instanceof Date) {
|
|
90982
91557
|
if (forcibly) {
|
|
90983
|
-
this.
|
|
90984
|
-
this._textValueComputed = value;
|
|
90985
|
-
this.onTextChange();
|
|
90986
|
-
this.createOrUpdateText();
|
|
91558
|
+
this.text.setValue(value, true);
|
|
90987
91559
|
}
|
|
90988
91560
|
else {
|
|
90989
91561
|
this.text = value;
|
|
90990
91562
|
}
|
|
90991
91563
|
}
|
|
90992
91564
|
else if (isNumber(value)) {
|
|
90993
|
-
var
|
|
90994
|
-
|
|
91565
|
+
var text = this.text;
|
|
91566
|
+
var computed = text.computed;
|
|
91567
|
+
if (computed === undefined) {
|
|
90995
91568
|
this.text = new Date(value);
|
|
90996
91569
|
}
|
|
90997
|
-
else if (
|
|
90998
|
-
|
|
90999
|
-
|
|
91000
|
-
this.createOrUpdateText();
|
|
91570
|
+
else if (computed.getTime() !== value) {
|
|
91571
|
+
computed.setTime(value);
|
|
91572
|
+
text.compute(true);
|
|
91001
91573
|
}
|
|
91002
91574
|
}
|
|
91003
91575
|
DTableBodyCells.set(this, row, columnIndex, this._column);
|
|
@@ -91073,24 +91645,21 @@ var DTableBodyCellDatetime = /** @class */ (function (_super) {
|
|
|
91073
91645
|
this._rowIndex = rowIndex;
|
|
91074
91646
|
if (value instanceof Date) {
|
|
91075
91647
|
if (forcibly) {
|
|
91076
|
-
this.
|
|
91077
|
-
this._textValueComputed = value;
|
|
91078
|
-
this.onTextChange();
|
|
91079
|
-
this.createOrUpdateText();
|
|
91648
|
+
this.text.setValue(value, true);
|
|
91080
91649
|
}
|
|
91081
91650
|
else {
|
|
91082
91651
|
this.text = value;
|
|
91083
91652
|
}
|
|
91084
91653
|
}
|
|
91085
91654
|
else if (isNumber(value)) {
|
|
91086
|
-
var
|
|
91087
|
-
|
|
91655
|
+
var text = this.text;
|
|
91656
|
+
var computed = text.computed;
|
|
91657
|
+
if (computed == null) {
|
|
91088
91658
|
this.text = new Date(value);
|
|
91089
91659
|
}
|
|
91090
|
-
else if (
|
|
91091
|
-
|
|
91092
|
-
|
|
91093
|
-
this.createOrUpdateText();
|
|
91660
|
+
else if (computed.getTime() !== value) {
|
|
91661
|
+
computed.setTime(value);
|
|
91662
|
+
text.compute(true);
|
|
91094
91663
|
}
|
|
91095
91664
|
}
|
|
91096
91665
|
DTableBodyCells.set(this, row, columnIndex, this._column);
|
|
@@ -91962,24 +92531,21 @@ var DTableBodyCellTime = /** @class */ (function (_super) {
|
|
|
91962
92531
|
this._rowIndex = rowIndex;
|
|
91963
92532
|
if (value instanceof Date) {
|
|
91964
92533
|
if (forcibly) {
|
|
91965
|
-
this.
|
|
91966
|
-
this._textValueComputed = value;
|
|
91967
|
-
this.onTextChange();
|
|
91968
|
-
this.createOrUpdateText();
|
|
92534
|
+
this.text.setValue(value, true);
|
|
91969
92535
|
}
|
|
91970
92536
|
else {
|
|
91971
92537
|
this.text = value;
|
|
91972
92538
|
}
|
|
91973
92539
|
}
|
|
91974
92540
|
else if (isNumber(value)) {
|
|
91975
|
-
var
|
|
91976
|
-
|
|
92541
|
+
var text = this.text;
|
|
92542
|
+
var computed = text.computed;
|
|
92543
|
+
if (computed == null) {
|
|
91977
92544
|
this.text = new Date(value);
|
|
91978
92545
|
}
|
|
91979
|
-
else if (
|
|
91980
|
-
|
|
91981
|
-
|
|
91982
|
-
this.createOrUpdateText();
|
|
92546
|
+
else if (computed.getTime() !== value) {
|
|
92547
|
+
computed.setTime(value);
|
|
92548
|
+
text.compute(true);
|
|
91983
92549
|
}
|
|
91984
92550
|
}
|
|
91985
92551
|
DTableBodyCells.set(this, row, columnIndex, this._column);
|
|
@@ -99469,8 +100035,8 @@ exports.toLineVertexCount = toLineVertexCount;
|
|
|
99469
100035
|
exports.toLinkOptions = toLinkOptions;
|
|
99470
100036
|
exports.toMerged = toMerged;
|
|
99471
100037
|
exports.toPadded = toPadded;
|
|
100038
|
+
exports.toPointCount = toPointCount;
|
|
99472
100039
|
exports.toPointsBoundary = toPointsBoundary;
|
|
99473
|
-
exports.toPointsCount = toPointsCount;
|
|
99474
100040
|
exports.toResized = toResized;
|
|
99475
100041
|
exports.toScaleInvariant = toScaleInvariant;
|
|
99476
100042
|
exports.toSizeNormalized = toSizeNormalized;
|