@wcardinal/wcardinal-ui 0.372.0 → 0.374.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-align-horizontal.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-align-vertical.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-align-with.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-animation.d.ts +5 -5
- package/dist/types/wcardinal/ui/d-base-interactive.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-base-point.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-base-state-matcher.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-base-state-set-impl-observable.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-base.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-border-mask.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-button-base-when.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-button-file.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-button-select.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-axis-position.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-axis-tick-position.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-direction.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick-major-step-function.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-coordinate-tick-minor-step-function.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-series-scalar.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-color-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-coordinate.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-corner-mask.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-base-controller.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas-editor-snap.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas-tile.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-data-mapper.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-layers.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +6 -6
- package/dist/types/wcardinal/ui/d-dialog-close-on.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dialog-gesture-mode.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dialog-gesture.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dialog-mode.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dialog-select-search-function.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dialog-select.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-dynamic-text-style-word-wrap.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-dynamic-text-style.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-font.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-item-updater.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-layout-clear-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-layout-direction.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-link-menu-item-id.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-link-menu.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-link-target.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-link.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-list-data-selection.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-list-data.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-list-item-accessor.d.ts +6 -6
- package/dist/types/wcardinal/ui/d-map-tile-url-builder.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-menu-item-link.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-menu-item-options-union.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-menu-sided-selection.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-menus.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-on-options.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-picker-datetime-mask.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-picker-datetime.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-scalar-expression.d.ts +7 -7
- package/dist/types/wcardinal/ui/d-scalar-function.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-state-aware.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-table-body-cell-link.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-table-body-cell-options.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-body-cell.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-body-row.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-editing.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-table-column-formatter.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-getter.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-renderable.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-selecting.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-table-column-setter.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-state.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-column-update.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-data-filter.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-table-data-selection.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-table-data-sorter.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-table-data-tree-item-accessor.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-table-data-tree-selection.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-data.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-tree-data-mapped-impl.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-tree-data-selection.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-tree-node-iteratee.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-view-constraint.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-view-to-target.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-view.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-opener.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-blink-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-blink.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color-brightness.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color-code.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color-target.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color-type-legacy.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-cursor.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-text-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-text.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-deserializers.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-emit-event.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-gesture-operation-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-gesture-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-gesture.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-execute.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-on-input-action.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open-dialog-extension.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open-dialog-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open-dialog.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-show-hide-layer.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-show-hide-shape.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-show-hide-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-show-hide.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-move-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-move.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-resize-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-resize.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-rotate-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-rotate.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-transform-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-edge-side.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-edge-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-capability.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-container-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-container.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container-impl.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container.d.ts +3 -2
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/e-shape-copy-part.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-corner.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-mapping.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-value-formatter.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-value-order.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-value-range.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-value-scope.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-value-state.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-data-value-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-deleter.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/e-shape-deserializers.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/e-shape-points-formatted.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/e-shape-points-formatter.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-marker-container.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-marker-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-marker.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-style.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-styles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-resource-manager-deserialization-mode.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-runtime-reset.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-runtimes.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-stroke-side.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-stroke-style.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-text-align-horizontal.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-text-align-vertical.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-text-direction.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-text.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/e-shape-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-uploaded-constructor.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-uploadeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape.d.ts +6 -8
- package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/create-line-of-any-uploaded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-bar.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-button.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-circle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-elbow.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-embedded-acceptor-edge.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-group-shadowed.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-group.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-image-sdf.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-image.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-label.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-circles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-null.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-semicircle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-bar-position.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +10 -13
- package/dist/types/wcardinal/ui/shape/variant/e-shape-connector-line.d.ts +6 -5
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size-parent.d.ts +4 -3
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-base-hit-part.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-base-points-hit-tester-to-range.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-base-points-hit-tester-to-threshold.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-base-points-hit-tester.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-any-points-hit-tester-to-range.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-any-points-hit-tester-to-threshold.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-any-points-hit-tester.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-any-value.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-line-points.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/e-shape-lock-part.d.ts +8 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-lock.d.ts +9 -0
- package/dist/types/wcardinal/ui/shape/variant/index.d.ts +2 -0
- package/dist/types/wcardinal/ui/snapper/e-snapper-target-value.d.ts +1 -1
- package/dist/types/wcardinal/ui/snapper/e-snapper.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/deep-partial.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/dynamic-font-atlas-character-type.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/dynamic-font-atlas-characters.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-generator.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/number-formatter-function.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-attach.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-click-outside.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-curve.d.ts +2 -2
- package/dist/types/wcardinal/ui/util/util-file-opener.d.ts +2 -2
- package/dist/types/wcardinal/ui/util/util-gesture-easing.d.ts +2 -2
- package/dist/types/wcardinal/ui/util/util-gesture-mode.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-gesture-modifier.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-gesture-modifiers.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-gesture.d.ts +7 -7
- package/dist/types/wcardinal/ui/util/util-html-element-when.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-html-element.d.ts +7 -7
- package/dist/types/wcardinal/ui/util/util-pointer-event.d.ts +2 -2
- package/dist/types/wcardinal/ui/util/util-wheel-event.d.ts +2 -2
- package/dist/wcardinal/ui/d-animation-base.js +1 -2
- package/dist/wcardinal/ui/d-animation-base.js.map +1 -1
- package/dist/wcardinal/ui/d-animation-empty.js +1 -2
- package/dist/wcardinal/ui/d-animation-empty.js.map +1 -1
- package/dist/wcardinal/ui/d-animation-fade-in.js +1 -2
- package/dist/wcardinal/ui/d-animation-fade-in.js.map +1 -1
- package/dist/wcardinal/ui/d-base.js +1 -2
- package/dist/wcardinal/ui/d-base.js.map +1 -1
- package/dist/wcardinal/ui/d-button-select.js +1 -2
- package/dist/wcardinal/ui/d-button-select.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js +3 -2
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +7 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-guide-simple-shape-impl.js +7 -6
- package/dist/wcardinal/ui/d-chart-axis-guide-simple-shape-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-simple.js +1 -2
- package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +1 -2
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js +4 -4
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-line.js +4 -4
- package/dist/wcardinal/ui/d-chart-series-line.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js +3 -2
- package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-base.js +1 -2
- package/dist/wcardinal/ui/d-diagram-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-base.js +1 -2
- package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js +5 -4
- package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-processing.js +1 -2
- package/dist/wcardinal/ui/d-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select.js +1 -2
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/d-menu-item-base.js +1 -2
- package/dist/wcardinal/ui/d-menu-item-base.js.map +1 -1
- package/dist/wcardinal/ui/d-menu-sided-selection.js +1 -2
- package/dist/wcardinal/ui/d-menu-sided-selection.js.map +1 -1
- package/dist/wcardinal/ui/d-menu-sided.js +1 -2
- package/dist/wcardinal/ui/d-menu-sided.js.map +1 -1
- package/dist/wcardinal/ui/d-pagination.js +1 -2
- package/dist/wcardinal/ui/d-pagination.js.map +1 -1
- package/dist/wcardinal/ui/d-pane.js +1 -2
- package/dist/wcardinal/ui/d-pane.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar.js +1 -2
- package/dist/wcardinal/ui/d-scroll-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-slider-value.js +1 -2
- package/dist/wcardinal/ui/d-slider-value.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-button.js +1 -2
- package/dist/wcardinal/ui/d-table-body-cell-button.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +1 -2
- 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 +1 -2
- package/dist/wcardinal/ui/d-table-body-cell-select-promise.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body.js +1 -2
- package/dist/wcardinal/ui/d-table-body.js.map +1 -1
- package/dist/wcardinal/ui/d-table-category.js +1 -2
- package/dist/wcardinal/ui/d-table-category.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-list-selection.js +1 -2
- package/dist/wcardinal/ui/d-table-data-list-selection.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree-selection-impl.js +1 -2
- package/dist/wcardinal/ui/d-table-data-tree-selection-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-table-header.js +1 -2
- package/dist/wcardinal/ui/d-table-header.js.map +1 -1
- package/dist/wcardinal/ui/d-table-row.js +1 -2
- package/dist/wcardinal/ui/d-table-row.js.map +1 -1
- package/dist/wcardinal/ui/d-tree-data-mapped-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-tree-item-button.js +1 -2
- package/dist/wcardinal/ui/d-tree-item-button.js.map +1 -1
- package/dist/wcardinal/ui/d-view-impl.js +1 -2
- package/dist/wcardinal/ui/d-view-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capability.js +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capability.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-container-impl.js +4 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js +3 -3
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +2 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-deleter.js +18 -2
- package/dist/wcardinal/ui/shape/e-shape-deleter.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js +5 -4
- package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-transforms.js +5 -4
- package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +3 -2
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +59 -73
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +18 -18
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js +33 -26
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-layout.js +3 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-layout.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-parent.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group.js +2 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-lock-part.js +8 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-lock-part.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-lock.js +31 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-lock.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/index.js +2 -0
- package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-resized.js +3 -2
- package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -1
- package/dist/wcardinal/ui/snapper/e-snapper-grid.js +1 -2
- package/dist/wcardinal/ui/snapper/e-snapper-grid.js.map +1 -1
- package/dist/wcardinal/ui/snapper/e-snapper-target.js +1 -2
- package/dist/wcardinal/ui/snapper/e-snapper-target.js.map +1 -1
- package/dist/wcardinal/ui/snapper/e-snapper.js +1 -2
- package/dist/wcardinal/ui/snapper/e-snapper.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-atlas.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-atlas.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-atlas.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-atlas.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js.map +1 -1
- package/dist/wcardinal/ui/util/util-input-number.js +1 -2
- package/dist/wcardinal/ui/util/util-input-number.js.map +1 -1
- package/dist/wcardinal/ui/util/util-input.js +1 -2
- package/dist/wcardinal/ui/util/util-input.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +251 -240
- package/dist/wcardinal-ui.js +249 -238
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -11,6 +11,8 @@ import { EShapeDefaults } from "../e-shape-defaults";
|
|
|
11
11
|
import { EShapeCopyPart } from "../e-shape-copy-part";
|
|
12
12
|
import { toPointsBoundary } from "../e-shape-points-formatted";
|
|
13
13
|
import { EShapeConnectorBodyImpl } from "../e-shape-connector-body-impl";
|
|
14
|
+
import { EShapeLockPart } from "./e-shape-lock-part";
|
|
15
|
+
import { EShapeLock } from "./e-shape-lock";
|
|
14
16
|
var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
15
17
|
__extends(EShapeConnectorLine, _super);
|
|
16
18
|
function EShapeConnectorLine(type) {
|
|
@@ -23,8 +25,7 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
23
25
|
_this._headNormalId = 0;
|
|
24
26
|
_this._headMargin = 0;
|
|
25
27
|
_this._bodyId = 0;
|
|
26
|
-
_this.
|
|
27
|
-
_this._isChanged = false;
|
|
28
|
+
_this._lockChange = new EShapeLock();
|
|
28
29
|
var sx = EShapeDefaults.SIZE_X;
|
|
29
30
|
var sy = EShapeDefaults.SIZE_Y;
|
|
30
31
|
var hx = sx * 0.5;
|
|
@@ -37,20 +38,20 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
37
38
|
_this._body = new EShapeConnectorBodyImpl(_this, onChangeBound);
|
|
38
39
|
return _this;
|
|
39
40
|
}
|
|
40
|
-
EShapeConnectorLine.prototype.lock = function () {
|
|
41
|
-
this
|
|
42
|
-
if (
|
|
43
|
-
this.
|
|
41
|
+
EShapeConnectorLine.prototype.lock = function (part) {
|
|
42
|
+
_super.prototype.lock.call(this, part);
|
|
43
|
+
if (part & EShapeLockPart.CONNECTOR) {
|
|
44
|
+
this._lockChange.lock();
|
|
44
45
|
}
|
|
46
|
+
return this;
|
|
45
47
|
};
|
|
46
|
-
EShapeConnectorLine.prototype.unlock = function () {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (this._isChanged) {
|
|
48
|
+
EShapeConnectorLine.prototype.unlock = function (part, invoke) {
|
|
49
|
+
if (part & EShapeLockPart.CONNECTOR) {
|
|
50
|
+
if (this._lockChange.unlock() && invoke) {
|
|
50
51
|
this.onChange();
|
|
51
52
|
}
|
|
52
|
-
this._isChanged = false;
|
|
53
53
|
}
|
|
54
|
+
return _super.prototype.unlock.call(this, part, invoke);
|
|
54
55
|
};
|
|
55
56
|
Object.defineProperty(EShapeConnectorLine.prototype, "points", {
|
|
56
57
|
get: function () {
|
|
@@ -77,14 +78,13 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
77
78
|
_super.prototype.onAttach.call(this);
|
|
78
79
|
this._edge.attach();
|
|
79
80
|
};
|
|
80
|
-
EShapeConnectorLine.prototype.onDetach = function () {
|
|
81
|
-
this._edge.detach();
|
|
82
|
-
_super.prototype.onDetach.call(this);
|
|
81
|
+
EShapeConnectorLine.prototype.onDetach = function (exceptions) {
|
|
82
|
+
this._edge.detach(exceptions);
|
|
83
|
+
_super.prototype.onDetach.call(this, exceptions);
|
|
83
84
|
};
|
|
84
85
|
EShapeConnectorLine.prototype.onChange = function () {
|
|
85
86
|
var _a;
|
|
86
|
-
if (
|
|
87
|
-
this._isChanged = true;
|
|
87
|
+
if (this._lockChange.isLocked()) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
var edge = this._edge;
|
|
@@ -132,7 +132,7 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
132
132
|
values[i + 0] -= cx;
|
|
133
133
|
values[i + 1] -= cy;
|
|
134
134
|
}
|
|
135
|
-
this.
|
|
135
|
+
this.lock(EShapeLockPart.TRANSFORM_AND_UPLOADED);
|
|
136
136
|
transformPosition.set(px + cx, py + cy);
|
|
137
137
|
transform.scale.set(1, 1);
|
|
138
138
|
transform.rotation = 0;
|
|
@@ -140,7 +140,7 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
140
140
|
points.toFitted(sx, sy);
|
|
141
141
|
this.size.set(sx, sy);
|
|
142
142
|
points.set(values);
|
|
143
|
-
this.
|
|
143
|
+
this.unlock(EShapeLockPart.TRANSFORM_AND_UPLOADED, true);
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
EShapeConnectorLine.prototype.fillPoints = function (tail, tailMargin, head, headMargin, body, px, py, values) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAGzE;IAAyC,uCAAc;IAetD,6BAAY,IAA4C;QAA5C,qBAAA,EAAA,OAAmB,UAAU,CAAC,cAAc;QAAxD,YACC,kBAAM,IAAI,CAAC,SAoBX;QAnBA,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,KAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,KAAI,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AAM,MAAM,GAAG,iBAAM,SAAS,YAAC,OAAO,CAAC,CAAC;QACxC,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,WAAI,MAAM,cAAI,QAAQ,cAAI,MAAM,MAAG,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC;IACf,CAAC;IACF,0BAAC;AAAD,CAAC,AA5PD,CAAyC,cAAc,GA4PtD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeConnector } from \"../e-shape-connector\";\nimport { EShapeConnectorEdgeContainer } from \"../e-shape-connector-edge-container\";\nimport { EShapeConnectorEdgeContainerImpl } from \"../e-shape-connector-edge-container-impl\";\nimport { EShapeLineBase } from \"./e-shape-line-base\";\nimport { EShapeLinePoints } from \"./e-shape-line-points\";\nimport { EShapeDefaults } from \"../e-shape-defaults\";\nimport { EShapeCopyPart } from \"../e-shape-copy-part\";\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShape } from \"../e-shape\";\nimport { toPointsBoundary } from \"../e-shape-points-formatted\";\nimport { EShapeConnectorBody } from \"../e-shape-connector-body\";\nimport { EShapeConnectorBodyImpl } from \"../e-shape-connector-body-impl\";\nimport { EShapeConnectorEdge } from \"../e-shape-connector-edge\";\n\nexport class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {\n\tprotected static WORK_BOUNDARY: [number, number, number, number];\n\tprotected _edge: EShapeConnectorEdgeContainer;\n\tprotected _body: EShapeConnectorBody;\n\tprotected declare _points: EShapeLinePoints;\n\tprotected _tailLocalId: number;\n\tprotected _tailNormalId: number;\n\tprotected _tailMargin: number;\n\tprotected _headLocalId: number;\n\tprotected _headNormalId: number;\n\tprotected _headMargin: number;\n\tprotected _bodyId: number;\n\tprotected _lockCount: number;\n\tprotected _isChanged: boolean;\n\n\tconstructor(type: EShapeType = EShapeType.CONNECTOR_LINE) {\n\t\tsuper(type);\n\t\tthis._tailLocalId = 0;\n\t\tthis._tailNormalId = 0;\n\t\tthis._tailMargin = 0;\n\t\tthis._headLocalId = 0;\n\t\tthis._headNormalId = 0;\n\t\tthis._headMargin = 0;\n\t\tthis._bodyId = 0;\n\t\tthis._lockCount = 0;\n\t\tthis._isChanged = false;\n\t\tconst sx = EShapeDefaults.SIZE_X;\n\t\tconst sy = EShapeDefaults.SIZE_Y;\n\t\tconst hx = sx * 0.5;\n\t\tconst hy = sy * 0.5;\n\t\tthis._points = new EShapeLinePoints(this).set([-hx, -hy, +hx, +hy]);\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tthis._edge = new EShapeConnectorEdgeContainerImpl(this, onChangeBound);\n\t\tthis._body = new EShapeConnectorBodyImpl(this, onChangeBound);\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tif (this._isChanged) {\n\t\t\t\tthis.onChange();\n\t\t\t}\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tget points(): EShapeLinePoints {\n\t\treturn this._points;\n\t}\n\n\tget edge(): EShapeConnectorEdgeContainer {\n\t\treturn this._edge;\n\t}\n\n\tget body(): EShapeConnectorBody {\n\t\treturn this._body;\n\t}\n\n\tonAttach(): void {\n\t\tsuper.onAttach();\n\t\tthis._edge.attach();\n\t}\n\n\tonDetach(): void {\n\t\tthis._edge.detach();\n\t\tsuper.onDetach();\n\t}\n\n\tprotected onChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isChanged = true;\n\t\t\treturn;\n\t\t}\n\n\t\tconst edge = this._edge;\n\t\tconst tail = edge.tail;\n\t\tconst tailLocalId = tail.localId;\n\t\tconst tailNormalId = tail.normalId;\n\t\tconst tailMargin = tail.margin;\n\t\tconst head = edge.head;\n\t\tconst headLocalId = head.localId;\n\t\tconst headNormalId = head.normalId;\n\t\tconst headMargin = head.margin;\n\t\tconst body = this._body;\n\t\tconst bodyId = body.id;\n\t\tif (\n\t\t\tthis._tailLocalId !== tailLocalId ||\n\t\t\tthis._tailNormalId !== tailNormalId ||\n\t\t\tthis._tailMargin !== tailMargin ||\n\t\t\tthis._headLocalId !== headLocalId ||\n\t\t\tthis._headNormalId !== headNormalId ||\n\t\t\tthis._headMargin !== headMargin ||\n\t\t\tthis._bodyId !== bodyId\n\t\t) {\n\t\t\tthis._tailLocalId = tailLocalId;\n\t\t\tthis._tailNormalId = tailNormalId;\n\t\t\tthis._tailMargin = tailMargin;\n\t\t\tthis._headLocalId = headLocalId;\n\t\t\tthis._headNormalId = headNormalId;\n\t\t\tthis._headMargin = headMargin;\n\t\t\tthis._bodyId !== bodyId;\n\n\t\t\tconst transform = this.transform;\n\t\t\tconst transformPosition = transform.position;\n\t\t\tconst px = transformPosition.x;\n\t\t\tconst py = transformPosition.y;\n\t\t\tconst points = this._points;\n\t\t\tconst values = points.values;\n\n\t\t\t// Fill points\n\t\t\tthis.fillPoints(tail, tailMargin, head, headMargin, body, px, py, values);\n\n\t\t\t// Center & size\n\t\t\tconst boundary = (EShapeConnectorLine.WORK_BOUNDARY ??= [0, 0, 0, 0]);\n\t\t\ttoPointsBoundary(values, boundary);\n\t\t\tconst cx = (boundary[2] + boundary[0]) * 0.5;\n\t\t\tconst cy = (boundary[3] + boundary[1]) * 0.5;\n\t\t\tconst sx = boundary[2] - boundary[0];\n\t\t\tconst sy = boundary[3] - boundary[1];\n\n\t\t\t// Adjust values\n\t\t\tfor (let i = 0, imax = values.length; i < imax; i += 2) {\n\t\t\t\tvalues[i + 0] -= cx;\n\t\t\t\tvalues[i + 1] -= cy;\n\t\t\t}\n\n\t\t\tthis.disallowUploadedUpdate();\n\t\t\ttransformPosition.set(px + cx, py + cy);\n\t\t\ttransform.scale.set(1, 1);\n\t\t\ttransform.rotation = 0;\n\t\t\ttransform.skew.set(0, 0);\n\t\t\tpoints.toFitted(sx, sy);\n\t\t\tthis.size.set(sx, sy);\n\t\t\tpoints.set(values);\n\t\t\tthis.allowUploadedUpdate();\n\t\t}\n\t}\n\n\tprotected fillPoints(\n\t\ttail: EShapeConnectorEdge,\n\t\ttailMargin: number,\n\t\thead: EShapeConnectorEdge,\n\t\theadMargin: number,\n\t\tbody: EShapeConnectorBody,\n\t\tpx: number,\n\t\tpy: number,\n\t\tvalues: number[]\n\t): void {\n\t\t// Tail\n\t\tconst threshold = 0.000001;\n\t\tconst tailLocal = tail.local;\n\t\tconst tailLocalX = tailLocal.x;\n\t\tconst tailLocalY = tailLocal.y;\n\t\tconst x0 = tailLocalX - px;\n\t\tconst y0 = tailLocalY - py;\n\n\t\t// Head\n\t\tconst headLocal = head.local;\n\t\tconst headLocalX = headLocal.x;\n\t\tconst headLocalY = headLocal.y;\n\t\tconst x1 = headLocalX - px;\n\t\tconst y1 = headLocalY - py;\n\n\t\t// Body\n\t\tconst bodyValues = body.values;\n\t\tconst bodyValuesLength = bodyValues.length;\n\n\t\t// Tail points\n\t\tvalues[0] = x0;\n\t\tvalues[1] = y0;\n\n\t\t// Body points\n\t\tif (0 < bodyValuesLength) {\n\t\t\tconst cx = (x1 + x0) * 0.5;\n\t\t\tconst cy = (y1 + y0) * 0.5;\n\t\t\tconst dx = x1 - x0;\n\t\t\tconst dy = y1 - y0;\n\t\t\tconst a = Math.atan2(dy, dx);\n\t\t\tconst c = Math.cos(a);\n\t\t\tconst s = Math.sin(a);\n\t\t\tconst l = Math.sqrt(dx * dx + dy * dy);\n\t\t\tfor (let i = 0; i < bodyValuesLength; i += 2) {\n\t\t\t\tconst x = bodyValues[i + 0];\n\t\t\t\tconst y = bodyValues[i + 1];\n\t\t\t\tvalues[i + 2] = cx + (c * x - s * y) * l;\n\t\t\t\tvalues[i + 3] = cy + (c * y + s * x) * l;\n\t\t\t}\n\t\t}\n\n\t\t// Head points\n\t\tvalues[2 + bodyValuesLength] = x1;\n\t\tvalues[3 + bodyValuesLength] = y1;\n\n\t\t// Tail margin\n\t\tif (tailMargin !== 0) {\n\t\t\tconst dx = values[2] - x0;\n\t\t\tconst dy = values[3] - y0;\n\t\t\tconst d = dx * dx + dy * dy;\n\t\t\tif (threshold < d) {\n\t\t\t\tconst f = tailMargin / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tvalues[0] = x0 + dx * f;\n\t\t\t\tvalues[1] = y0 + dy * f;\n\t\t\t}\n\t\t}\n\n\t\t// Head margin\n\t\tif (headMargin !== 0) {\n\t\t\tconst dx = values[0 + bodyValuesLength] - x1;\n\t\t\tconst dy = values[1 + bodyValuesLength] - y1;\n\t\t\tconst d = dx * dx + dy * dy;\n\t\t\tif (threshold < d) {\n\t\t\t\tconst f = headMargin / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tvalues[2 + bodyValuesLength] = x1 + dx * f;\n\t\t\t\tvalues[3 + bodyValuesLength] = y1 + dy * f;\n\t\t\t}\n\t\t}\n\n\t\t// Remove the rest\n\t\tvalues.length = bodyValuesLength + 4;\n\t}\n\n\tcopy(source: EShape, part: EShapeCopyPart = EShapeCopyPart.ALL): this {\n\t\tsuper.copy(source, part);\n\t\tif (source instanceof EShapeConnectorLine) {\n\t\t\tthis._edge.copy(source.edge);\n\t\t\tthis._body.copy(source.body);\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone(): EShapeConnectorLine {\n\t\tconst constructor = this.constructor as typeof EShapeConnectorLine;\n\t\treturn new constructor(this.type).copy(this);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem {\n\t\tconst result = super.serialize(manager);\n\t\tconst edgeId = this._edge.serialize(manager);\n\t\tconst bodyId = this._body.serialize(manager);\n\t\tconst pointsId = this._points.serialize(manager);\n\t\tresult[15] = manager.addResource(`[${edgeId},${pointsId},${bodyId}]`);\n\t\treturn result;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;IAAyC,uCAAc;IActD,6BAAY,IAA4C;QAA5C,qBAAA,EAAA,OAAmB,UAAU,CAAC,cAAc;QAAxD,YACC,kBAAM,IAAI,CAAC,SAmBX;QAlBA,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,aAA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CAAC,IAAI,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,mCAAK,GAAL;QACC,IAAM,WAAW,GAAG,IAAI,CAAC,WAAyC,CAAC;QACnE,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,uCAAS,GAAT,UAAU,OAA2C;QACpD,IAAM,MAAM,GAAG,iBAAM,SAAS,YAAC,OAAO,CAAC,CAAC;QACxC,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,WAAI,MAAM,cAAI,QAAQ,cAAI,MAAM,MAAG,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC;IACf,CAAC;IACF,0BAAC;AAAD,CAAC,AAzPD,CAAyC,cAAc,GAyPtD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeConnector } from \"../e-shape-connector\";\nimport { EShapeConnectorEdgeContainer } from \"../e-shape-connector-edge-container\";\nimport { EShapeConnectorEdgeContainerImpl } from \"../e-shape-connector-edge-container-impl\";\nimport { EShapeLineBase } from \"./e-shape-line-base\";\nimport { EShapeLinePoints } from \"./e-shape-line-points\";\nimport { EShapeDefaults } from \"../e-shape-defaults\";\nimport { EShapeCopyPart } from \"../e-shape-copy-part\";\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShape } from \"../e-shape\";\nimport { toPointsBoundary } from \"../e-shape-points-formatted\";\nimport { EShapeConnectorBody } from \"../e-shape-connector-body\";\nimport { EShapeConnectorBodyImpl } from \"../e-shape-connector-body-impl\";\nimport { EShapeConnectorEdge } from \"../e-shape-connector-edge\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\nimport { EShapeLock } from \"./e-shape-lock\";\n\nexport class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {\n\tprotected static WORK_BOUNDARY: [number, number, number, number];\n\tprotected _edge: EShapeConnectorEdgeContainer;\n\tprotected _body: EShapeConnectorBody;\n\tprotected declare _points: EShapeLinePoints;\n\tprotected _tailLocalId: number;\n\tprotected _tailNormalId: number;\n\tprotected _tailMargin: number;\n\tprotected _headLocalId: number;\n\tprotected _headNormalId: number;\n\tprotected _headMargin: number;\n\tprotected _bodyId: number;\n\tprotected _lockChange: EShapeLock;\n\n\tconstructor(type: EShapeType = EShapeType.CONNECTOR_LINE) {\n\t\tsuper(type);\n\t\tthis._tailLocalId = 0;\n\t\tthis._tailNormalId = 0;\n\t\tthis._tailMargin = 0;\n\t\tthis._headLocalId = 0;\n\t\tthis._headNormalId = 0;\n\t\tthis._headMargin = 0;\n\t\tthis._bodyId = 0;\n\t\tthis._lockChange = new EShapeLock();\n\t\tconst sx = EShapeDefaults.SIZE_X;\n\t\tconst sy = EShapeDefaults.SIZE_Y;\n\t\tconst hx = sx * 0.5;\n\t\tconst hy = sy * 0.5;\n\t\tthis._points = new EShapeLinePoints(this).set([-hx, -hy, +hx, +hy]);\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tthis._edge = new EShapeConnectorEdgeContainerImpl(this, onChangeBound);\n\t\tthis._body = new EShapeConnectorBodyImpl(this, onChangeBound);\n\t}\n\n\toverride lock(part: EShapeLockPart): this {\n\t\tsuper.lock(part);\n\t\tif (part & EShapeLockPart.CONNECTOR) {\n\t\t\tthis._lockChange.lock();\n\t\t}\n\t\treturn this;\n\t}\n\n\toverride unlock(part: EShapeLockPart, invoke: boolean): this {\n\t\tif (part & EShapeLockPart.CONNECTOR) {\n\t\t\tif (this._lockChange.unlock() && invoke) {\n\t\t\t\tthis.onChange();\n\t\t\t}\n\t\t}\n\t\treturn super.unlock(part, invoke);\n\t}\n\n\tget points(): EShapeLinePoints {\n\t\treturn this._points;\n\t}\n\n\tget edge(): EShapeConnectorEdgeContainer {\n\t\treturn this._edge;\n\t}\n\n\tget body(): EShapeConnectorBody {\n\t\treturn this._body;\n\t}\n\n\tonAttach(): void {\n\t\tsuper.onAttach();\n\t\tthis._edge.attach();\n\t}\n\n\tonDetach(exceptions?: Set<EShape>): void {\n\t\tthis._edge.detach(exceptions);\n\t\tsuper.onDetach(exceptions);\n\t}\n\n\tprotected onChange(): void {\n\t\tif (this._lockChange.isLocked()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst edge = this._edge;\n\t\tconst tail = edge.tail;\n\t\tconst tailLocalId = tail.localId;\n\t\tconst tailNormalId = tail.normalId;\n\t\tconst tailMargin = tail.margin;\n\t\tconst head = edge.head;\n\t\tconst headLocalId = head.localId;\n\t\tconst headNormalId = head.normalId;\n\t\tconst headMargin = head.margin;\n\t\tconst body = this._body;\n\t\tconst bodyId = body.id;\n\t\tif (\n\t\t\tthis._tailLocalId !== tailLocalId ||\n\t\t\tthis._tailNormalId !== tailNormalId ||\n\t\t\tthis._tailMargin !== tailMargin ||\n\t\t\tthis._headLocalId !== headLocalId ||\n\t\t\tthis._headNormalId !== headNormalId ||\n\t\t\tthis._headMargin !== headMargin ||\n\t\t\tthis._bodyId !== bodyId\n\t\t) {\n\t\t\tthis._tailLocalId = tailLocalId;\n\t\t\tthis._tailNormalId = tailNormalId;\n\t\t\tthis._tailMargin = tailMargin;\n\t\t\tthis._headLocalId = headLocalId;\n\t\t\tthis._headNormalId = headNormalId;\n\t\t\tthis._headMargin = headMargin;\n\t\t\tthis._bodyId !== bodyId;\n\n\t\t\tconst transform = this.transform;\n\t\t\tconst transformPosition = transform.position;\n\t\t\tconst px = transformPosition.x;\n\t\t\tconst py = transformPosition.y;\n\t\t\tconst points = this._points;\n\t\t\tconst values = points.values;\n\n\t\t\t// Fill points\n\t\t\tthis.fillPoints(tail, tailMargin, head, headMargin, body, px, py, values);\n\n\t\t\t// Center & size\n\t\t\tconst boundary = (EShapeConnectorLine.WORK_BOUNDARY ??= [0, 0, 0, 0]);\n\t\t\ttoPointsBoundary(values, boundary);\n\t\t\tconst cx = (boundary[2] + boundary[0]) * 0.5;\n\t\t\tconst cy = (boundary[3] + boundary[1]) * 0.5;\n\t\t\tconst sx = boundary[2] - boundary[0];\n\t\t\tconst sy = boundary[3] - boundary[1];\n\n\t\t\t// Adjust values\n\t\t\tfor (let i = 0, imax = values.length; i < imax; i += 2) {\n\t\t\t\tvalues[i + 0] -= cx;\n\t\t\t\tvalues[i + 1] -= cy;\n\t\t\t}\n\n\t\t\tthis.lock(EShapeLockPart.TRANSFORM_AND_UPLOADED);\n\t\t\ttransformPosition.set(px + cx, py + cy);\n\t\t\ttransform.scale.set(1, 1);\n\t\t\ttransform.rotation = 0;\n\t\t\ttransform.skew.set(0, 0);\n\t\t\tpoints.toFitted(sx, sy);\n\t\t\tthis.size.set(sx, sy);\n\t\t\tpoints.set(values);\n\t\t\tthis.unlock(EShapeLockPart.TRANSFORM_AND_UPLOADED, true);\n\t\t}\n\t}\n\n\tprotected fillPoints(\n\t\ttail: EShapeConnectorEdge,\n\t\ttailMargin: number,\n\t\thead: EShapeConnectorEdge,\n\t\theadMargin: number,\n\t\tbody: EShapeConnectorBody,\n\t\tpx: number,\n\t\tpy: number,\n\t\tvalues: number[]\n\t): void {\n\t\t// Tail\n\t\tconst threshold = 0.000001;\n\t\tconst tailLocal = tail.local;\n\t\tconst tailLocalX = tailLocal.x;\n\t\tconst tailLocalY = tailLocal.y;\n\t\tconst x0 = tailLocalX - px;\n\t\tconst y0 = tailLocalY - py;\n\n\t\t// Head\n\t\tconst headLocal = head.local;\n\t\tconst headLocalX = headLocal.x;\n\t\tconst headLocalY = headLocal.y;\n\t\tconst x1 = headLocalX - px;\n\t\tconst y1 = headLocalY - py;\n\n\t\t// Body\n\t\tconst bodyValues = body.values;\n\t\tconst bodyValuesLength = bodyValues.length;\n\n\t\t// Tail points\n\t\tvalues[0] = x0;\n\t\tvalues[1] = y0;\n\n\t\t// Body points\n\t\tif (0 < bodyValuesLength) {\n\t\t\tconst cx = (x1 + x0) * 0.5;\n\t\t\tconst cy = (y1 + y0) * 0.5;\n\t\t\tconst dx = x1 - x0;\n\t\t\tconst dy = y1 - y0;\n\t\t\tconst a = Math.atan2(dy, dx);\n\t\t\tconst c = Math.cos(a);\n\t\t\tconst s = Math.sin(a);\n\t\t\tconst l = Math.sqrt(dx * dx + dy * dy);\n\t\t\tfor (let i = 0; i < bodyValuesLength; i += 2) {\n\t\t\t\tconst x = bodyValues[i + 0];\n\t\t\t\tconst y = bodyValues[i + 1];\n\t\t\t\tvalues[i + 2] = cx + (c * x - s * y) * l;\n\t\t\t\tvalues[i + 3] = cy + (c * y + s * x) * l;\n\t\t\t}\n\t\t}\n\n\t\t// Head points\n\t\tvalues[2 + bodyValuesLength] = x1;\n\t\tvalues[3 + bodyValuesLength] = y1;\n\n\t\t// Tail margin\n\t\tif (tailMargin !== 0) {\n\t\t\tconst dx = values[2] - x0;\n\t\t\tconst dy = values[3] - y0;\n\t\t\tconst d = dx * dx + dy * dy;\n\t\t\tif (threshold < d) {\n\t\t\t\tconst f = tailMargin / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tvalues[0] = x0 + dx * f;\n\t\t\t\tvalues[1] = y0 + dy * f;\n\t\t\t}\n\t\t}\n\n\t\t// Head margin\n\t\tif (headMargin !== 0) {\n\t\t\tconst dx = values[0 + bodyValuesLength] - x1;\n\t\t\tconst dy = values[1 + bodyValuesLength] - y1;\n\t\t\tconst d = dx * dx + dy * dy;\n\t\t\tif (threshold < d) {\n\t\t\t\tconst f = headMargin / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tvalues[2 + bodyValuesLength] = x1 + dx * f;\n\t\t\t\tvalues[3 + bodyValuesLength] = y1 + dy * f;\n\t\t\t}\n\t\t}\n\n\t\t// Remove the rest\n\t\tvalues.length = bodyValuesLength + 4;\n\t}\n\n\tcopy(source: EShape, part: EShapeCopyPart = EShapeCopyPart.ALL): this {\n\t\tsuper.copy(source, part);\n\t\tif (source instanceof EShapeConnectorLine) {\n\t\t\tthis._edge.copy(source.edge);\n\t\t\tthis._body.copy(source.body);\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone(): EShapeConnectorLine {\n\t\tconst constructor = this.constructor as typeof EShapeConnectorLine;\n\t\treturn new constructor(this.type).copy(this);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem {\n\t\tconst result = super.serialize(manager);\n\t\tconst edgeId = this._edge.serialize(manager);\n\t\tconst bodyId = this._body.serialize(manager);\n\t\tconst pointsId = this._points.serialize(manager);\n\t\tresult[15] = manager.addResource(`[${edgeId},${pointsId},${bodyId}]`);\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Point, Rectangle } from "pixi.js";
|
|
6
6
|
import { EShapeGroupSizeLayout } from "./e-shape-group-size-layout";
|
|
7
|
+
import { EShapeLockPart } from "./e-shape-lock-part";
|
|
7
8
|
var EShapeGroupSizeEditor = /** @class */ (function () {
|
|
8
9
|
function EShapeGroupSizeEditor(parent, x, y, isFittable) {
|
|
9
10
|
this._workRectForCalcRect = new Rectangle();
|
|
@@ -98,41 +99,43 @@ var EShapeGroupSizeEditor = /** @class */ (function () {
|
|
|
98
99
|
};
|
|
99
100
|
EShapeGroupSizeEditor.prototype.doFit = function () {
|
|
100
101
|
var parent = this._parent;
|
|
101
|
-
parent.
|
|
102
|
+
parent.lock(EShapeLockPart.TRANSFORM | EShapeLockPart.TRANSFORM_PARENT);
|
|
102
103
|
// Calculate the rect
|
|
103
104
|
var rect = this.calcRect(this._workRectForFit);
|
|
104
105
|
// Set size
|
|
105
106
|
var size = this._size;
|
|
106
107
|
size.set(rect.width, rect.height);
|
|
107
|
-
//
|
|
108
|
-
// rx := rect.x
|
|
109
|
-
// ry := rect.y
|
|
108
|
+
// Calculating new position & pivot
|
|
110
109
|
//
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
// | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 |
|
|
110
|
+
// cx := rect.x + rect.width * 0.5
|
|
111
|
+
// cy := rect.y + rect.height * 0.5
|
|
114
112
|
//
|
|
115
|
-
//
|
|
116
|
-
// ty -> ty + (b * rx + d * ry) = poxition.y - (b * pivot.x + d * pivot.y)
|
|
117
|
-
// position.x -> position.x + (a * rx + c * ry) - (a * pivot.x + c * pivot.y)
|
|
118
|
-
// position.y -> position.y + (b * rx + d * ry) - (b * pivot.x + d * pivot.y)
|
|
119
|
-
// pivot.x -> 0
|
|
120
|
-
// pivot.y -> 0
|
|
113
|
+
// Since the local transform need to be unchanged:
|
|
121
114
|
//
|
|
122
|
-
// a
|
|
115
|
+
// | a c tx | | a c px' - (a * pvx' + c * pvy') |
|
|
116
|
+
// | b d ty | = | b d py' - (b * pvx' + d * pvy') |
|
|
117
|
+
// | 0 0 1 | | 0 0 1 |
|
|
123
118
|
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
// | 0 0 1 | | 0 0 1 | | 0 0 1 |
|
|
119
|
+
// Here, (px', py') and (pvx', pvy') are the new position
|
|
120
|
+
// and the new pivot, respectively.
|
|
127
121
|
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
122
|
+
// Setting the new pivot (pvx', pvy') to (cx, cy) leads to
|
|
123
|
+
//
|
|
124
|
+
// | a c tx | | a c px' - (a * cx + c * cy) |
|
|
125
|
+
// | b d ty | = | b d py' - (b * cx + d * cy) |
|
|
126
|
+
// | 0 0 1 | | 0 0 1 |
|
|
127
|
+
//
|
|
128
|
+
// tx = px - (a * pvx + c * pvy) = px' - (a * cx + c * cy)
|
|
129
|
+
// ty = py - (b * pvx + d * pvy) = py' - (b * cx + d * cy)
|
|
130
|
+
//
|
|
131
|
+
// Thus, the new position (px', py') is
|
|
132
|
+
//
|
|
133
|
+
// px' = px + (a * (cx - pvx) + c * (cy - pvy))
|
|
134
|
+
// py' = py + (b * (cy - pvx) + d * (cy - pvy))
|
|
132
135
|
parent.updateTransform();
|
|
133
136
|
var transform = parent.transform;
|
|
134
|
-
var
|
|
135
|
-
var
|
|
137
|
+
var cx = rect.x + rect.width * 0.5;
|
|
138
|
+
var cy = rect.y + rect.height * 0.5;
|
|
136
139
|
var position = transform.position;
|
|
137
140
|
var localTransform = transform.localTransform;
|
|
138
141
|
var a = localTransform.a;
|
|
@@ -140,12 +143,16 @@ var EShapeGroupSizeEditor = /** @class */ (function () {
|
|
|
140
143
|
var c = localTransform.c;
|
|
141
144
|
var d = localTransform.d;
|
|
142
145
|
var pivot = transform.pivot;
|
|
143
|
-
|
|
144
|
-
pivot.
|
|
146
|
+
var pvx = pivot.x;
|
|
147
|
+
var pvy = pivot.y;
|
|
148
|
+
var dpvx = cx - pvx;
|
|
149
|
+
var dpvy = cy - pvy;
|
|
150
|
+
position.set(position.x + (a * dpvx + c * dpvy), position.y + (b * dpvx + d * dpvy));
|
|
151
|
+
pivot.set(cx, cy);
|
|
145
152
|
// Reset the data
|
|
146
153
|
this.reset(parent.children, this._layouts, size);
|
|
147
154
|
//
|
|
148
|
-
parent.
|
|
155
|
+
parent.unlock(EShapeLockPart.TRANSFORM | EShapeLockPart.TRANSFORM_PARENT, true);
|
|
149
156
|
};
|
|
150
157
|
EShapeGroupSizeEditor.prototype.reset = function (children, layouts, size) {
|
|
151
158
|
for (var i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-group-size-editor.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-group-size-editor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAInD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;IAQC,+BAAY,MAA6B,EAAE,CAAS,EAAE,CAAS,EAAE,UAAmB;QAJ1E,yBAAoB,GAAc,IAAI,SAAS,EAAE,CAAC;QAClD,oBAAe,GAAc,IAAI,SAAS,EAAE,CAAC;QAItD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,oCAAI,GAAJ;QACC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,sBAAI,oCAAC;aAAL;YACC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACrB,CAAC;aAED,UAAM,CAAS;YACd,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE;gBACjB,IAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;gBAClB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACX,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;aAC1B;QACF,CAAC;;;OATA;IAWD,sBAAI,oCAAC;aAAL;YACC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACrB,CAAC;aAED,UAAM,CAAS;YACd,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE;gBAC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C;YAC1B,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;gBAC/B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;aACrC;iBAAM;gBACN,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;gBACnB,MAAM;aACN;SACD;QACD,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;YACnE,IAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YAC7C,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACrC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACrB;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,EAAE;YACvC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;SACjC;IACF,CAAC;IAES,yCAAS,GAAnB,UAAoB,KAAa,EAAE,EAAU,EAAE,EAAU;QACxD,OAAO,KAAK,CAAC,MAAM,IAAI,IAAI,qBAAqB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;IACF,4BAAC;AAAD,CAAC,AAhPD,IAgPC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Point, Rectangle } from \"pixi.js\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeLayout } from \"../e-shape-layout\";\nimport { EShapeGroupSize } from \"./e-shape-group-size\";\nimport { EShapeGroupSizeLayout } from \"./e-shape-group-size-layout\";\nimport { EShapeGroupSizeParent } from \"./e-shape-group-size-parent\";\n\nexport class EShapeGroupSizeEditor implements EShapeGroupSize {\n\tprotected _parent: EShapeGroupSizeParent;\n\tprotected _size: Point;\n\tprotected _layouts: EShapeLayout[];\n\tprotected _workRectForCalcRect: Rectangle = new Rectangle();\n\tprotected _workRectForFit: Rectangle = new Rectangle();\n\tprotected _isFittable: boolean;\n\n\tconstructor(parent: EShapeGroupSizeParent, x: number, y: number, isFittable: boolean) {\n\t\tthis._parent = parent;\n\t\tthis._layouts = [];\n\t\tthis._size = new Point(x, y);\n\t\tthis._isFittable = isFittable;\n\t}\n\n\tinit(): this {\n\t\treturn this;\n\t}\n\n\tget x(): number {\n\t\treturn this._size.x;\n\t}\n\n\tset x(x: number) {\n\t\tconst size = this._size;\n\t\tif (size.x !== x) {\n\t\t\tconst ox = size.x;\n\t\t\tsize.x = x;\n\t\t\tthis.onChange(ox, size.y);\n\t\t}\n\t}\n\n\tget y(): number {\n\t\treturn this._size.y;\n\t}\n\n\tset y(y: number) {\n\t\tconst size = this._size;\n\t\tif (size.y !== y) {\n\t\t\tconst oy = size.y;\n\t\t\tsize.y = y;\n\t\t\tthis.onChange(size.x, oy);\n\t\t}\n\t}\n\n\tset(x?: number, y?: number): this {\n\t\tlet isChanged = false;\n\t\tconst size = this._size;\n\t\tconst ox = size.x;\n\t\tconst oy = size.y;\n\t\tif (x != null && ox !== x) {\n\t\t\tisChanged = true;\n\t\t\tsize.x = x;\n\t\t}\n\t\tif (y != null && oy !== y) {\n\t\t\tisChanged = true;\n\t\t\tsize.y = y;\n\t\t}\n\t\tif (isChanged) {\n\t\t\tthis.onChange(ox, oy);\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone(): EShapeGroupSizeEditor {\n\t\tconst size = this._size;\n\t\treturn new EShapeGroupSizeEditor(this._parent, size.x, size.y, this._isFittable);\n\t}\n\n\tcopy(): void {\n\t\t// DO NOTHING\n\t}\n\n\tcopyFrom(point: IPoint): this {\n\t\tconst x = point.x;\n\t\tconst y = point.y;\n\t\tconst size = this._size;\n\t\tconst ox = size.x;\n\t\tconst oy = size.y;\n\t\tif (ox !== x || oy !== y) {\n\t\t\tsize.x = x;\n\t\t\tsize.y = y;\n\t\t\tthis.onChange(ox, oy);\n\t\t}\n\t\treturn this;\n\t}\n\n\tcopyTo(point: IPoint): IPoint {\n\t\treturn this._size.copyTo(point);\n\t}\n\n\tequals(point: IPoint): boolean {\n\t\treturn this._size.equals(point);\n\t}\n\n\tfit(): this {\n\t\tif (this._isFittable) {\n\t\t\tthis.doFit();\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected doFit(): void {\n\t\tconst parent = this._parent;\n\t\tparent.disallowOnTransformChange();\n\n\t\t// Calculate the rect\n\t\tconst rect = this.calcRect(this._workRectForFit);\n\n\t\t// Set size\n\t\tconst size = this._size;\n\t\tsize.set(rect.width, rect.height);\n\n\t\t// Position & Pivot\n\t\t// rx := rect.x\n\t\t// ry := rect.y\n\t\t//\n\t\t// | a c tx | | 1 0 +rx | | 1 0 -rx | | a c tx + (a * rx + c * ry) | | 1 0 -rx |\n\t\t// | b d ty | | 0 1 +ry | | 0 1 -ry | = | b d ty + (b * rx + d * ry) | | 0 1 -ry |\n\t\t// | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 |\n\t\t//\n\t\t// tx -> tx + (a * rx + c * ry) = poxition.x - (a * pivot.x + c * pivot.y)\n\t\t// ty -> ty + (b * rx + d * ry) = poxition.y - (b * pivot.x + d * pivot.y)\n\t\t// position.x -> position.x + (a * rx + c * ry) - (a * pivot.x + c * pivot.y)\n\t\t// position.y -> position.y + (b * rx + d * ry) - (b * pivot.x + d * pivot.y)\n\t\t// pivot.x -> 0\n\t\t// pivot.y -> 0\n\t\t//\n\t\t// a -> a', b -> b', c -> c', tx -> tx', ty -> ty'\n\t\t//\n\t\t// | a' c' tx' | | 1 0 -rx | | a' c' tx' - (a' * rx + c' * ry) |\n\t\t// | b' d' ty' | | 0 1 -ry | = | b' d' ty' - (b' * rx + d' * ry) |\n\t\t// | 0 0 1 | | 0 0 1 | | 0 0 1 |\n\t\t//\n\t\t// tx' -> tx' - (a' * rx + c' * ry) = poxition.x - (a' * pivot.x + c' * pivot.y)\n\t\t// ty' -> ty' - (b' * rx + d' * ry) = poxition.y - (b' * pivot.x + d' * pivot.y)\n\t\t// pivot.x -> pivot.x + rx\n\t\t// pivot.y -> pivot.y + ry\n\t\tparent.updateTransform();\n\t\tconst transform = parent.transform;\n\t\tconst x = rect.x + rect.width * 0.5;\n\t\tconst y = rect.y + rect.height * 0.5;\n\t\tconst position = transform.position;\n\t\tconst localTransform = transform.localTransform;\n\t\tconst a = localTransform.a;\n\t\tconst b = localTransform.b;\n\t\tconst c = localTransform.c;\n\t\tconst d = localTransform.d;\n\t\tconst pivot = transform.pivot;\n\t\tposition.set(\n\t\t\tposition.x + (a * x + c * y) - (a * pivot.x + c * pivot.y),\n\t\t\tposition.y + (b * x + d * y) - (b * pivot.x + d * pivot.y)\n\t\t);\n\t\tpivot.set(x, y);\n\n\t\t// Reset the data\n\t\tthis.reset(parent.children, this._layouts, size);\n\n\t\t//\n\t\tparent.allowOnTransformChange(true);\n\t}\n\n\tprotected reset(children: EShape[], layouts: EShapeLayout[], size: IPoint): void {\n\t\tfor (let i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tconst layout = layouts[i];\n\t\t\tif (layout.isCompatible(child)) {\n\t\t\t\tlayout.reset(child, size.x, size.y);\n\t\t\t} else {\n\t\t\t\tlayouts.length = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (children.length < layouts.length) {\n\t\t\tlayouts.length = children.length;\n\t\t}\n\t}\n\n\tcalcRect(result: Rectangle): Rectangle {\n\t\tconst parent = this._parent;\n\t\tconst children = parent.children;\n\t\tif (children.length <= 0) {\n\t\t\tresult.x = 0;\n\t\t\tresult.y = 0;\n\t\t\tresult.width = 0;\n\t\t\tresult.height = 0;\n\t\t} else {\n\t\t\tconst workRect = this._workRectForCalcRect;\n\t\t\tchildren[0].getBoundsLocal(false, result);\n\t\t\tfor (let i = 1, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tchild.getBoundsLocal(false, workRect);\n\t\t\t\tresult.enlarge(workRect);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onChange(ox: number, oy: number): void {\n\t\tconst parent = this._parent;\n\t\tconst size = this._size;\n\t\tconst pivot = parent.transform.pivot;\n\t\tthis.onChange_(parent.children, this._layouts, size.x, size.y, pivot.x, pivot.y, ox, oy);\n\t\tparent.onSizeChange();\n\t}\n\n\tprotected onChange_(\n\t\tchildren: EShape[],\n\t\tlayouts: EShapeLayout[],\n\t\tsx: number,\n\t\tsy: number,\n\t\tpx: number,\n\t\tpy: number,\n\t\tox: number,\n\t\toy: number\n\t): void {\n\t\tfor (let i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tconst layout = layouts[i];\n\t\t\tif (layout.isCompatible(child)) {\n\t\t\t\tlayout.update(child, sx, sy, px, py);\n\t\t\t} else {\n\t\t\t\tlayouts.length = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (let i = layouts.length, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tconst layout = this.newLayout(child, ox, oy);\n\t\t\tlayout.update(child, sx, sy, px, py);\n\t\t\tlayouts.push(layout);\n\t\t}\n\t\tif (layouts.length !== children.length) {\n\t\t\tlayouts.length = children.length;\n\t\t}\n\t}\n\n\tprotected newLayout(shape: EShape, ox: number, oy: number): EShapeLayout {\n\t\treturn shape.layout || new EShapeGroupSizeLayout(shape, ox, oy);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-group-size-editor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AD,CAAC,AAnPD,IAmPC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Point, Rectangle } from \"pixi.js\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeLayout } from \"../e-shape-layout\";\nimport { EShapeGroupSize } from \"./e-shape-group-size\";\nimport { EShapeGroupSizeLayout } from \"./e-shape-group-size-layout\";\nimport { EShapeGroupSizeParent } from \"./e-shape-group-size-parent\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\n\nexport class EShapeGroupSizeEditor implements EShapeGroupSize {\n\tprotected _parent: EShapeGroupSizeParent;\n\tprotected _size: Point;\n\tprotected _layouts: EShapeLayout[];\n\tprotected _workRectForCalcRect: Rectangle = new Rectangle();\n\tprotected _workRectForFit: Rectangle = new Rectangle();\n\tprotected _isFittable: boolean;\n\n\tconstructor(parent: EShapeGroupSizeParent, x: number, y: number, isFittable: boolean) {\n\t\tthis._parent = parent;\n\t\tthis._layouts = [];\n\t\tthis._size = new Point(x, y);\n\t\tthis._isFittable = isFittable;\n\t}\n\n\tinit(): this {\n\t\treturn this;\n\t}\n\n\tget x(): number {\n\t\treturn this._size.x;\n\t}\n\n\tset x(x: number) {\n\t\tconst size = this._size;\n\t\tif (size.x !== x) {\n\t\t\tconst ox = size.x;\n\t\t\tsize.x = x;\n\t\t\tthis.onChange(ox, size.y);\n\t\t}\n\t}\n\n\tget y(): number {\n\t\treturn this._size.y;\n\t}\n\n\tset y(y: number) {\n\t\tconst size = this._size;\n\t\tif (size.y !== y) {\n\t\t\tconst oy = size.y;\n\t\t\tsize.y = y;\n\t\t\tthis.onChange(size.x, oy);\n\t\t}\n\t}\n\n\tset(x?: number, y?: number): this {\n\t\tlet isChanged = false;\n\t\tconst size = this._size;\n\t\tconst ox = size.x;\n\t\tconst oy = size.y;\n\t\tif (x != null && ox !== x) {\n\t\t\tisChanged = true;\n\t\t\tsize.x = x;\n\t\t}\n\t\tif (y != null && oy !== y) {\n\t\t\tisChanged = true;\n\t\t\tsize.y = y;\n\t\t}\n\t\tif (isChanged) {\n\t\t\tthis.onChange(ox, oy);\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone(): EShapeGroupSizeEditor {\n\t\tconst size = this._size;\n\t\treturn new EShapeGroupSizeEditor(this._parent, size.x, size.y, this._isFittable);\n\t}\n\n\tcopy(): void {\n\t\t// DO NOTHING\n\t}\n\n\tcopyFrom(point: IPoint): this {\n\t\tconst x = point.x;\n\t\tconst y = point.y;\n\t\tconst size = this._size;\n\t\tconst ox = size.x;\n\t\tconst oy = size.y;\n\t\tif (ox !== x || oy !== y) {\n\t\t\tsize.x = x;\n\t\t\tsize.y = y;\n\t\t\tthis.onChange(ox, oy);\n\t\t}\n\t\treturn this;\n\t}\n\n\tcopyTo(point: IPoint): IPoint {\n\t\treturn this._size.copyTo(point);\n\t}\n\n\tequals(point: IPoint): boolean {\n\t\treturn this._size.equals(point);\n\t}\n\n\tfit(): this {\n\t\tif (this._isFittable) {\n\t\t\tthis.doFit();\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected doFit(): void {\n\t\tconst parent = this._parent;\n\t\tparent.lock(EShapeLockPart.TRANSFORM | EShapeLockPart.TRANSFORM_PARENT);\n\n\t\t// Calculate the rect\n\t\tconst rect = this.calcRect(this._workRectForFit);\n\n\t\t// Set size\n\t\tconst size = this._size;\n\t\tsize.set(rect.width, rect.height);\n\n\t\t// Calculating new position & pivot\n\t\t//\n\t\t// cx := rect.x + rect.width * 0.5\n\t\t// cy := rect.y + rect.height * 0.5\n\t\t//\n\t\t// Since the local transform need to be unchanged:\n\t\t//\n\t\t// | a c tx | | a c px' - (a * pvx' + c * pvy') |\n\t\t// | b d ty | = | b d py' - (b * pvx' + d * pvy') |\n\t\t// | 0 0 1 | | 0 0 1 |\n\t\t//\n\t\t// Here, (px', py') and (pvx', pvy') are the new position\n\t\t// and the new pivot, respectively.\n\t\t//\n\t\t// Setting the new pivot (pvx', pvy') to (cx, cy) leads to\n\t\t//\n\t\t// | a c tx | | a c px' - (a * cx + c * cy) |\n\t\t// | b d ty | = | b d py' - (b * cx + d * cy) |\n\t\t// | 0 0 1 | | 0 0 1 |\n\t\t//\n\t\t// tx = px - (a * pvx + c * pvy) = px' - (a * cx + c * cy)\n\t\t// ty = py - (b * pvx + d * pvy) = py' - (b * cx + d * cy)\n\t\t//\n\t\t// Thus, the new position (px', py') is\n\t\t//\n\t\t// px' = px + (a * (cx - pvx) + c * (cy - pvy))\n\t\t// py' = py + (b * (cy - pvx) + d * (cy - pvy))\n\t\tparent.updateTransform();\n\t\tconst transform = parent.transform;\n\t\tconst cx = rect.x + rect.width * 0.5;\n\t\tconst cy = rect.y + rect.height * 0.5;\n\t\tconst position = transform.position;\n\t\tconst localTransform = transform.localTransform;\n\t\tconst a = localTransform.a;\n\t\tconst b = localTransform.b;\n\t\tconst c = localTransform.c;\n\t\tconst d = localTransform.d;\n\t\tconst pivot = transform.pivot;\n\t\tconst pvx = pivot.x;\n\t\tconst pvy = pivot.y;\n\t\tconst dpvx = cx - pvx;\n\t\tconst dpvy = cy - pvy;\n\t\tposition.set(position.x + (a * dpvx + c * dpvy), position.y + (b * dpvx + d * dpvy));\n\t\tpivot.set(cx, cy);\n\n\t\t// Reset the data\n\t\tthis.reset(parent.children, this._layouts, size);\n\n\t\t//\n\t\tparent.unlock(EShapeLockPart.TRANSFORM | EShapeLockPart.TRANSFORM_PARENT, true);\n\t}\n\n\tprotected reset(children: EShape[], layouts: EShapeLayout[], size: IPoint): void {\n\t\tfor (let i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tconst layout = layouts[i];\n\t\t\tif (layout.isCompatible(child)) {\n\t\t\t\tlayout.reset(child, size.x, size.y);\n\t\t\t} else {\n\t\t\t\tlayouts.length = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (children.length < layouts.length) {\n\t\t\tlayouts.length = children.length;\n\t\t}\n\t}\n\n\tcalcRect(result: Rectangle): Rectangle {\n\t\tconst parent = this._parent;\n\t\tconst children = parent.children;\n\t\tif (children.length <= 0) {\n\t\t\tresult.x = 0;\n\t\t\tresult.y = 0;\n\t\t\tresult.width = 0;\n\t\t\tresult.height = 0;\n\t\t} else {\n\t\t\tconst workRect = this._workRectForCalcRect;\n\t\t\tchildren[0].getBoundsLocal(false, result);\n\t\t\tfor (let i = 1, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tchild.getBoundsLocal(false, workRect);\n\t\t\t\tresult.enlarge(workRect);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onChange(ox: number, oy: number): void {\n\t\tconst parent = this._parent;\n\t\tconst size = this._size;\n\t\tconst pivot = parent.transform.pivot;\n\t\tthis.onChange_(parent.children, this._layouts, size.x, size.y, pivot.x, pivot.y, ox, oy);\n\t\tparent.onSizeChange();\n\t}\n\n\tprotected onChange_(\n\t\tchildren: EShape[],\n\t\tlayouts: EShapeLayout[],\n\t\tsx: number,\n\t\tsy: number,\n\t\tpx: number,\n\t\tpy: number,\n\t\tox: number,\n\t\toy: number\n\t): void {\n\t\tfor (let i = 0, imax = Math.min(layouts.length, children.length); i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tconst layout = layouts[i];\n\t\t\tif (layout.isCompatible(child)) {\n\t\t\t\tlayout.update(child, sx, sy, px, py);\n\t\t\t} else {\n\t\t\t\tlayouts.length = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (let i = layouts.length, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tconst layout = this.newLayout(child, ox, oy);\n\t\t\tlayout.update(child, sx, sy, px, py);\n\t\t\tlayouts.push(layout);\n\t\t}\n\t\tif (layouts.length !== children.length) {\n\t\t\tlayouts.length = children.length;\n\t\t}\n\t}\n\n\tprotected newLayout(shape: EShape, ox: number, oy: number): EShapeLayout {\n\t\treturn shape.layout || new EShapeGroupSizeLayout(shape, ox, oy);\n\t}\n}\n"]}
|
|
@@ -6,6 +6,7 @@ import { Matrix, Point } from "pixi.js";
|
|
|
6
6
|
import { EShapeCapabilities } from "../e-shape-capabilities";
|
|
7
7
|
import { EShapeCapability } from "../e-shape-capability";
|
|
8
8
|
import { EShapeTransforms } from "../e-shape-transforms";
|
|
9
|
+
import { EShapeLockPart } from "./e-shape-lock-part";
|
|
9
10
|
var EShapeGroupSizeLayout = /** @class */ (function () {
|
|
10
11
|
function EShapeGroupSizeLayout(shape, bx, by) {
|
|
11
12
|
this.shape = shape;
|
|
@@ -51,9 +52,9 @@ var EShapeGroupSizeLayout = /** @class */ (function () {
|
|
|
51
52
|
.translate(-pivotX, -pivotY)
|
|
52
53
|
.scale(sx, sy)
|
|
53
54
|
.translate(+pivotX, +pivotY);
|
|
54
|
-
shape.
|
|
55
|
+
shape.lock(EShapeLockPart.TRANSFORM);
|
|
55
56
|
EShapeTransforms.applyLocal(shape, transform, EShapeCapability.ALL, childBase);
|
|
56
|
-
shape.
|
|
57
|
+
shape.unlock(EShapeLockPart.TRANSFORM, false);
|
|
57
58
|
};
|
|
58
59
|
EShapeGroupSizeLayout.WORK_TRANSFORM = new Matrix();
|
|
59
60
|
return EShapeGroupSizeLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-group-size-layout.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-group-size-layout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-group-size-layout.js","sourceRoot":"","sources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,CAAC;QACrC,gBAAgB,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC/E,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAjEgB,oCAAc,GAAW,IAAI,MAAM,EAAE,CAAC;IAkExD,4BAAC;CAAA,AAnED,IAmEC;SAnEY,qBAAqB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Matrix, Point } from \"pixi.js\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeCapabilities } from \"../e-shape-capabilities\";\nimport { EShapeCapability } from \"../e-shape-capability\";\nimport { EShapeLayout } from \"../e-shape-layout\";\nimport { EShapeTransforms } from \"../e-shape-transforms\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\n\nexport class EShapeGroupSizeLayout implements EShapeLayout {\n\tprotected static WORK_TRANSFORM: Matrix = new Matrix();\n\n\tprotected shape: EShape;\n\tprotected base: Point;\n\tprotected shapeBase: Point;\n\tprotected transform: Matrix;\n\n\tprotected capable: boolean;\n\n\tconstructor(shape: EShape, bx: number, by: number) {\n\t\tthis.shape = shape;\n\n\t\t// Base group size\n\t\tthis.base = new Point(bx, by);\n\n\t\t// Base shape size\n\t\tconst size = shape.size;\n\t\tthis.shapeBase = new Point(size.x, size.y);\n\n\t\t// Transform\n\t\tthis.transform = new Matrix();\n\t\tshape.updateTransform();\n\t\tshape.transform.localTransform.copyTo(this.transform);\n\n\t\tthis.capable =\n\t\t\tEShapeCapabilities.contains(shape, EShapeCapability.POSITION) &&\n\t\t\tEShapeCapabilities.contains(shape, EShapeCapability.WIDTH) &&\n\t\t\tEShapeCapabilities.contains(shape, EShapeCapability.HEIGHT) &&\n\t\t\tEShapeCapabilities.contains(shape, EShapeCapability.ROTATION) &&\n\t\t\tEShapeCapabilities.contains(shape, EShapeCapability.SKEW);\n\t}\n\n\tisCompatible(shape: EShape): boolean {\n\t\treturn this.shape === shape;\n\t}\n\n\treset(shape: EShape, baseX: number, baseY: number): void {\n\t\tthis.base.set(baseX, baseY);\n\n\t\t// Base shape size\n\t\tconst size = shape.size;\n\t\tthis.shapeBase.copyFrom(size);\n\n\t\t// Transform\n\t\tshape.updateTransform();\n\t\tshape.transform.localTransform.copyTo(this.transform);\n\t}\n\n\tupdate(shape: EShape, baseX: number, baseY: number, pivotX: number, pivotY: number): void {\n\t\tif (!this.capable) {\n\t\t\treturn;\n\t\t}\n\t\tconst sx = baseX / this.base.x;\n\t\tconst sy = baseY / this.base.y;\n\t\tconst childBase = this.shapeBase;\n\t\tconst transform = EShapeGroupSizeLayout.WORK_TRANSFORM;\n\t\ttransform\n\t\t\t.identity()\n\t\t\t.append(this.transform)\n\t\t\t.translate(-pivotX, -pivotY)\n\t\t\t.scale(sx, sy)\n\t\t\t.translate(+pivotX, +pivotY);\n\t\tshape.lock(EShapeLockPart.TRANSFORM);\n\t\tEShapeTransforms.applyLocal(shape, transform, EShapeCapability.ALL, childBase);\n\t\tshape.unlock(EShapeLockPart.TRANSFORM, false);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-group-size-parent.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-group-size-parent.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeTransform } from \"../e-shape-transform\";\n\nexport interface EShapeGroupSizeParent {\n\treadonly children: EShape[];\n\treadonly transform: EShapeTransform;\n\
|
|
1
|
+
{"version":3,"file":"e-shape-group-size-parent.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-group-size-parent.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeTransform } from \"../e-shape-transform\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\n\nexport interface EShapeGroupSizeParent {\n\treadonly children: EShape[];\n\treadonly transform: EShapeTransform;\n\tlock(part: EShapeLockPart): void;\n\tunlock(part: EShapeLockPart, invoke: boolean): void;\n\tonSizeChange(): void;\n\tupdateTransform(): void;\n}\n"]}
|
|
@@ -15,6 +15,7 @@ import { EShapeGroupStrokeEditor } from "./e-shape-group-stroke-editor";
|
|
|
15
15
|
import { EShapeDataImpl } from "../e-shape-data-impl";
|
|
16
16
|
import { EShapeTextImpl } from "./e-shape-text-impl";
|
|
17
17
|
import { EShapeResourceManagerDeserializationMode } from "../e-shape-resource-manager-deserialization-mode";
|
|
18
|
+
import { EShapeConnectors } from "../e-shape-connectors";
|
|
18
19
|
var EShapeGroup = /** @class */ (function (_super) {
|
|
19
20
|
__extends(EShapeGroup, _super);
|
|
20
21
|
function EShapeGroup(mode, type) {
|
|
@@ -175,6 +176,7 @@ var EShapeGroup = /** @class */ (function (_super) {
|
|
|
175
176
|
clone.parent = result;
|
|
176
177
|
result.children.push(clone);
|
|
177
178
|
}
|
|
179
|
+
EShapeConnectors.moveAll(children, result.children, children, result.children);
|
|
178
180
|
result.onChildTransformChange();
|
|
179
181
|
result.toDirty();
|
|
180
182
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-group.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-group.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,E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X-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { EShapeCorner } from \"../e-shape-corner\";\nimport { EShapeDefaults } from \"../e-shape-defaults\";\nimport { EShapeFill } from \"../e-shape-fill\";\nimport { EShapeGradientLike } from \"../e-shape-gradient\";\nimport { EShapePoints } from \"../e-shape-points\";\nimport { EShapeStroke } from \"../e-shape-stroke\";\nimport { EShapeData } from \"../e-shape-data\";\nimport { EShapeText } from \"../e-shape-text\";\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeBase } from \"./e-shape-base\";\nimport { EShapeGroupFillEditor } from \"./e-shape-group-fill-editor\";\nimport { EShapeGroupPoints } from \"./e-shape-group-points\";\nimport { EShapeGroupPropertyParent } from \"./e-shape-group-property-parent\";\nimport { EShapeGroupSize } from \"./e-shape-group-size\";\nimport { EShapeGroupSizeEditor } from \"./e-shape-group-size-editor\";\nimport { EShapeGroupSizeViewer } from \"./e-shape-group-size-viewer\";\nimport { EShapeGroupStrokeEditor } from \"./e-shape-group-stroke-editor\";\nimport { EShapeDataImpl } from \"../e-shape-data-impl\";\nimport { EShapeTextImpl } from \"./e-shape-text-impl\";\nimport { EShapeResourceManagerDeserializationMode } from \"../e-shape-resource-manager-deserialization-mode\";\n\nexport class EShapeGroup extends EShapeBase implements EShapeGroupPropertyParent {\n\tsize: EShapeGroupSize;\n\tfill: EShapeFill;\n\tstroke: EShapeStroke;\n\t/** @deprecated in favor of {@link data} */\n\ttag: EShapeData;\n\tdata: EShapeData;\n\ttext: EShapeText;\n\n\tprotected _mode: EShapeResourceManagerDeserializationMode;\n\tprotected _points?: EShapePoints;\n\n\tconstructor(\n\t\tmode: EShapeResourceManagerDeserializationMode,\n\t\ttype: EShapeType = EShapeType.GROUP\n\t) {\n\t\tsuper(type);\n\t\tthis._mode = mode;\n\t\tconst data = new EShapeDataImpl();\n\t\tthis.data = data;\n\t\tthis.tag = data;\n\t\tthis.size = this.newGroupSize(mode);\n\t\tthis.fill = this.newGroupFill();\n\t\tthis.stroke = this.newGroupStroke();\n\t\tthis.text = this.newGroupText();\n\t\tthis._points = this.newGroupPoints();\n\t}\n\n\tget mode(): EShapeResourceManagerDeserializationMode {\n\t\treturn this._mode;\n\t}\n\n\tprotected newGroupSize(mode: EShapeResourceManagerDeserializationMode): EShapeGroupSize {\n\t\tconst sizeX = EShapeDefaults.SIZE_X;\n\t\tconst sizeY = EShapeDefaults.SIZE_Y;\n\t\tif (mode !== EShapeResourceManagerDeserializationMode.VIEWER) {\n\t\t\treturn new EShapeGroupSizeEditor(this, sizeX, sizeY, this.isGroupSizeFittable());\n\t\t} else {\n\t\t\treturn new EShapeGroupSizeViewer(this, sizeX, sizeY, sizeX, sizeY);\n\t\t}\n\t}\n\n\tprotected isGroupSizeFittable(): boolean {\n\t\treturn true;\n\t}\n\n\tprotected newGroupFill(): EShapeFill {\n\t\treturn new EShapeGroupFillEditor(this);\n\t}\n\n\tprotected newGroupStroke(): EShapeStroke {\n\t\treturn new EShapeGroupStrokeEditor(this);\n\t}\n\n\tprotected newGroupText(): EShapeText {\n\t\treturn new EShapeTextImpl(\n\t\t\tthis,\n\t\t\tEShapeDefaults.TEXT_VALUE,\n\t\t\tEShapeDefaults.TEXT_COLOR,\n\t\t\tEShapeDefaults.TEXT_ALPHA,\n\t\t\tEShapeDefaults.TEXT_FAMILY,\n\t\t\tEShapeDefaults.TEXT_SIZE\n\t\t);\n\t}\n\n\tprotected newGroupPoints(): EShapePoints | undefined {\n\t\treturn new EShapeGroupPoints(this);\n\t}\n\n\tprotected getBoundsSize(): IPoint {\n\t\tconst size = this.size;\n\t\tif (size instanceof EShapeGroupSizeViewer) {\n\t\t\treturn size.base;\n\t\t} else {\n\t\t\treturn size;\n\t\t}\n\t}\n\n\tonChildTransformChange(): void {\n\t\tsuper.onChildTransformChange();\n\t\tthis.size.fit();\n\t}\n\n\tget corner(): EShapeCorner {\n\t\tconst children = this.children;\n\t\tif (0 < children.length) {\n\t\t\treturn children[children.length - 1].corner;\n\t\t}\n\t\treturn EShapeCorner.ALL;\n\t}\n\n\tset corner(corner: EShapeCorner) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].corner = corner;\n\t\t}\n\t}\n\n\tget gradient(): EShapeGradientLike | undefined {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst gradient = children[i].gradient;\n\t\t\tif (gradient != null) {\n\t\t\t\treturn gradient;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tset gradient(gradient: EShapeGradientLike | undefined) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].gradient = gradient;\n\t\t}\n\t}\n\n\tget radius(): number {\n\t\tconst children = this.children;\n\t\tif (0 < children.length) {\n\t\t\treturn children[children.length - 1].radius;\n\t\t}\n\t\treturn 0.5;\n\t}\n\n\tset radius(radius: number) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].radius = radius;\n\t\t}\n\t}\n\n\tget image(): HTMLImageElement | undefined {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst image = children[i].image;\n\t\t\tif (image != null) {\n\t\t\t\treturn image;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tset image(image: HTMLImageElement | undefined) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].image = image;\n\t\t}\n\t}\n\n\tget points(): EShapePoints | undefined {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst points = children[i].points;\n\t\t\tif (points != null) {\n\t\t\t\treturn this._points;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tset points(points: EShapePoints | undefined) {\n\t\t// DO NOTHING\n\t}\n\n\tclone(): EShapeGroup {\n\t\tconst result = this.newClone().copy(this);\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst clone = children[i].clone();\n\t\t\tclone.parent = result;\n\t\t\tresult.children.push(clone);\n\t\t}\n\t\tresult.onChildTransformChange();\n\t\tresult.toDirty();\n\t\treturn result;\n\t}\n\n\tprotected newClone(): EShapeGroup {\n\t\tconst constructor = this.constructor as typeof EShapeGroup;\n\t\treturn new constructor(this._mode, this.type);\n\t}\n\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean {\n\t\treturn false;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-group.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-group.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,wCAAwC,EAAE,MAAM,kDAAkD,CAAC;AAC5G,OAAO,EAAE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AC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;YACtD,IAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;YAClC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;YACtB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/E,MAAM,CAAC,sBAAsB,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,MAAM,CAAC;IACf,CAAC;IAES,8BAAQ,GAAlB;QACC,IAAM,WAAW,GAAG,IAAI,CAAC,WAAiC,CAAC;QAC3D,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,iCAAW,GAAX,UACC,CAAS,EACT,CAAS,EACT,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU;QAEV,OAAO,KAAK,CAAC;IACd,CAAC;IACF,kBAAC;AAAD,CAAC,AAlMD,CAAiC,UAAU,GAkM1C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { EShapeCorner } from \"../e-shape-corner\";\nimport { EShapeDefaults } from \"../e-shape-defaults\";\nimport { EShapeFill } from \"../e-shape-fill\";\nimport { EShapeGradientLike } from \"../e-shape-gradient\";\nimport { EShapePoints } from \"../e-shape-points\";\nimport { EShapeStroke } from \"../e-shape-stroke\";\nimport { EShapeData } from \"../e-shape-data\";\nimport { EShapeText } from \"../e-shape-text\";\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeBase } from \"./e-shape-base\";\nimport { EShapeGroupFillEditor } from \"./e-shape-group-fill-editor\";\nimport { EShapeGroupPoints } from \"./e-shape-group-points\";\nimport { EShapeGroupPropertyParent } from \"./e-shape-group-property-parent\";\nimport { EShapeGroupSize } from \"./e-shape-group-size\";\nimport { EShapeGroupSizeEditor } from \"./e-shape-group-size-editor\";\nimport { EShapeGroupSizeViewer } from \"./e-shape-group-size-viewer\";\nimport { EShapeGroupStrokeEditor } from \"./e-shape-group-stroke-editor\";\nimport { EShapeDataImpl } from \"../e-shape-data-impl\";\nimport { EShapeTextImpl } from \"./e-shape-text-impl\";\nimport { EShapeResourceManagerDeserializationMode } from \"../e-shape-resource-manager-deserialization-mode\";\nimport { EShapeConnectors } from \"../e-shape-connectors\";\n\nexport class EShapeGroup extends EShapeBase implements EShapeGroupPropertyParent {\n\tsize: EShapeGroupSize;\n\tfill: EShapeFill;\n\tstroke: EShapeStroke;\n\t/** @deprecated in favor of {@link data} */\n\ttag: EShapeData;\n\tdata: EShapeData;\n\ttext: EShapeText;\n\n\tprotected _mode: EShapeResourceManagerDeserializationMode;\n\tprotected _points?: EShapePoints;\n\n\tconstructor(\n\t\tmode: EShapeResourceManagerDeserializationMode,\n\t\ttype: EShapeType = EShapeType.GROUP\n\t) {\n\t\tsuper(type);\n\t\tthis._mode = mode;\n\t\tconst data = new EShapeDataImpl();\n\t\tthis.data = data;\n\t\tthis.tag = data;\n\t\tthis.size = this.newGroupSize(mode);\n\t\tthis.fill = this.newGroupFill();\n\t\tthis.stroke = this.newGroupStroke();\n\t\tthis.text = this.newGroupText();\n\t\tthis._points = this.newGroupPoints();\n\t}\n\n\tget mode(): EShapeResourceManagerDeserializationMode {\n\t\treturn this._mode;\n\t}\n\n\tprotected newGroupSize(mode: EShapeResourceManagerDeserializationMode): EShapeGroupSize {\n\t\tconst sizeX = EShapeDefaults.SIZE_X;\n\t\tconst sizeY = EShapeDefaults.SIZE_Y;\n\t\tif (mode !== EShapeResourceManagerDeserializationMode.VIEWER) {\n\t\t\treturn new EShapeGroupSizeEditor(this, sizeX, sizeY, this.isGroupSizeFittable());\n\t\t} else {\n\t\t\treturn new EShapeGroupSizeViewer(this, sizeX, sizeY, sizeX, sizeY);\n\t\t}\n\t}\n\n\tprotected isGroupSizeFittable(): boolean {\n\t\treturn true;\n\t}\n\n\tprotected newGroupFill(): EShapeFill {\n\t\treturn new EShapeGroupFillEditor(this);\n\t}\n\n\tprotected newGroupStroke(): EShapeStroke {\n\t\treturn new EShapeGroupStrokeEditor(this);\n\t}\n\n\tprotected newGroupText(): EShapeText {\n\t\treturn new EShapeTextImpl(\n\t\t\tthis,\n\t\t\tEShapeDefaults.TEXT_VALUE,\n\t\t\tEShapeDefaults.TEXT_COLOR,\n\t\t\tEShapeDefaults.TEXT_ALPHA,\n\t\t\tEShapeDefaults.TEXT_FAMILY,\n\t\t\tEShapeDefaults.TEXT_SIZE\n\t\t);\n\t}\n\n\tprotected newGroupPoints(): EShapePoints | undefined {\n\t\treturn new EShapeGroupPoints(this);\n\t}\n\n\tprotected getBoundsSize(): IPoint {\n\t\tconst size = this.size;\n\t\tif (size instanceof EShapeGroupSizeViewer) {\n\t\t\treturn size.base;\n\t\t} else {\n\t\t\treturn size;\n\t\t}\n\t}\n\n\tonChildTransformChange(): void {\n\t\tsuper.onChildTransformChange();\n\t\tthis.size.fit();\n\t}\n\n\tget corner(): EShapeCorner {\n\t\tconst children = this.children;\n\t\tif (0 < children.length) {\n\t\t\treturn children[children.length - 1].corner;\n\t\t}\n\t\treturn EShapeCorner.ALL;\n\t}\n\n\tset corner(corner: EShapeCorner) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].corner = corner;\n\t\t}\n\t}\n\n\tget gradient(): EShapeGradientLike | undefined {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst gradient = children[i].gradient;\n\t\t\tif (gradient != null) {\n\t\t\t\treturn gradient;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tset gradient(gradient: EShapeGradientLike | undefined) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].gradient = gradient;\n\t\t}\n\t}\n\n\tget radius(): number {\n\t\tconst children = this.children;\n\t\tif (0 < children.length) {\n\t\t\treturn children[children.length - 1].radius;\n\t\t}\n\t\treturn 0.5;\n\t}\n\n\tset radius(radius: number) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].radius = radius;\n\t\t}\n\t}\n\n\tget image(): HTMLImageElement | undefined {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst image = children[i].image;\n\t\t\tif (image != null) {\n\t\t\t\treturn image;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tset image(image: HTMLImageElement | undefined) {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tchildren[i].image = image;\n\t\t}\n\t}\n\n\tget points(): EShapePoints | undefined {\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tconst points = children[i].points;\n\t\t\tif (points != null) {\n\t\t\t\treturn this._points;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tset points(points: EShapePoints | undefined) {\n\t\t// DO NOTHING\n\t}\n\n\tclone(): EShapeGroup {\n\t\tconst result = this.newClone().copy(this);\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst clone = children[i].clone();\n\t\t\tclone.parent = result;\n\t\t\tresult.children.push(clone);\n\t\t}\n\t\tEShapeConnectors.moveAll(children, result.children, children, result.children);\n\t\tresult.onChildTransformChange();\n\t\tresult.toDirty();\n\t\treturn result;\n\t}\n\n\tprotected newClone(): EShapeGroup {\n\t\tconst constructor = this.constructor as typeof EShapeGroup;\n\t\treturn new constructor(this._mode, this.type);\n\t}\n\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean {\n\t\treturn false;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-lock-part.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-lock-part.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,cAAc,GAAG;IAC7B,SAAS,EAAE,CAAC;IACZ,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC;IACX,sBAAsB,EAAE,CAAC;IACzB,SAAS,EAAE,CAAC;CACH,CAAC","sourcesContent":["export const EShapeLockPart = {\n\tTRANSFORM: 1,\n\tTRANSFORM_PARENT: 2,\n\tUPLOADED: 4,\n\tTRANSFORM_AND_UPLOADED: 7,\n\tCONNECTOR: 8\n} as const;\n\nexport type EShapeLockPart = number;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var EShapeLock = /** @class */ (function () {
|
|
2
|
+
function EShapeLock() {
|
|
3
|
+
this._count = 0;
|
|
4
|
+
this._flag = 0;
|
|
5
|
+
}
|
|
6
|
+
EShapeLock.prototype.lock = function () {
|
|
7
|
+
this._count += 1;
|
|
8
|
+
if (this._count === 1) {
|
|
9
|
+
this._flag = 0;
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
};
|
|
14
|
+
EShapeLock.prototype.unlock = function () {
|
|
15
|
+
this._count -= 1;
|
|
16
|
+
return this._count <= 0 && this._flag !== 0;
|
|
17
|
+
};
|
|
18
|
+
EShapeLock.prototype.isLocked = function (high) {
|
|
19
|
+
if (0 < this._count) {
|
|
20
|
+
this._flag |= high ? 3 : 1;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
25
|
+
EShapeLock.prototype.isHigh = function () {
|
|
26
|
+
return 1 < this._flag;
|
|
27
|
+
};
|
|
28
|
+
return EShapeLock;
|
|
29
|
+
}());
|
|
30
|
+
export { EShapeLock };
|
|
31
|
+
//# sourceMappingURL=e-shape-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-lock.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-lock.ts"],"names":[],"mappings":"AAAA;IAIC;QACC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAChB,CAAC;IAED,yBAAI,GAAJ;QACC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;QACjB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACf,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,2BAAM,GAAN;QACC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED,6BAAQ,GAAR,UAAS,IAAc;QACtB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;YACpB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,2BAAM,GAAN;QACC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;IACvB,CAAC;IACF,iBAAC;AAAD,CAAC,AAlCD,IAkCC","sourcesContent":["export class EShapeLock {\n\tprotected _count: number;\n\tprotected _flag: number;\n\n\tconstructor() {\n\t\tthis._count = 0;\n\t\tthis._flag = 0;\n\t}\n\n\tlock(): boolean {\n\t\tthis._count += 1;\n\t\tif (this._count === 1) {\n\t\t\tthis._flag = 0;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tunlock(): boolean {\n\t\tthis._count -= 1;\n\t\treturn this._count <= 0 && this._flag !== 0;\n\t}\n\n\tisLocked(high?: boolean): boolean {\n\t\tif (0 < this._count) {\n\t\t\tthis._flag |= high ? 3 : 1;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tisHigh(): boolean {\n\t\treturn 1 < this._flag;\n\t}\n}\n"]}
|
|
@@ -170,6 +170,8 @@ export * from "./e-shape-line-of-triangle-roundeds";
|
|
|
170
170
|
export * from "./e-shape-line-of-triangles";
|
|
171
171
|
export * from "./e-shape-line-points";
|
|
172
172
|
export * from "./e-shape-line";
|
|
173
|
+
export * from "./e-shape-lock-part";
|
|
174
|
+
export * from "./e-shape-lock";
|
|
173
175
|
export * from "./e-shape-null";
|
|
174
176
|
export * from "./e-shape-primitive";
|
|
175
177
|
export * from "./e-shape-rectangle-pivoted";
|