@hatiolab/things-scene 9.0.0-beta.35 → 9.0.0-beta.36
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/babel.config.js +4 -3
- package/db.sqlite +0 -0
- package/dist/animation/animate.js +63 -0
- package/dist/animation/animate.js.map +1 -0
- package/dist/animation/animations/animation.js +122 -0
- package/dist/animation/animations/animation.js.map +1 -0
- package/dist/animation/animations/fade.js +28 -0
- package/dist/animation/animations/fade.js.map +1 -0
- package/dist/animation/animations/heartbeat.js +28 -0
- package/dist/animation/animations/heartbeat.js.map +1 -0
- package/dist/animation/animations/moving.js +24 -0
- package/dist/animation/animations/moving.js.map +1 -0
- package/dist/animation/animations/outline.js +47 -0
- package/dist/animation/animations/outline.js.map +1 -0
- package/dist/animation/animations/rotation.js +22 -0
- package/dist/animation/animations/rotation.js.map +1 -0
- package/dist/animation/animations/vibration.js +31 -0
- package/dist/animation/animations/vibration.js.map +1 -0
- package/dist/animation/compile.js +31 -0
- package/dist/animation/compile.js.map +1 -0
- package/dist/animation/delta.js +51 -0
- package/dist/animation/delta.js.map +1 -0
- package/dist/animation/index.js +14 -0
- package/dist/animation/index.js.map +1 -0
- package/dist/command/command-change.js +33 -0
- package/dist/command/command-change.js.map +1 -0
- package/dist/command/command-migrate.js +103 -0
- package/dist/command/command-migrate.js.map +1 -0
- package/dist/command/command.js +18 -0
- package/dist/command/command.js.map +1 -0
- package/dist/command/snapshot-commander.js +84 -0
- package/dist/command/snapshot-commander.js.map +1 -0
- package/dist/components/anchor/anchor.js +105 -0
- package/dist/components/anchor/anchor.js.map +1 -0
- package/dist/components/anchor/ellipse-anchors.js +53 -0
- package/dist/components/anchor/ellipse-anchors.js.map +1 -0
- package/dist/components/anchor/rect-anchors.js +53 -0
- package/dist/components/anchor/rect-anchors.js.map +1 -0
- package/dist/components/audio.js +154 -0
- package/dist/components/audio.js.map +1 -0
- package/dist/components/cloud.js +44 -0
- package/dist/components/cloud.js.map +1 -0
- package/dist/components/component.js +1086 -0
- package/dist/components/component.js.map +1 -0
- package/dist/components/container-abstract.js +387 -0
- package/dist/components/container-abstract.js.map +1 -0
- package/dist/components/container.js +331 -0
- package/dist/components/container.js.map +1 -0
- package/dist/components/data/data-mapping.js +82 -0
- package/dist/components/data/data-mapping.js.map +1 -0
- package/dist/components/data/data.js +166 -0
- package/dist/components/data/data.js.map +1 -0
- package/dist/components/data/evaluator.js +103 -0
- package/dist/components/data/evaluator.js.map +1 -0
- package/dist/components/donut.js +104 -0
- package/dist/components/donut.js.map +1 -0
- package/dist/components/drawer/draw-image-pendable.js +20 -0
- package/dist/components/drawer/draw-image-pendable.js.map +1 -0
- package/dist/components/drawer/effect.js +19 -0
- package/dist/components/drawer/effect.js.map +1 -0
- package/dist/components/drawer/fill.js +228 -0
- package/dist/components/drawer/fill.js.map +1 -0
- package/dist/components/drawer/format.js +115 -0
- package/dist/components/drawer/format.js.map +1 -0
- package/dist/components/drawer/line.js +191 -0
- package/dist/components/drawer/line.js.map +1 -0
- package/dist/components/drawer/stroke.js +62 -0
- package/dist/components/drawer/stroke.js.map +1 -0
- package/dist/components/drawer/text-wrapper.js +51 -0
- package/dist/components/drawer/text-wrapper.js.map +1 -0
- package/dist/components/drawer/text.js +269 -0
- package/dist/components/drawer/text.js.map +1 -0
- package/dist/components/ellipse.js +110 -0
- package/dist/components/ellipse.js.map +1 -0
- package/dist/components/file/ondropfile.js +19 -0
- package/dist/components/file/ondropfile.js.map +1 -0
- package/dist/components/fit/fit.js +137 -0
- package/dist/components/fit/fit.js.map +1 -0
- package/dist/components/geometry/transcoord.js +339 -0
- package/dist/components/geometry/transcoord.js.map +1 -0
- package/dist/components/geometry/union.js +35 -0
- package/dist/components/geometry/union.js.map +1 -0
- package/dist/components/gif-view.js +128 -0
- package/dist/components/gif-view.js.map +1 -0
- package/dist/components/global-ref.js +154 -0
- package/dist/components/global-ref.js.map +1 -0
- package/dist/components/group.js +171 -0
- package/dist/components/group.js.map +1 -0
- package/dist/components/html/elements.js +24 -0
- package/dist/components/html/elements.js.map +1 -0
- package/dist/components/html/fill.js +126 -0
- package/dist/components/html/fill.js.map +1 -0
- package/dist/components/html/reposition.js +119 -0
- package/dist/components/html/reposition.js.map +1 -0
- package/dist/components/html/shadow.js +24 -0
- package/dist/components/html/shadow.js.map +1 -0
- package/dist/components/html-overlay-container.js +27 -0
- package/dist/components/html-overlay-container.js.map +1 -0
- package/dist/components/html-overlay-element.js +22 -0
- package/dist/components/html-overlay-element.js.map +1 -0
- package/dist/components/image-view.js +193 -0
- package/dist/components/image-view.js.map +1 -0
- package/dist/components/index.js +231 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/info-window.js +416 -0
- package/dist/components/info-window.js.map +1 -0
- package/dist/components/line.js +374 -0
- package/dist/components/line.js.map +1 -0
- package/dist/components/local-ref.js +114 -0
- package/dist/components/local-ref.js.map +1 -0
- package/dist/components/mixins/connectable.js +128 -0
- package/dist/components/mixins/connectable.js.map +1 -0
- package/dist/components/mixins/data-source.js +34 -0
- package/dist/components/mixins/data-source.js.map +1 -0
- package/dist/components/mixins/html-element.js +107 -0
- package/dist/components/mixins/html-element.js.map +1 -0
- package/dist/components/mixins/move-handle.js +73 -0
- package/dist/components/mixins/move-handle.js.map +1 -0
- package/dist/components/mixins/rect-path.js +113 -0
- package/dist/components/mixins/rect-path.js.map +1 -0
- package/dist/components/mixins/value-holder.js +81 -0
- package/dist/components/mixins/value-holder.js.map +1 -0
- package/dist/components/mutater/bounds.js +68 -0
- package/dist/components/mutater/bounds.js.map +1 -0
- package/dist/components/mutater/path.js +73 -0
- package/dist/components/mutater/path.js.map +1 -0
- package/dist/components/ortholine.js +763 -0
- package/dist/components/ortholine.js.map +1 -0
- package/dist/components/outline/ellipse-outline.js +23 -0
- package/dist/components/outline/ellipse-outline.js.map +1 -0
- package/dist/components/outline/path-outline.js +48 -0
- package/dist/components/outline/path-outline.js.map +1 -0
- package/dist/components/path.js +49 -0
- package/dist/components/path.js.map +1 -0
- package/dist/components/polygon.js +91 -0
- package/dist/components/polygon.js.map +1 -0
- package/dist/components/polyline.js +114 -0
- package/dist/components/polyline.js.map +1 -0
- package/dist/components/popup.js +160 -0
- package/dist/components/popup.js.map +1 -0
- package/dist/components/rect.js +72 -0
- package/dist/components/rect.js.map +1 -0
- package/dist/components/retention/retention-manager.js +81 -0
- package/dist/components/retention/retention-manager.js.map +1 -0
- package/dist/components/root-container.js +519 -0
- package/dist/components/root-container.js.map +1 -0
- package/dist/components/ruler.js +103 -0
- package/dist/components/ruler.js.map +1 -0
- package/dist/components/shape.js +97 -0
- package/dist/components/shape.js.map +1 -0
- package/dist/components/star.js +103 -0
- package/dist/components/star.js.map +1 -0
- package/dist/components/text/substitutor.js +92 -0
- package/dist/components/text/substitutor.js.map +1 -0
- package/dist/components/text.js +21 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/triangle.js +92 -0
- package/dist/components/triangle.js.map +1 -0
- package/dist/const.js +71 -0
- package/dist/const.js.map +1 -0
- package/dist/core/collection.js +28 -0
- package/dist/core/collection.js.map +1 -0
- package/dist/core/debug.js +12 -0
- package/dist/core/debug.js.map +1 -0
- package/dist/core/deep-equals.js +112 -0
- package/dist/core/deep-equals.js.map +1 -0
- package/dist/core/dom-to-image.js +617 -0
- package/dist/core/dom-to-image.js.map +1 -0
- package/dist/core/event.js +205 -0
- package/dist/core/event.js.map +1 -0
- package/dist/core/index.js +21 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/list.js +87 -0
- package/dist/core/list.js.map +1 -0
- package/dist/core/logger.js +29 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/memoize.js +40 -0
- package/dist/core/memoize.js.map +1 -0
- package/dist/core/mixin.js +26 -0
- package/dist/core/mixin.js.map +1 -0
- package/dist/core/obj-accessor.js +26 -0
- package/dist/core/obj-accessor.js.map +1 -0
- package/dist/core/reference-map.js +147 -0
- package/dist/core/reference-map.js.map +1 -0
- package/dist/core/round-rect.js +62 -0
- package/dist/core/round-rect.js.map +1 -0
- package/dist/core/safe-round.js +10 -0
- package/dist/core/safe-round.js.map +1 -0
- package/dist/core/script-loader.js +148 -0
- package/dist/core/script-loader.js.map +1 -0
- package/dist/core/snapshot-taker.js +59 -0
- package/dist/core/snapshot-taker.js.map +1 -0
- package/dist/core/stack.js +18 -0
- package/dist/core/stack.js.map +1 -0
- package/dist/core/timecapsule.js +88 -0
- package/dist/core/timecapsule.js.map +1 -0
- package/dist/core/utils.js +309 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/decorator/anchors-decorator.js +53 -0
- package/dist/decorator/anchors-decorator.js.map +1 -0
- package/dist/decorator/bouncing-arrow-decorator.js +52 -0
- package/dist/decorator/bouncing-arrow-decorator.js.map +1 -0
- package/dist/decorator/data-spread-decorator.js +69 -0
- package/dist/decorator/data-spread-decorator.js.map +1 -0
- package/dist/decorator/decotag-decorator.js +33 -0
- package/dist/decorator/decotag-decorator.js.map +1 -0
- package/dist/decorator/index.js +31 -0
- package/dist/decorator/index.js.map +1 -0
- package/dist/decorator/link-decorator.js +66 -0
- package/dist/decorator/link-decorator.js.map +1 -0
- package/dist/effect/gradation.js +37 -0
- package/dist/effect/gradation.js.map +1 -0
- package/dist/effect/index.js +23 -0
- package/dist/effect/index.js.map +1 -0
- package/dist/effect/shadow.js +33 -0
- package/dist/effect/shadow.js.map +1 -0
- package/dist/effect/turn.js +25 -0
- package/dist/effect/turn.js.map +1 -0
- package/dist/event/event-engine.js +76 -0
- package/dist/event/event-engine.js.map +1 -0
- package/dist/event/event-pump.js +92 -0
- package/dist/event/event-pump.js.map +1 -0
- package/dist/event/event-tracker.js +97 -0
- package/dist/event/event-tracker.js.map +1 -0
- package/dist/event/index.js +21 -0
- package/dist/event/index.js.map +1 -0
- package/dist/event/ua-event-handler.js +453 -0
- package/dist/event/ua-event-handler.js.map +1 -0
- package/dist/event-map/animator-handler.js +225 -0
- package/dist/event-map/animator-handler.js.map +1 -0
- package/dist/event-map/animators/animated-icon.js +265 -0
- package/dist/event-map/animators/animated-icon.js.map +1 -0
- package/dist/event-map/animators/border-highlighting.js +476 -0
- package/dist/event-map/animators/border-highlighting.js.map +1 -0
- package/dist/event-map/animators/bouncing-arrow.js +226 -0
- package/dist/event-map/animators/bouncing-arrow.js.map +1 -0
- package/dist/event-map/event-map.js +36 -0
- package/dist/event-map/event-map.js.map +1 -0
- package/dist/event-map/index.js +20 -0
- package/dist/event-map/index.js.map +1 -0
- package/dist/event-map/move-handler.js +233 -0
- package/dist/event-map/move-handler.js.map +1 -0
- package/dist/event-map/paste-handler.js +176 -0
- package/dist/event-map/paste-handler.js.map +1 -0
- package/dist/event-map/shift-handler.js +55 -0
- package/dist/event-map/shift-handler.js.map +1 -0
- package/dist/event-map/text-editor-lite.js +276 -0
- package/dist/event-map/text-editor-lite.js.map +1 -0
- package/dist/event-map/zoom-handler.js +49 -0
- package/dist/event-map/zoom-handler.js.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/layer/action/emphasize.js +42 -0
- package/dist/layer/action/emphasize.js.map +1 -0
- package/dist/layer/action/popup.js +461 -0
- package/dist/layer/action/popup.js.map +1 -0
- package/dist/layer/action/pressed.js +31 -0
- package/dist/layer/action/pressed.js.map +1 -0
- package/dist/layer/add-layer.js +180 -0
- package/dist/layer/add-layer.js.map +1 -0
- package/dist/layer/decotag-layer.js +121 -0
- package/dist/layer/decotag-layer.js.map +1 -0
- package/dist/layer/guide-layer.js +292 -0
- package/dist/layer/guide-layer.js.map +1 -0
- package/dist/layer/index.js +70 -0
- package/dist/layer/index.js.map +1 -0
- package/dist/layer/layer.js +230 -0
- package/dist/layer/layer.js.map +1 -0
- package/dist/layer/minimap-layer.js +84 -0
- package/dist/layer/minimap-layer.js.map +1 -0
- package/dist/layer/model-layer.js +465 -0
- package/dist/layer/model-layer.js.map +1 -0
- package/dist/layer/modeler/anchor-handler.js +193 -0
- package/dist/layer/modeler/anchor-handler.js.map +1 -0
- package/dist/layer/modeler/control-handler.js +95 -0
- package/dist/layer/modeler/control-handler.js.map +1 -0
- package/dist/layer/modeler/focus-outline.js +41 -0
- package/dist/layer/modeler/focus-outline.js.map +1 -0
- package/dist/layer/modeler/group-outline.js +30 -0
- package/dist/layer/modeler/group-outline.js.map +1 -0
- package/dist/layer/modeler/index.js +56 -0
- package/dist/layer/modeler/index.js.map +1 -0
- package/dist/layer/modeler/path-handler.js +300 -0
- package/dist/layer/modeler/path-handler.js.map +1 -0
- package/dist/layer/modeler/resizer.js +333 -0
- package/dist/layer/modeler/resizer.js.map +1 -0
- package/dist/layer/modeler/rotator.js +134 -0
- package/dist/layer/modeler/rotator.js.map +1 -0
- package/dist/layer/modeling-layer.js +491 -0
- package/dist/layer/modeling-layer.js.map +1 -0
- package/dist/layer/reaction-layer.js +111 -0
- package/dist/layer/reaction-layer.js.map +1 -0
- package/dist/layer/scroll-layer.js +191 -0
- package/dist/layer/scroll-layer.js.map +1 -0
- package/dist/layer/selection/selected-finder.js +96 -0
- package/dist/layer/selection/selected-finder.js.map +1 -0
- package/dist/layer/selection-layer.js +373 -0
- package/dist/layer/selection-layer.js.map +1 -0
- package/dist/layer/shift-layer.js +83 -0
- package/dist/layer/shift-layer.js.map +1 -0
- package/dist/layout/absolute.js +30 -0
- package/dist/layout/absolute.js.map +1 -0
- package/dist/layout/card.js +52 -0
- package/dist/layout/card.js.map +1 -0
- package/dist/layout/html-absolute.js +32 -0
- package/dist/layout/html-absolute.js.map +1 -0
- package/dist/layout/index.js +56 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/layout.js +36 -0
- package/dist/layout/layout.js.map +1 -0
- package/dist/layout/linear-horizontal.js +56 -0
- package/dist/layout/linear-horizontal.js.map +1 -0
- package/dist/layout/linear-vertical.js +56 -0
- package/dist/layout/linear-vertical.js.map +1 -0
- package/dist/layout/table.js +106 -0
- package/dist/layout/table.js.map +1 -0
- package/dist/license/license.js +170 -0
- package/dist/license/license.js.map +1 -0
- package/dist/model/compile.js +40 -0
- package/dist/model/compile.js.map +1 -0
- package/dist/model/duplicate.js +19 -0
- package/dist/model/duplicate.js.map +1 -0
- package/dist/model/index.js +34 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/selector.js +104 -0
- package/dist/model/selector.js.map +1 -0
- package/dist/style/compile.js +14 -0
- package/dist/style/compile.js.map +1 -0
- package/dist/style/index.js +14 -0
- package/dist/style/index.js.map +1 -0
- package/dist/things-scene/api/add-start.js +18 -0
- package/dist/things-scene/api/add-start.js.map +1 -0
- package/dist/things-scene/api/add.js +71 -0
- package/dist/things-scene/api/add.js.map +1 -0
- package/dist/things-scene/api/align.js +116 -0
- package/dist/things-scene/api/align.js.map +1 -0
- package/dist/things-scene/api/center-to.js +50 -0
- package/dist/things-scene/api/center-to.js.map +1 -0
- package/dist/things-scene/api/change.js +27 -0
- package/dist/things-scene/api/change.js.map +1 -0
- package/dist/things-scene/api/clipboard.js +45 -0
- package/dist/things-scene/api/clipboard.js.map +1 -0
- package/dist/things-scene/api/distribute.js +57 -0
- package/dist/things-scene/api/distribute.js.map +1 -0
- package/dist/things-scene/api/duplicate.js +47 -0
- package/dist/things-scene/api/duplicate.js.map +1 -0
- package/dist/things-scene/api/fullscreen.js +26 -0
- package/dist/things-scene/api/fullscreen.js.map +1 -0
- package/dist/things-scene/api/group.js +91 -0
- package/dist/things-scene/api/group.js.map +1 -0
- package/dist/things-scene/api/ids.js +28 -0
- package/dist/things-scene/api/ids.js.map +1 -0
- package/dist/things-scene/api/index.js +192 -0
- package/dist/things-scene/api/index.js.map +1 -0
- package/dist/things-scene/api/listener.js +69 -0
- package/dist/things-scene/api/listener.js.map +1 -0
- package/dist/things-scene/api/paste-start.js +27 -0
- package/dist/things-scene/api/paste-start.js.map +1 -0
- package/dist/things-scene/api/place.js +98 -0
- package/dist/things-scene/api/place.js.map +1 -0
- package/dist/things-scene/api/remove.js +57 -0
- package/dist/things-scene/api/remove.js.map +1 -0
- package/dist/things-scene/api/symmetry.js +47 -0
- package/dist/things-scene/api/symmetry.js.map +1 -0
- package/dist/things-scene/api/to-data-url.js +76 -0
- package/dist/things-scene/api/to-data-url.js.map +1 -0
- package/dist/things-scene/api/zorder.js +68 -0
- package/dist/things-scene/api/zorder.js.map +1 -0
- package/dist/things-scene/application-context.js +168 -0
- package/dist/things-scene/application-context.js.map +1 -0
- package/dist/things-scene/config.js +18 -0
- package/dist/things-scene/config.js.map +1 -0
- package/dist/things-scene/create.js +67 -0
- package/dist/things-scene/create.js.map +1 -0
- package/dist/things-scene/fps.js +26 -0
- package/dist/things-scene/fps.js.map +1 -0
- package/dist/things-scene/index.js +152 -0
- package/dist/things-scene/index.js.map +1 -0
- package/dist/things-scene/polyfill.js +111 -0
- package/dist/things-scene/polyfill.js.map +1 -0
- package/dist/things-scene/scene.js +442 -0
- package/dist/things-scene/scene.js.map +1 -0
- package/dist/things-scene/version.js +12 -0
- package/dist/things-scene/version.js.map +1 -0
- package/package.json +8 -6
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.WEST = exports.SOUTH = exports.NORTH = exports.EAST = void 0;
|
|
7
|
+
var _component = _interopRequireDefault(require("./component.js"));
|
|
8
|
+
var _line = require("./drawer/line.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/*
|
|
11
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const NORTH = exports.NORTH = 'N';
|
|
15
|
+
const SOUTH = exports.SOUTH = 'S';
|
|
16
|
+
const EAST = exports.EAST = 'E';
|
|
17
|
+
const WEST = exports.WEST = 'W';
|
|
18
|
+
class LinkEnd {
|
|
19
|
+
constructor({
|
|
20
|
+
component,
|
|
21
|
+
anchor,
|
|
22
|
+
position,
|
|
23
|
+
self
|
|
24
|
+
}) {
|
|
25
|
+
this.component = component; /* component */
|
|
26
|
+
this._anchorName = anchor;
|
|
27
|
+
this._position = position;
|
|
28
|
+
this.self = self;
|
|
29
|
+
}
|
|
30
|
+
get position() {
|
|
31
|
+
const anchor = this.anchor;
|
|
32
|
+
if (anchor) {
|
|
33
|
+
var {
|
|
34
|
+
position
|
|
35
|
+
} = anchor;
|
|
36
|
+
const fromTop = this.component.transcoordS2T(position.x, position.y);
|
|
37
|
+
return this.self.transcoordT2P(fromTop.x, fromTop.y);
|
|
38
|
+
}
|
|
39
|
+
return this._position;
|
|
40
|
+
}
|
|
41
|
+
set position({
|
|
42
|
+
x,
|
|
43
|
+
y
|
|
44
|
+
}) {
|
|
45
|
+
this._position = {
|
|
46
|
+
x,
|
|
47
|
+
y
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
get anchor() {
|
|
51
|
+
return this.component?.findAnchor(this._anchorName /* anchor name */);
|
|
52
|
+
}
|
|
53
|
+
get direction() {
|
|
54
|
+
const bounds = this.component.bounds;
|
|
55
|
+
const anchor = this.anchor;
|
|
56
|
+
if (!anchor) {
|
|
57
|
+
return EAST;
|
|
58
|
+
}
|
|
59
|
+
const position = anchor.position;
|
|
60
|
+
if (position.y <= bounds.top) {
|
|
61
|
+
return NORTH;
|
|
62
|
+
}
|
|
63
|
+
if (position.y >= bounds.top + bounds.height) {
|
|
64
|
+
return SOUTH;
|
|
65
|
+
}
|
|
66
|
+
if (position.x <= bounds.left) {
|
|
67
|
+
return WEST;
|
|
68
|
+
}
|
|
69
|
+
return EAST;
|
|
70
|
+
}
|
|
71
|
+
get boundaryPosition() {
|
|
72
|
+
const anchor = this.anchor;
|
|
73
|
+
if (anchor) {
|
|
74
|
+
var {
|
|
75
|
+
position
|
|
76
|
+
} = anchor;
|
|
77
|
+
var dx = 0,
|
|
78
|
+
dy = 0;
|
|
79
|
+
switch (this.direction) {
|
|
80
|
+
case SOUTH:
|
|
81
|
+
dy = 20;
|
|
82
|
+
break;
|
|
83
|
+
case NORTH:
|
|
84
|
+
dy = -20;
|
|
85
|
+
break;
|
|
86
|
+
case WEST:
|
|
87
|
+
dx = -20;
|
|
88
|
+
break;
|
|
89
|
+
case EAST:
|
|
90
|
+
default:
|
|
91
|
+
dx = 20;
|
|
92
|
+
}
|
|
93
|
+
position = {
|
|
94
|
+
x: position.x + dx,
|
|
95
|
+
y: position.y + dy
|
|
96
|
+
};
|
|
97
|
+
const fromTop = this.component.transcoordS2T(position.x, position.y);
|
|
98
|
+
return this.self.transcoordT2P(fromTop.x, fromTop.y);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* LinkEndConfig definition
|
|
105
|
+
* @typedef {Object} LinkEndConfig
|
|
106
|
+
* @property {string} component - end component refid
|
|
107
|
+
* @property {string} anchor - end anchor name of end component
|
|
108
|
+
* @property {Position} position - position of the link end
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Line type definition
|
|
113
|
+
* @typedef {Object} Line
|
|
114
|
+
* @property {LinkEndConfig} from
|
|
115
|
+
* @property {LinkEndConfig} to
|
|
116
|
+
* @property {LinkEnd} fromEnd
|
|
117
|
+
* @property {LinkEnd} toEnd
|
|
118
|
+
*/
|
|
119
|
+
class Line extends _component.default {
|
|
120
|
+
isLine() {
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
replaceRefids(replaceMap) {
|
|
124
|
+
;
|
|
125
|
+
['from', 'to'].forEach(fromto => {
|
|
126
|
+
const anchor = this.get(fromto);
|
|
127
|
+
if (anchor?.component) {
|
|
128
|
+
const refid = replaceMap.get(anchor.component) || anchor.component;
|
|
129
|
+
this.set(fromto, {
|
|
130
|
+
...anchor,
|
|
131
|
+
component: refid
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
get fromEnd() {
|
|
137
|
+
if (this.parent && !this._fromEnd) {
|
|
138
|
+
const {
|
|
139
|
+
component,
|
|
140
|
+
anchor,
|
|
141
|
+
position
|
|
142
|
+
} = this.getState('from') || {};
|
|
143
|
+
if (!component) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const componentObject = this.root?.findByRefid(component);
|
|
147
|
+
if (!componentObject) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this._fromEnd = new LinkEnd({
|
|
151
|
+
component: componentObject,
|
|
152
|
+
fromto: 'from',
|
|
153
|
+
anchor,
|
|
154
|
+
position,
|
|
155
|
+
self: this
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return this._fromEnd;
|
|
159
|
+
}
|
|
160
|
+
get from() {
|
|
161
|
+
return this.getState('from');
|
|
162
|
+
}
|
|
163
|
+
set from(from) {
|
|
164
|
+
delete this._fromEnd;
|
|
165
|
+
this.set('from', from);
|
|
166
|
+
}
|
|
167
|
+
get toEnd() {
|
|
168
|
+
if (this.parent && !this._toEnd) {
|
|
169
|
+
const {
|
|
170
|
+
component,
|
|
171
|
+
anchor,
|
|
172
|
+
position
|
|
173
|
+
} = this.getState('to') || {};
|
|
174
|
+
if (!component) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const componentObject = this.root?.findByRefid(component);
|
|
178
|
+
if (!componentObject) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
this._toEnd = new LinkEnd({
|
|
182
|
+
component: componentObject,
|
|
183
|
+
fromto: 'to',
|
|
184
|
+
anchor,
|
|
185
|
+
position,
|
|
186
|
+
self: this
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
return this._toEnd;
|
|
190
|
+
}
|
|
191
|
+
get to() {
|
|
192
|
+
return this.getState('to');
|
|
193
|
+
}
|
|
194
|
+
set to(to) {
|
|
195
|
+
delete this._toEnd;
|
|
196
|
+
this.set('to', to);
|
|
197
|
+
}
|
|
198
|
+
move({
|
|
199
|
+
x,
|
|
200
|
+
y
|
|
201
|
+
}, absolutly) {
|
|
202
|
+
if (absolutly) {
|
|
203
|
+
/* move시에는 먼저 anchor들을 detach한다. */
|
|
204
|
+
this.from = {
|
|
205
|
+
position: this._fromEnd?.position || this.getState('from')?.position || {
|
|
206
|
+
x: 0,
|
|
207
|
+
y: 0
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
this.to = {
|
|
211
|
+
position: this._toEnd?.position || this.getState('to')?.position || {
|
|
212
|
+
x: 0,
|
|
213
|
+
y: 0
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
super.move({
|
|
218
|
+
x,
|
|
219
|
+
y
|
|
220
|
+
}, absolutly);
|
|
221
|
+
}
|
|
222
|
+
render(ctx) {
|
|
223
|
+
var {
|
|
224
|
+
begin = 'none',
|
|
225
|
+
end = 'none',
|
|
226
|
+
lineWidth,
|
|
227
|
+
round = 0
|
|
228
|
+
} = this.state;
|
|
229
|
+
var path = this.drawPath;
|
|
230
|
+
(0, _line.drawEndTips)(ctx, path, this.state);
|
|
231
|
+
ctx.beginPath();
|
|
232
|
+
var beginPos = (0, _line.getTipNeckPos)(begin, lineWidth, path[0], path[1]);
|
|
233
|
+
var endPos = (0, _line.getTipNeckPos)(end, lineWidth, path[path.length - 1], path[path.length - 2]);
|
|
234
|
+
path = [beginPos, ...path.slice(1, -1), endPos];
|
|
235
|
+
var cursor = {
|
|
236
|
+
x: beginPos.x,
|
|
237
|
+
y: beginPos.y
|
|
238
|
+
};
|
|
239
|
+
ctx.moveTo(beginPos.x, beginPos.y);
|
|
240
|
+
for (var i = 1; i < path.length; i++) {
|
|
241
|
+
const prev = cursor;
|
|
242
|
+
cursor = path[i];
|
|
243
|
+
const next = path[i + 1];
|
|
244
|
+
if (prev.x === cursor.x && prev.y === cursor.y) {
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
if (!next) {
|
|
248
|
+
ctx.lineTo(cursor.x, cursor.y);
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
var length = Math.sqrt((prev.x - cursor.x) * (prev.x - cursor.x) + (prev.y - cursor.y) * (prev.y - cursor.y));
|
|
252
|
+
var theta = length !== 0 ? Math.atan2(prev.x - cursor.x, prev.y - cursor.y) : 0;
|
|
253
|
+
var x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x;
|
|
254
|
+
var y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y;
|
|
255
|
+
const p1 = round > 0 || length !== 0 ? {
|
|
256
|
+
x,
|
|
257
|
+
y
|
|
258
|
+
} : cursor;
|
|
259
|
+
var length = Math.sqrt((next.x - cursor.x) * (next.x - cursor.x) + (next.y - cursor.y) * (next.y - cursor.y));
|
|
260
|
+
theta = length !== 0 ? Math.atan2(next.x - cursor.x, next.y - cursor.y) : 0;
|
|
261
|
+
x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x;
|
|
262
|
+
y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y;
|
|
263
|
+
const p2 = round > 0 || length !== 0 ? {
|
|
264
|
+
x,
|
|
265
|
+
y
|
|
266
|
+
} : cursor;
|
|
267
|
+
ctx.lineTo(p1.x, p1.y);
|
|
268
|
+
round > 0 && ctx.quadraticCurveTo(cursor.x, cursor.y, p2.x, p2.y);
|
|
269
|
+
}
|
|
270
|
+
this.drawStroke(ctx);
|
|
271
|
+
}
|
|
272
|
+
contains(x, y) {
|
|
273
|
+
// 효율을 위해서, contains를 호출하기 전에 x, y좌표값은 이 컴포넌트에 대해서 이미 transcoord 된 상태이다.
|
|
274
|
+
// 참조 : capture(x, y)
|
|
275
|
+
var {
|
|
276
|
+
lineWidth
|
|
277
|
+
} = this.state;
|
|
278
|
+
return (0, _line.containedInPath)(x, y, this.drawPath, lineWidth);
|
|
279
|
+
}
|
|
280
|
+
get resizable() {
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
get mutable() {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
get rotatable() {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
get path() {
|
|
290
|
+
const {
|
|
291
|
+
from,
|
|
292
|
+
to
|
|
293
|
+
} = this.state;
|
|
294
|
+
var {
|
|
295
|
+
x1,
|
|
296
|
+
y1,
|
|
297
|
+
x2,
|
|
298
|
+
y2
|
|
299
|
+
} = this.state;
|
|
300
|
+
return [this.fromEnd?.position || from?.position || {
|
|
301
|
+
x: x1,
|
|
302
|
+
y: y1
|
|
303
|
+
}, this.toEnd?.position || to?.position || {
|
|
304
|
+
x: x2,
|
|
305
|
+
y: y2
|
|
306
|
+
}];
|
|
307
|
+
}
|
|
308
|
+
set path(path) {
|
|
309
|
+
const [p1, p2] = path;
|
|
310
|
+
const {
|
|
311
|
+
from,
|
|
312
|
+
to
|
|
313
|
+
} = this.state;
|
|
314
|
+
delete this._fromEnd;
|
|
315
|
+
delete this._toEnd;
|
|
316
|
+
this.set({
|
|
317
|
+
from: {
|
|
318
|
+
...from,
|
|
319
|
+
position: p1
|
|
320
|
+
},
|
|
321
|
+
to: {
|
|
322
|
+
...to,
|
|
323
|
+
position: p2
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
get textBounds() {
|
|
328
|
+
var path = this.drawPath;
|
|
329
|
+
var from, to;
|
|
330
|
+
var maxLength = 0;
|
|
331
|
+
|
|
332
|
+
/* Find the longest path and set its midpoint as textBounds */
|
|
333
|
+
for (let i = 1; i < path.length; i++) {
|
|
334
|
+
var prev = path[i - 1];
|
|
335
|
+
var next = path[i];
|
|
336
|
+
var length = (prev.x - next.x) * (prev.x - next.x) + (prev.y - next.y) * (prev.y - next.y);
|
|
337
|
+
if (length > maxLength) {
|
|
338
|
+
// In case of similar length, the front pass takes precedence.(비슷한 길이인 경우에는 앞쪽 패스를 우선시한다)
|
|
339
|
+
maxLength = Math.ceil(length);
|
|
340
|
+
from = prev;
|
|
341
|
+
to = next;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
var {
|
|
345
|
+
paddingTop,
|
|
346
|
+
paddingLeft,
|
|
347
|
+
paddingRight,
|
|
348
|
+
paddingBottom
|
|
349
|
+
} = this.state;
|
|
350
|
+
paddingBottom ||= 0;
|
|
351
|
+
paddingTop ||= 0;
|
|
352
|
+
paddingLeft ||= 0;
|
|
353
|
+
paddingRight ||= 0;
|
|
354
|
+
return {
|
|
355
|
+
left: Math.min(from.x, to.x) + paddingLeft,
|
|
356
|
+
top: Math.min(from.y, to.y) + paddingTop,
|
|
357
|
+
width: Math.max(Math.abs(from.x - to.x) - paddingLeft - paddingRight, 0),
|
|
358
|
+
height: Math.max(Math.abs(from.y - to.y) - paddingTop - paddingBottom, 0)
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
get decorators() {
|
|
362
|
+
return ['decotag'];
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
exports.default = Line;
|
|
366
|
+
Line.getTipNeckPos = _line.getTipNeckPos;
|
|
367
|
+
Line.containedInPath = _line.containedInPath;
|
|
368
|
+
Line.drawEndTips = _line.drawEndTips;
|
|
369
|
+
|
|
370
|
+
/* anchor에 붙은 line은 모델의 변경없이도 position이 변화할 수 있으므로, memoize를 하지 않는다. */
|
|
371
|
+
// Component.memoize(Line.prototype, 'path', false)
|
|
372
|
+
|
|
373
|
+
_component.default.register('line', Line);
|
|
374
|
+
//# sourceMappingURL=line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line.js","names":["_component","_interopRequireDefault","require","_line","e","__esModule","default","NORTH","exports","SOUTH","EAST","WEST","LinkEnd","constructor","component","anchor","position","self","_anchorName","_position","fromTop","transcoordS2T","x","y","transcoordT2P","findAnchor","direction","bounds","top","height","left","boundaryPosition","dx","dy","Line","Component","isLine","replaceRefids","replaceMap","forEach","fromto","get","refid","set","fromEnd","parent","_fromEnd","getState","componentObject","root","findByRefid","from","toEnd","_toEnd","to","move","absolutly","render","ctx","begin","end","lineWidth","round","state","path","drawPath","drawEndTips","beginPath","beginPos","getTipNeckPos","endPos","length","slice","cursor","moveTo","i","prev","next","lineTo","Math","sqrt","theta","atan2","sin","min","cos","p1","p2","quadraticCurveTo","drawStroke","contains","containedInPath","resizable","mutable","rotatable","x1","y1","x2","y2","textBounds","maxLength","ceil","paddingTop","paddingLeft","paddingRight","paddingBottom","width","max","abs","decorators","register"],"sources":["../../src/components/line.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport Component from './component.js'\nimport { containedInPath, drawEndTips, getTipNeckPos } from './drawer/line.js'\n\nexport const NORTH = 'N'\nexport const SOUTH = 'S'\nexport const EAST = 'E'\nexport const WEST = 'W'\n\nclass LinkEnd {\n constructor({ component, anchor, position, self }) {\n this.component = component /* component */\n this._anchorName = anchor\n this._position = position\n this.self = self\n }\n\n get position() {\n const anchor = this.anchor\n if (anchor) {\n var { position } = anchor\n\n const fromTop = this.component.transcoordS2T(position.x, position.y)\n return this.self.transcoordT2P(fromTop.x, fromTop.y)\n }\n\n return this._position\n }\n\n set position({ x, y }) {\n this._position = { x, y }\n }\n\n get anchor() {\n return this.component?.findAnchor(this._anchorName /* anchor name */)\n }\n\n get direction() {\n const bounds = this.component.bounds\n const anchor = this.anchor\n\n if (!anchor) {\n return EAST\n }\n\n const position = anchor.position\n\n if (position.y <= bounds.top) {\n return NORTH\n }\n if (position.y >= bounds.top + bounds.height) {\n return SOUTH\n }\n if (position.x <= bounds.left) {\n return WEST\n }\n\n return EAST\n }\n\n get boundaryPosition() {\n const anchor = this.anchor\n\n if (anchor) {\n var { position } = anchor\n\n var dx = 0,\n dy = 0\n switch (this.direction) {\n case SOUTH:\n dy = 20\n break\n case NORTH:\n dy = -20\n break\n case WEST:\n dx = -20\n break\n case EAST:\n default:\n dx = 20\n }\n\n position = {\n x: position.x + dx,\n y: position.y + dy\n }\n\n const fromTop = this.component.transcoordS2T(position.x, position.y)\n return this.self.transcoordT2P(fromTop.x, fromTop.y)\n }\n }\n}\n\n/**\n * LinkEndConfig definition\n * @typedef {Object} LinkEndConfig\n * @property {string} component - end component refid\n * @property {string} anchor - end anchor name of end component\n * @property {Position} position - position of the link end\n */\n\n/**\n * Line type definition\n * @typedef {Object} Line\n * @property {LinkEndConfig} from\n * @property {LinkEndConfig} to\n * @property {LinkEnd} fromEnd\n * @property {LinkEnd} toEnd\n */\nexport default class Line extends Component {\n isLine() {\n return true\n }\n\n replaceRefids(replaceMap) {\n ;['from', 'to'].forEach(fromto => {\n const anchor = this.get(fromto)\n if (anchor?.component) {\n const refid = replaceMap.get(anchor.component) || anchor.component\n this.set(fromto, {\n ...anchor,\n component: refid\n })\n }\n })\n }\n\n get fromEnd() {\n if (this.parent && !this._fromEnd) {\n const { component, anchor, position } = this.getState('from') || {}\n\n if (!component) {\n return\n }\n\n const componentObject = this.root?.findByRefid(component)\n if (!componentObject) {\n return\n }\n\n this._fromEnd = new LinkEnd({\n component: componentObject,\n fromto: 'from',\n anchor,\n position,\n self: this\n })\n }\n\n return this._fromEnd\n }\n\n get from() {\n return this.getState('from')\n }\n\n set from(from) {\n delete this._fromEnd\n this.set('from', from)\n }\n\n get toEnd() {\n if (this.parent && !this._toEnd) {\n const { component, anchor, position } = this.getState('to') || {}\n\n if (!component) {\n return\n }\n\n const componentObject = this.root?.findByRefid(component)\n if (!componentObject) {\n return\n }\n\n this._toEnd = new LinkEnd({\n component: componentObject,\n fromto: 'to',\n anchor,\n position,\n self: this\n })\n }\n\n return this._toEnd\n }\n\n get to() {\n return this.getState('to')\n }\n\n set to(to) {\n delete this._toEnd\n this.set('to', to)\n }\n\n move({ x, y }, absolutly) {\n if (absolutly) {\n /* move시에는 먼저 anchor들을 detach한다. */\n this.from = {\n position: this._fromEnd?.position || this.getState('from')?.position || { x: 0, y: 0 }\n }\n this.to = {\n position: this._toEnd?.position || this.getState('to')?.position || { x: 0, y: 0 }\n }\n }\n\n super.move({ x, y }, absolutly)\n }\n\n render(ctx) {\n var { begin = 'none', end = 'none', lineWidth, round = 0 } = this.state\n\n var path = this.drawPath\n\n drawEndTips(ctx, path, this.state)\n\n ctx.beginPath()\n\n var beginPos = getTipNeckPos(begin, lineWidth, path[0], path[1])\n var endPos = getTipNeckPos(end, lineWidth, path[path.length - 1], path[path.length - 2])\n\n path = [beginPos, ...path.slice(1, -1), endPos]\n var cursor = { x: beginPos.x, y: beginPos.y }\n ctx.moveTo(beginPos.x, beginPos.y)\n\n for (var i = 1; i < path.length; i++) {\n const prev = cursor\n cursor = path[i]\n\n const next = path[i + 1]\n if (prev.x === cursor.x && prev.y === cursor.y) {\n continue\n }\n\n if (!next) {\n ctx.lineTo(cursor.x, cursor.y)\n break\n }\n\n var length = Math.sqrt((prev.x - cursor.x) * (prev.x - cursor.x) + (prev.y - cursor.y) * (prev.y - cursor.y))\n var theta = length !== 0 ? Math.atan2(prev.x - cursor.x, prev.y - cursor.y) : 0\n var x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x\n var y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y\n\n const p1 = round > 0 || length !== 0 ? { x, y } : cursor\n\n var length = Math.sqrt((next.x - cursor.x) * (next.x - cursor.x) + (next.y - cursor.y) * (next.y - cursor.y))\n theta = length !== 0 ? Math.atan2(next.x - cursor.x, next.y - cursor.y) : 0\n x = Math.sin(theta) * Math.min(round, length / 2) + cursor.x\n y = Math.cos(theta) * Math.min(round, length / 2) + cursor.y\n\n const p2 = round > 0 || length !== 0 ? { x, y } : cursor\n\n ctx.lineTo(p1.x, p1.y)\n round > 0 && ctx.quadraticCurveTo(cursor.x, cursor.y, p2.x, p2.y)\n }\n\n this.drawStroke(ctx)\n }\n\n contains(x, y) {\n // 효율을 위해서, contains를 호출하기 전에 x, y좌표값은 이 컴포넌트에 대해서 이미 transcoord 된 상태이다.\n // 참조 : capture(x, y)\n var { lineWidth } = this.state\n\n return containedInPath(x, y, this.drawPath, lineWidth)\n }\n\n get resizable() {\n return false\n }\n\n get mutable() {\n return true\n }\n\n get rotatable() {\n return false\n }\n\n get path() {\n const { from, to } = this.state\n var { x1, y1, x2, y2 } = this.state\n\n return [\n this.fromEnd?.position ||\n from?.position || {\n x: x1,\n y: y1\n },\n this.toEnd?.position ||\n to?.position || {\n x: x2,\n y: y2\n }\n ]\n }\n\n set path(path) {\n const [p1, p2] = path\n const { from, to } = this.state\n\n delete this._fromEnd\n delete this._toEnd\n\n this.set({\n from: {\n ...from,\n position: p1\n },\n to: {\n ...to,\n position: p2\n }\n })\n }\n\n get textBounds() {\n var path = this.drawPath\n\n var from, to\n var maxLength = 0\n\n /* Find the longest path and set its midpoint as textBounds */\n for (let i = 1; i < path.length; i++) {\n var prev = path[i - 1]\n var next = path[i]\n\n var length = (prev.x - next.x) * (prev.x - next.x) + (prev.y - next.y) * (prev.y - next.y)\n if (length > maxLength) {\n // In case of similar length, the front pass takes precedence.(비슷한 길이인 경우에는 앞쪽 패스를 우선시한다)\n maxLength = Math.ceil(length)\n from = prev\n to = next\n }\n }\n\n var { paddingTop, paddingLeft, paddingRight, paddingBottom } = this.state\n\n paddingBottom ||= 0\n paddingTop ||= 0\n paddingLeft ||= 0\n paddingRight ||= 0\n\n return {\n left: Math.min(from.x, to.x) + paddingLeft,\n top: Math.min(from.y, to.y) + paddingTop,\n width: Math.max(Math.abs(from.x - to.x) - paddingLeft - paddingRight, 0),\n height: Math.max(Math.abs(from.y - to.y) - paddingTop - paddingBottom, 0)\n }\n }\n\n get decorators() {\n return ['decotag']\n }\n}\n\nLine.getTipNeckPos = getTipNeckPos\nLine.containedInPath = containedInPath\nLine.drawEndTips = drawEndTips\n\n/* anchor에 붙은 line은 모델의 변경없이도 position이 변화할 수 있으므로, memoize를 하지 않는다. */\n// Component.memoize(Line.prototype, 'path', false)\n\nComponent.register('line', Line)\n"],"mappings":";;;;;;AAIA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAA8E,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CA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EAAE5E,IAAI,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _component = _interopRequireDefault(require("./component.js"));
|
|
8
|
+
var _shape = _interopRequireDefault(require("./shape.js"));
|
|
9
|
+
var _rectPath = _interopRequireDefault(require("./mixins/rect-path.js"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/*
|
|
12
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const NATURE = {
|
|
16
|
+
mutable: false,
|
|
17
|
+
resizable: true,
|
|
18
|
+
rotatable: true,
|
|
19
|
+
properties: [{
|
|
20
|
+
type: 'id-input',
|
|
21
|
+
label: 'ref',
|
|
22
|
+
name: 'ref'
|
|
23
|
+
}, {
|
|
24
|
+
type: 'select',
|
|
25
|
+
label: 'fit',
|
|
26
|
+
name: 'fit',
|
|
27
|
+
property: {
|
|
28
|
+
options: ['', 'both', 'ratio']
|
|
29
|
+
}
|
|
30
|
+
}],
|
|
31
|
+
'value-property': 'ref',
|
|
32
|
+
help: 'scene/component/local-ref'
|
|
33
|
+
};
|
|
34
|
+
class LocalRef extends (0, _rectPath.default)(_shape.default) {
|
|
35
|
+
get ref() {
|
|
36
|
+
var ref = this.getState('ref');
|
|
37
|
+
if (!ref || typeof ref != 'string') return null;
|
|
38
|
+
return this.root.findById(ref);
|
|
39
|
+
}
|
|
40
|
+
set ref(ref) {
|
|
41
|
+
this.setState('ref', ref);
|
|
42
|
+
}
|
|
43
|
+
get refScale() {
|
|
44
|
+
let targetBounds = this.ref.bounds;
|
|
45
|
+
let bounds = this.bounds;
|
|
46
|
+
let sx = bounds.width / targetBounds.width;
|
|
47
|
+
let sy = bounds.height / targetBounds.height;
|
|
48
|
+
switch (this.model.fit) {
|
|
49
|
+
case 'both':
|
|
50
|
+
return {
|
|
51
|
+
x: sx,
|
|
52
|
+
y: sy
|
|
53
|
+
};
|
|
54
|
+
break;
|
|
55
|
+
case 'ratio':
|
|
56
|
+
default:
|
|
57
|
+
return {
|
|
58
|
+
x: Math.min(sx, sy),
|
|
59
|
+
y: Math.min(sx, sy)
|
|
60
|
+
};
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
draw(ctx) {
|
|
65
|
+
if (this._drawing) return;
|
|
66
|
+
this._drawing = true;
|
|
67
|
+
super.draw(ctx);
|
|
68
|
+
this._drawing = false;
|
|
69
|
+
}
|
|
70
|
+
prerender(ctx) {
|
|
71
|
+
super.prerender(ctx);
|
|
72
|
+
if (this.ref) {
|
|
73
|
+
let targetCenter = this.ref.center;
|
|
74
|
+
let center = this.center;
|
|
75
|
+
let scale = this.refScale;
|
|
76
|
+
ctx.translate(center.x, center.y);
|
|
77
|
+
ctx.scale(scale.x, scale.y);
|
|
78
|
+
ctx.translate(-targetCenter.x, -targetCenter.y);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
postrender(ctx) {
|
|
82
|
+
if (this.ref) return this.ref.postrender(ctx);
|
|
83
|
+
super.postrender(ctx);
|
|
84
|
+
}
|
|
85
|
+
render(ctx) {
|
|
86
|
+
if (this.ref) return this.ref.render(ctx);
|
|
87
|
+
var {
|
|
88
|
+
round = 0
|
|
89
|
+
} = this.state;
|
|
90
|
+
var {
|
|
91
|
+
left,
|
|
92
|
+
top,
|
|
93
|
+
width,
|
|
94
|
+
height
|
|
95
|
+
} = this.bounds;
|
|
96
|
+
|
|
97
|
+
// 박스 그리기
|
|
98
|
+
ctx.beginPath();
|
|
99
|
+
ctx.rect(left, top, width, height);
|
|
100
|
+
|
|
101
|
+
// TODO Logic
|
|
102
|
+
}
|
|
103
|
+
get nature() {
|
|
104
|
+
return NATURE;
|
|
105
|
+
}
|
|
106
|
+
get hasTextProperty() {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.default = LocalRef;
|
|
111
|
+
_component.default.memoize(LocalRef.prototype, 'ref', false);
|
|
112
|
+
_component.default.memoize(LocalRef.prototype, 'refScale', false);
|
|
113
|
+
_component.default.register('local-ref', LocalRef);
|
|
114
|
+
//# sourceMappingURL=local-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-ref.js","names":["_component","_interopRequireDefault","require","_shape","_rectPath","e","__esModule","default","NATURE","mutable","resizable","rotatable","properties","type","label","name","property","options","help","LocalRef","RectPath","Shape","ref","getState","root","findById","setState","refScale","targetBounds","bounds","sx","width","sy","height","model","fit","x","y","Math","min","draw","ctx","_drawing","prerender","targetCenter","center","scale","translate","postrender","render","round","state","left","top","beginPath","rect","nature","hasTextProperty","exports","Component","memoize","prototype","register"],"sources":["../../src/components/local-ref.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport Component from './component.js'\nimport Shape from './shape.js'\n\nimport RectPath from './mixins/rect-path.js'\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'id-input',\n label: 'ref',\n name: 'ref'\n },\n {\n type: 'select',\n label: 'fit',\n name: 'fit',\n property: {\n options: ['', 'both', 'ratio']\n }\n }\n ],\n 'value-property': 'ref',\n help: 'scene/component/local-ref'\n}\n\nexport default class LocalRef extends RectPath(Shape) {\n get ref() {\n var ref = this.getState('ref')\n\n if (!ref || typeof ref != 'string') return null\n\n return this.root.findById(ref)\n }\n\n set ref(ref) {\n this.setState('ref', ref)\n }\n\n get refScale() {\n let targetBounds = this.ref.bounds\n let bounds = this.bounds\n\n let sx = bounds.width / targetBounds.width\n let sy = bounds.height / targetBounds.height\n\n switch (this.model.fit) {\n case 'both':\n return {\n x: sx,\n y: sy\n }\n break\n case 'ratio':\n default:\n return {\n x: Math.min(sx, sy),\n y: Math.min(sx, sy)\n }\n break\n }\n }\n\n draw(ctx) {\n if (this._drawing) return\n\n this._drawing = true\n super.draw(ctx)\n this._drawing = false\n }\n\n prerender(ctx) {\n super.prerender(ctx)\n\n if (this.ref) {\n let targetCenter = this.ref.center\n let center = this.center\n\n let scale = this.refScale\n\n ctx.translate(center.x, center.y)\n ctx.scale(scale.x, scale.y)\n ctx.translate(-targetCenter.x, -targetCenter.y)\n }\n }\n\n postrender(ctx) {\n if (this.ref) return this.ref.postrender(ctx)\n\n super.postrender(ctx)\n }\n\n render(ctx) {\n if (this.ref) return this.ref.render(ctx)\n\n var { round = 0 } = this.state\n\n var { left, top, width, height } = this.bounds\n\n // 박스 그리기\n ctx.beginPath()\n\n ctx.rect(left, top, width, height)\n\n // TODO Logic\n }\n\n get nature() {\n return NATURE\n }\n\n get hasTextProperty() {\n return false\n }\n}\n\nComponent.memoize(LocalRef.prototype, 'ref', false)\nComponent.memoize(LocalRef.prototype, 'refScale', false)\n\nComponent.register('local-ref', LocalRef)\n"],"mappings":";;;;;;AAIA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA4C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAP5C;AACA;AACA;;AAOA,MAAMG,MAAM,GAAG;EACbC,OAAO,EAAE,KAAK;EACdC,SAAS,EAAE,IAAI;EACfC,SAAS,EAAE,IAAI;EACfC,UAAU,EAAE,CACV;IACEC,IAAI,EAAE,UAAU;IAChBC,KAAK,EAAE,KAAK;IACZC,IAAI,EAAE;EACR,CAAC,EACD;IACEF,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAE,KAAK;IACZC,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE;MACRC,OAAO,EAAE,CAAC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A,EAAG;IACX,OAAOhD,MAAM;EACf;EAEA,IAAIiD,eAAeA,CAAA,EAAG;IACpB,OAAO,KAAK;EACd;AACF;AAACC,OAAA,CAAAnD,OAAA,GAAAY,QAAA;AAEDwC,kBAAS,CAACC,OAAO,CAACzC,QAAQ,CAAC0C,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC;AACnDF,kBAAS,CAACC,OAAO,CAACzC,QAAQ,CAAC0C,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC;AAExDF,kBAAS,CAACG,QAAQ,CAAC,WAAW,EAAE3C,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _anchor = require("../anchor/anchor.js");
|
|
8
|
+
/*
|
|
9
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
var _default = superclass => {
|
|
12
|
+
var A = class extends superclass {
|
|
13
|
+
isConnectable() {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
postrender(context) {
|
|
17
|
+
super.postrender(context);
|
|
18
|
+
this._draw_anchors(context);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {CanvasRenderingContext2D} context
|
|
24
|
+
*/
|
|
25
|
+
_draw_anchors(context) {
|
|
26
|
+
/**
|
|
27
|
+
* @type {import('../anchor/anchor.js').Anchor[]} anchors
|
|
28
|
+
*/
|
|
29
|
+
var anchors = this.anchors || [];
|
|
30
|
+
context.save();
|
|
31
|
+
anchors.forEach(anchor => {
|
|
32
|
+
var {
|
|
33
|
+
position: {
|
|
34
|
+
x,
|
|
35
|
+
y
|
|
36
|
+
},
|
|
37
|
+
draw
|
|
38
|
+
} = anchor;
|
|
39
|
+
if (draw) {
|
|
40
|
+
context.beginPath();
|
|
41
|
+
try {
|
|
42
|
+
draw.call(anchor, context, this);
|
|
43
|
+
} catch (err) {
|
|
44
|
+
console.error(err);
|
|
45
|
+
}
|
|
46
|
+
context.closePath();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
context.restore();
|
|
50
|
+
}
|
|
51
|
+
contains(x, y) {
|
|
52
|
+
var contains = super.contains(x, y);
|
|
53
|
+
if (contains) {
|
|
54
|
+
return contains;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @type {import('../anchor/anchor.js').Anchor[]} anchors
|
|
59
|
+
*/
|
|
60
|
+
var anchors = this.anchors || [];
|
|
61
|
+
for (let anchor of anchors) {
|
|
62
|
+
const bounds = anchor.bounds;
|
|
63
|
+
if (!bounds) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const {
|
|
67
|
+
left,
|
|
68
|
+
top,
|
|
69
|
+
width,
|
|
70
|
+
height
|
|
71
|
+
} = bounds;
|
|
72
|
+
var contains = x < Math.max(left + width, left) && x > Math.min(left + width, left) && y < Math.max(top + height, top) && y > Math.min(top + height, top);
|
|
73
|
+
if (contains) {
|
|
74
|
+
return contains;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @function findInOutLines
|
|
82
|
+
* @param {string} anchorName
|
|
83
|
+
* @return {Line[]}
|
|
84
|
+
*/
|
|
85
|
+
findInOutLines(anchorName) {
|
|
86
|
+
return (0, _anchor.findInOutLines)(this, anchorName);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @function findOutletLines
|
|
91
|
+
* @parameter {string} anchorName
|
|
92
|
+
* @return {Line[]}
|
|
93
|
+
*/
|
|
94
|
+
findOutletLines(anchorName) {
|
|
95
|
+
return (0, _anchor.findOutletLines)(this, anchorName);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @function findOutletEnds
|
|
100
|
+
* @parameter {string} anchorName
|
|
101
|
+
* @return {Component[]}
|
|
102
|
+
*/
|
|
103
|
+
findOutletEnds(anchorName) {
|
|
104
|
+
return (0, _anchor.findOutletEnds)(this, anchorName);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @function findInletLines
|
|
109
|
+
* @parameter {string} anchorName
|
|
110
|
+
* @return {Line[]}
|
|
111
|
+
*/
|
|
112
|
+
findInletLines(anchorName) {
|
|
113
|
+
return (0, _anchor.findInletLines)(this, anchorName);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @function findInletEnds
|
|
118
|
+
* @parameter {string} anchorName
|
|
119
|
+
* @return {Component[]}
|
|
120
|
+
*/
|
|
121
|
+
findInletEnds(anchorName) {
|
|
122
|
+
return (0, _anchor.findInletEnds)(this, anchorName);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return A;
|
|
126
|
+
};
|
|
127
|
+
exports.default = _default;
|
|
128
|
+
//# sourceMappingURL=connectable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectable.js","names":["_anchor","require","_default","superclass","A","isConnectable","postrender","context","_draw_anchors","anchors","save","forEach","anchor","position","x","y","draw","beginPath","call","err","console","error","closePath","restore","contains","bounds","left","top","width","height","Math","max","min","findInOutLines","anchorName","findOutletLines","findOutletEnds","findInletLines","findInletEnds","exports","default"],"sources":["../../../src/components/mixins/connectable.js"],"sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { findInOutLines, findInletEnds, findInletLines, findOutletEnds, findOutletLines } from '../anchor/anchor.js'\n\nexport default superclass => {\n var A = class extends superclass {\n isConnectable() {\n return true\n }\n\n postrender(context) {\n super.postrender(context)\n\n this._draw_anchors(context)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} context\n */\n _draw_anchors(context) {\n /**\n * @type {import('../anchor/anchor.js').Anchor[]} anchors\n */\n var anchors = this.anchors || []\n\n context.save()\n\n anchors.forEach(anchor => {\n var {\n position: { x, y },\n draw\n } = anchor\n\n if (draw) {\n context.beginPath()\n\n try {\n draw.call(anchor, context, this)\n } catch (err) {\n console.error(err)\n }\n\n context.closePath()\n }\n })\n\n context.restore()\n }\n\n contains(x, y) {\n var contains = super.contains(x, y)\n\n if (contains) {\n return contains\n }\n\n /**\n * @type {import('../anchor/anchor.js').Anchor[]} anchors\n */\n var anchors = this.anchors || []\n\n for (let anchor of anchors) {\n const bounds = anchor.bounds\n\n if (!bounds) {\n continue\n }\n\n const { left, top, width, height } = bounds\n\n var contains =\n x < Math.max(left + width, left) &&\n x > Math.min(left + width, left) &&\n y < Math.max(top + height, top) &&\n y > Math.min(top + height, top)\n\n if (contains) {\n return contains\n }\n }\n\n return false\n }\n\n /**\n * @function findInOutLines\n * @param {string} anchorName\n * @return {Line[]}\n */\n findInOutLines(anchorName) {\n return findInOutLines(this, anchorName)\n }\n\n /**\n * @function findOutletLines\n * @parameter {string} anchorName\n * @return {Line[]}\n */\n findOutletLines(anchorName) {\n return findOutletLines(this, anchorName)\n }\n\n /**\n * @function findOutletEnds\n * @parameter {string} anchorName\n * @return {Component[]}\n */\n findOutletEnds(anchorName) {\n return findOutletEnds(this, anchorName)\n }\n\n /**\n * @function findInletLines\n * @parameter {string} anchorName\n * @return {Line[]}\n */\n findInletLines(anchorName) {\n return findInletLines(this, anchorName)\n }\n\n /**\n * @function findInletEnds\n * @parameter {string} anchorName\n * @return {Component[]}\n */\n findInletEnds(anchorName) {\n return findInletEnds(this, anchorName)\n }\n }\n\n return A\n}\n"],"mappings":";;;;;;AAIA,IAAAA,OAAA,GAAAC,OAAA;AAJA;AACA;AACA;AAFA,IAAAC,QAAA,GAMeC,UAAU,IAAI;EAC3B,IAAIC,CAAC,GAAG,cAAcD,UAAU,CAAC;IAC/BE,aAAaA,CAAA,EAAG;MACd,OAAO,IA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