@visactor/vrender-core 0.20.0-alpha.1 → 0.20.0-alpha.2
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/cjs/animate/Ticker/default-ticker.d.ts +2 -53
- package/cjs/animate/Ticker/default-ticker.js +17 -130
- package/cjs/animate/Ticker/default-ticker.js.map +1 -1
- package/cjs/animate/Ticker/index.d.ts +4 -0
- package/cjs/animate/Ticker/index.js +3 -1
- package/cjs/animate/Ticker/index.js.map +1 -1
- package/cjs/animate/Ticker/manual-ticker-handler.d.ts +15 -0
- package/cjs/animate/Ticker/manual-ticker-handler.js +36 -0
- package/cjs/animate/Ticker/manual-ticker-handler.js.map +1 -0
- package/cjs/animate/Ticker/manual-ticker.d.ts +19 -0
- package/cjs/animate/Ticker/manual-ticker.js +37 -0
- package/cjs/animate/Ticker/manual-ticker.js.map +1 -0
- package/cjs/animate/Ticker/raf-tick-handler.d.ts +9 -0
- package/cjs/animate/Ticker/raf-tick-handler.js +30 -0
- package/cjs/animate/Ticker/raf-tick-handler.js.map +1 -0
- package/cjs/animate/Ticker/timeout-tick-handler.d.ts +9 -0
- package/cjs/animate/Ticker/timeout-tick-handler.js +28 -0
- package/cjs/animate/Ticker/timeout-tick-handler.js.map +1 -0
- package/cjs/animate/Ticker/type.d.ts +6 -0
- package/cjs/animate/Ticker/type.js +11 -0
- package/cjs/animate/Ticker/type.js.map +1 -0
- package/cjs/canvas/conical-gradient.js.map +1 -1
- package/cjs/canvas/contributions/base-canvas.js +4 -13
- package/cjs/canvas/contributions/base-canvas.js.map +1 -1
- package/cjs/common/3d-interceptor.js +1 -2
- package/cjs/common/bounds-context.js +2 -1
- package/cjs/common/morphing-utils.js +1 -1
- package/cjs/common/path-svg.js +1 -1
- package/cjs/common/polygon.js +2 -2
- package/cjs/common/rect-utils.js +1 -1
- package/cjs/common/render-area.js +1 -1
- package/cjs/common/render-command-list.js +1 -2
- package/cjs/common/render-curve.js +1 -1
- package/cjs/common/render-utils.js +1 -1
- package/cjs/common/seg-context.js +1 -1
- package/cjs/common/segment/catmull-rom-close.d.ts +41 -0
- package/cjs/common/segment/catmull-rom-close.js +81 -0
- package/cjs/common/segment/catmull-rom-close.js.map +1 -0
- package/cjs/common/segment/catmull-rom.d.ts +38 -0
- package/cjs/common/segment/catmull-rom.js +97 -0
- package/cjs/common/segment/catmull-rom.js.map +1 -0
- package/cjs/common/segment/index.d.ts +5 -2
- package/cjs/common/segment/index.js +8 -1
- package/cjs/common/segment/index.js.map +1 -1
- package/cjs/common/simplify.js +1 -1
- package/cjs/common/sort.js +1 -1
- package/cjs/common/split-path.js +1 -1
- package/cjs/common/store.js +1 -1
- package/cjs/common/text.js +4 -3
- package/cjs/common/text.js.map +1 -1
- package/cjs/core/application.js +2 -1
- package/cjs/core/camera.js +1 -1
- package/cjs/core/constants.js +1 -1
- package/cjs/core/contributions/layerHandler/modules.js +2 -5
- package/cjs/core/contributions/layerHandler/modules.js.map +1 -1
- package/cjs/core/core-modules.js +1 -1
- package/cjs/core/global-module.js +2 -0
- package/cjs/core/global.js +1 -1
- package/cjs/core/graphic-utils.js +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/layer-service.js +1 -1
- package/cjs/core/layer.js +1 -1
- package/cjs/core/light.js +1 -1
- package/cjs/core/stage.d.ts +2 -2
- package/cjs/core/stage.js +10 -4
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.js +1 -1
- package/cjs/event/federated-event/base-event.js +12 -2
- package/cjs/event/federated-event/base-event.js.map +1 -1
- package/cjs/graphic/arc.d.ts +6 -4
- package/cjs/graphic/arc.js +46 -17
- package/cjs/graphic/arc.js.map +1 -1
- package/cjs/graphic/arc3d.d.ts +2 -2
- package/cjs/graphic/arc3d.js +8 -9
- package/cjs/graphic/arc3d.js.map +1 -1
- package/cjs/graphic/area.d.ts +5 -3
- package/cjs/graphic/area.js +27 -12
- package/cjs/graphic/area.js.map +1 -1
- package/cjs/graphic/builtin-symbol/index.d.ts +1 -1
- package/cjs/graphic/builtin-symbol/thin-triangle.d.ts +2 -2
- package/cjs/graphic/builtin-symbol/thin-triangle.js +2 -2
- package/cjs/graphic/builtin-symbol/thin-triangle.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-down.d.ts +1 -2
- package/cjs/graphic/builtin-symbol/triangle-down.js +4 -9
- package/cjs/graphic/builtin-symbol/triangle-down.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-left.d.ts +0 -1
- package/cjs/graphic/builtin-symbol/triangle-left.js +3 -8
- package/cjs/graphic/builtin-symbol/triangle-left.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-right.d.ts +1 -2
- package/cjs/graphic/builtin-symbol/triangle-right.js +4 -9
- package/cjs/graphic/builtin-symbol/triangle-right.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle-up.d.ts +1 -2
- package/cjs/graphic/builtin-symbol/triangle-up.js +4 -9
- package/cjs/graphic/builtin-symbol/triangle-up.js.map +1 -1
- package/cjs/graphic/builtin-symbol/triangle.d.ts +1 -2
- package/cjs/graphic/builtin-symbol/triangle.js +1 -3
- package/cjs/graphic/builtin-symbol/triangle.js.map +1 -1
- package/cjs/graphic/circle.d.ts +5 -3
- package/cjs/graphic/circle.js +20 -12
- package/cjs/graphic/circle.js.map +1 -1
- package/cjs/graphic/config.js +6 -3
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/glyph.d.ts +4 -2
- package/cjs/graphic/glyph.js +9 -2
- package/cjs/graphic/glyph.js.map +1 -1
- package/cjs/graphic/graphic-creator.js.map +1 -1
- package/cjs/graphic/graphic-service/common-outer-boder-bounds.d.ts +3 -0
- package/cjs/graphic/graphic-service/common-outer-boder-bounds.js +17 -0
- package/cjs/graphic/graphic-service/common-outer-boder-bounds.js.map +1 -0
- package/cjs/graphic/graphic-service/graphic-service.d.ts +7 -36
- package/cjs/graphic/graphic-service/graphic-service.js +11 -296
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/graphic-service/symbol-outer-border-bounds.d.ts +3 -0
- package/cjs/graphic/graphic-service/symbol-outer-border-bounds.js +17 -0
- package/cjs/graphic/graphic-service/symbol-outer-border-bounds.js.map +1 -0
- package/cjs/graphic/graphic.d.ts +12 -9
- package/cjs/graphic/graphic.js +17 -2
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/group.d.ts +7 -3
- package/cjs/graphic/group.js +34 -22
- package/cjs/graphic/group.js.map +1 -1
- package/cjs/graphic/image.d.ts +3 -2
- package/cjs/graphic/image.js +14 -9
- package/cjs/graphic/image.js.map +1 -1
- package/cjs/graphic/line.d.ts +5 -3
- package/cjs/graphic/line.js +24 -11
- package/cjs/graphic/line.js.map +1 -1
- package/cjs/graphic/node-tree.js.map +1 -1
- package/cjs/graphic/path.d.ts +3 -3
- package/cjs/graphic/path.js +17 -13
- package/cjs/graphic/path.js.map +1 -1
- package/cjs/graphic/polygon.d.ts +4 -3
- package/cjs/graphic/polygon.js +16 -11
- package/cjs/graphic/polygon.js.map +1 -1
- package/cjs/graphic/pyramid3d.d.ts +2 -2
- package/cjs/graphic/pyramid3d.js +10 -9
- package/cjs/graphic/pyramid3d.js.map +1 -1
- package/cjs/graphic/rect.d.ts +3 -3
- package/cjs/graphic/rect.js +16 -12
- package/cjs/graphic/rect.js.map +1 -1
- package/cjs/graphic/rect3d.js +2 -2
- package/cjs/graphic/rect3d.js.map +1 -1
- package/cjs/graphic/richtext/icon.d.ts +2 -2
- package/cjs/graphic/richtext/icon.js.map +1 -1
- package/cjs/graphic/richtext.d.ts +3 -3
- package/cjs/graphic/richtext.js +44 -12
- package/cjs/graphic/richtext.js.map +1 -1
- package/cjs/graphic/shadow-root.d.ts +2 -2
- package/cjs/graphic/shadow-root.js.map +1 -1
- package/cjs/graphic/symbol.d.ts +5 -3
- package/cjs/graphic/symbol.js +25 -12
- package/cjs/graphic/symbol.js.map +1 -1
- package/cjs/graphic/text.d.ts +10 -10
- package/cjs/graphic/text.js +26 -20
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/graphic/theme.js.map +1 -1
- package/cjs/graphic/wrap-text.d.ts +1 -1
- package/cjs/graphic/wrap-text.js +2 -2
- package/cjs/graphic/wrap-text.js.map +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interface/graphic/arc.d.ts +2 -2
- package/cjs/interface/graphic/arc.js.map +1 -1
- package/cjs/interface/graphic/arc3d.d.ts +1 -1
- package/cjs/interface/graphic/arc3d.js.map +1 -1
- package/cjs/interface/graphic/area.d.ts +1 -0
- package/cjs/interface/graphic/area.js.map +1 -1
- package/cjs/interface/graphic/line.d.ts +1 -0
- package/cjs/interface/graphic/line.js.map +1 -1
- package/cjs/interface/graphic-service.d.ts +10 -17
- package/cjs/interface/graphic-service.js.map +1 -1
- package/cjs/interface/graphic.d.ts +2 -0
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/picker/pick-interceptor.js +5 -3
- package/cjs/picker/pick-interceptor.js.map +1 -1
- package/cjs/plugins/builtin-plugin/3dview-transform-plugin.d.ts +1 -0
- package/cjs/plugins/builtin-plugin/3dview-transform-plugin.js +8 -2
- package/cjs/plugins/builtin-plugin/3dview-transform-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.d.ts +1 -0
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +8 -2
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.js +15 -28
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +11 -6
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.d.ts +1 -1
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/index.d.ts +1 -0
- package/cjs/render/contributions/render/index.js +3 -3
- package/cjs/render/contributions/render/index.js.map +1 -1
- package/cjs/render/contributions/render/line-render.js +6 -3
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/cjs/render/contributions/render/utils.d.ts +24 -0
- package/cjs/render/contributions/render/utils.js +56 -23
- package/cjs/render/contributions/render/utils.js.map +1 -1
- package/dist/index.es.js +6920 -7087
- package/es/animate/Ticker/default-ticker.d.ts +2 -53
- package/es/animate/Ticker/default-ticker.js +3 -106
- package/es/animate/Ticker/default-ticker.js.map +1 -1
- package/es/animate/Ticker/index.d.ts +4 -0
- package/es/animate/Ticker/index.js +8 -0
- package/es/animate/Ticker/index.js.map +1 -1
- package/es/animate/Ticker/manual-ticker-handler.d.ts +15 -0
- package/es/animate/Ticker/manual-ticker-handler.js +28 -0
- package/es/animate/Ticker/manual-ticker-handler.js.map +1 -0
- package/es/animate/Ticker/manual-ticker.d.ts +19 -0
- package/es/animate/Ticker/manual-ticker.js +31 -0
- package/es/animate/Ticker/manual-ticker.js.map +1 -0
- package/es/animate/Ticker/raf-tick-handler.d.ts +9 -0
- package/es/animate/Ticker/raf-tick-handler.js +22 -0
- package/es/animate/Ticker/raf-tick-handler.js.map +1 -0
- package/es/animate/Ticker/timeout-tick-handler.d.ts +9 -0
- package/es/animate/Ticker/timeout-tick-handler.js +20 -0
- package/es/animate/Ticker/timeout-tick-handler.js.map +1 -0
- package/es/animate/Ticker/type.d.ts +6 -0
- package/es/animate/Ticker/type.js +7 -0
- package/es/animate/Ticker/type.js.map +1 -0
- package/es/canvas/conical-gradient.js.map +1 -1
- package/es/canvas/contributions/base-canvas.js +3 -15
- package/es/canvas/contributions/base-canvas.js.map +1 -1
- package/es/common/3d-interceptor.js +1 -2
- package/es/common/bounds-context.js +2 -1
- package/es/common/morphing-utils.js +1 -1
- package/es/common/path-svg.js +1 -1
- package/es/common/polygon.js +1 -1
- package/es/common/rect-utils.js +1 -1
- package/es/common/render-area.js +1 -1
- package/es/common/render-command-list.js +1 -2
- package/es/common/render-curve.js +1 -1
- package/es/common/render-utils.js +1 -1
- package/es/common/seg-context.js +1 -1
- package/es/common/segment/catmull-rom-close.d.ts +41 -0
- package/es/common/segment/catmull-rom-close.js +74 -0
- package/es/common/segment/catmull-rom-close.js.map +1 -0
- package/es/common/segment/catmull-rom.d.ts +38 -0
- package/es/common/segment/catmull-rom.js +92 -0
- package/es/common/segment/catmull-rom.js.map +1 -0
- package/es/common/segment/index.d.ts +5 -2
- package/es/common/segment/index.js +11 -0
- package/es/common/segment/index.js.map +1 -1
- package/es/common/simplify.js +1 -1
- package/es/common/sort.js +1 -1
- package/es/common/split-path.js +1 -1
- package/es/common/store.js +1 -1
- package/es/common/text.js +5 -4
- package/es/common/text.js.map +1 -1
- package/es/core/application.js +2 -1
- package/es/core/camera.js +1 -1
- package/es/core/constants.js +1 -1
- package/es/core/contributions/layerHandler/modules.js +2 -9
- package/es/core/contributions/layerHandler/modules.js.map +1 -1
- package/es/core/core-modules.js +1 -1
- package/es/core/global-module.js +2 -0
- package/es/core/global.js +1 -1
- package/es/core/graphic-utils.js +1 -1
- package/es/core/index.js +1 -1
- package/es/core/layer-service.js +1 -1
- package/es/core/layer.js +1 -1
- package/es/core/light.js +1 -1
- package/es/core/stage.d.ts +2 -2
- package/es/core/stage.js +9 -7
- package/es/core/stage.js.map +1 -1
- package/es/core/window.js +1 -1
- package/es/event/federated-event/base-event.js +12 -2
- package/es/event/federated-event/base-event.js.map +1 -1
- package/es/graphic/arc.d.ts +6 -4
- package/es/graphic/arc.js +47 -16
- package/es/graphic/arc.js.map +1 -1
- package/es/graphic/arc3d.d.ts +2 -2
- package/es/graphic/arc3d.js +7 -10
- package/es/graphic/arc3d.js.map +1 -1
- package/es/graphic/area.d.ts +5 -3
- package/es/graphic/area.js +28 -11
- package/es/graphic/area.js.map +1 -1
- package/es/graphic/builtin-symbol/index.d.ts +1 -1
- package/es/graphic/builtin-symbol/thin-triangle.d.ts +2 -2
- package/es/graphic/builtin-symbol/thin-triangle.js +2 -2
- package/es/graphic/builtin-symbol/thin-triangle.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-down.d.ts +1 -2
- package/es/graphic/builtin-symbol/triangle-down.js +2 -7
- package/es/graphic/builtin-symbol/triangle-down.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-left.d.ts +0 -1
- package/es/graphic/builtin-symbol/triangle-left.js +1 -6
- package/es/graphic/builtin-symbol/triangle-left.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-right.d.ts +1 -2
- package/es/graphic/builtin-symbol/triangle-right.js +2 -7
- package/es/graphic/builtin-symbol/triangle-right.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle-up.d.ts +1 -2
- package/es/graphic/builtin-symbol/triangle-up.js +2 -7
- package/es/graphic/builtin-symbol/triangle-up.js.map +1 -1
- package/es/graphic/builtin-symbol/triangle.d.ts +1 -2
- package/es/graphic/builtin-symbol/triangle.js +1 -3
- package/es/graphic/builtin-symbol/triangle.js.map +1 -1
- package/es/graphic/circle.d.ts +5 -3
- package/es/graphic/circle.js +23 -9
- package/es/graphic/circle.js.map +1 -1
- package/es/graphic/config.js +6 -3
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/glyph.d.ts +4 -2
- package/es/graphic/glyph.js +9 -1
- package/es/graphic/glyph.js.map +1 -1
- package/es/graphic/graphic-creator.js.map +1 -1
- package/es/graphic/graphic-service/common-outer-boder-bounds.d.ts +3 -0
- package/es/graphic/graphic-service/common-outer-boder-bounds.js +9 -0
- package/es/graphic/graphic-service/common-outer-boder-bounds.js.map +1 -0
- package/es/graphic/graphic-service/graphic-service.d.ts +7 -36
- package/es/graphic/graphic-service/graphic-service.js +11 -297
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/graphic-service/symbol-outer-border-bounds.d.ts +3 -0
- package/es/graphic/graphic-service/symbol-outer-border-bounds.js +11 -0
- package/es/graphic/graphic-service/symbol-outer-border-bounds.js.map +1 -0
- package/es/graphic/graphic.d.ts +12 -9
- package/es/graphic/graphic.js +20 -3
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/group.d.ts +7 -3
- package/es/graphic/group.js +32 -22
- package/es/graphic/group.js.map +1 -1
- package/es/graphic/image.d.ts +3 -2
- package/es/graphic/image.js +15 -8
- package/es/graphic/image.js.map +1 -1
- package/es/graphic/line.d.ts +5 -3
- package/es/graphic/line.js +25 -10
- package/es/graphic/line.js.map +1 -1
- package/es/graphic/node-tree.js.map +1 -1
- package/es/graphic/path.d.ts +3 -3
- package/es/graphic/path.js +18 -12
- package/es/graphic/path.js.map +1 -1
- package/es/graphic/polygon.d.ts +4 -3
- package/es/graphic/polygon.js +17 -10
- package/es/graphic/polygon.js.map +1 -1
- package/es/graphic/pyramid3d.d.ts +2 -2
- package/es/graphic/pyramid3d.js +8 -10
- package/es/graphic/pyramid3d.js.map +1 -1
- package/es/graphic/rect.d.ts +3 -3
- package/es/graphic/rect.js +16 -10
- package/es/graphic/rect.js.map +1 -1
- package/es/graphic/rect3d.js +1 -3
- package/es/graphic/rect3d.js.map +1 -1
- package/es/graphic/richtext/icon.d.ts +2 -2
- package/es/graphic/richtext/icon.js.map +1 -1
- package/es/graphic/richtext.d.ts +3 -3
- package/es/graphic/richtext.js +43 -11
- package/es/graphic/richtext.js.map +1 -1
- package/es/graphic/shadow-root.d.ts +2 -2
- package/es/graphic/shadow-root.js.map +1 -1
- package/es/graphic/symbol.d.ts +5 -3
- package/es/graphic/symbol.js +26 -11
- package/es/graphic/symbol.js.map +1 -1
- package/es/graphic/text.d.ts +10 -10
- package/es/graphic/text.js +27 -22
- package/es/graphic/text.js.map +1 -1
- package/es/graphic/theme.js.map +1 -1
- package/es/graphic/wrap-text.d.ts +1 -1
- package/es/graphic/wrap-text.js +1 -3
- package/es/graphic/wrap-text.js.map +1 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +4 -0
- package/es/index.js.map +1 -1
- package/es/interface/graphic/arc.d.ts +2 -2
- package/es/interface/graphic/arc.js.map +1 -1
- package/es/interface/graphic/arc3d.d.ts +1 -1
- package/es/interface/graphic/arc3d.js.map +1 -1
- package/es/interface/graphic/area.d.ts +1 -0
- package/es/interface/graphic/area.js.map +1 -1
- package/es/interface/graphic/line.d.ts +1 -0
- package/es/interface/graphic/line.js.map +1 -1
- package/es/interface/graphic-service.d.ts +10 -17
- package/es/interface/graphic-service.js.map +1 -1
- package/es/interface/graphic.d.ts +2 -0
- package/es/interface/graphic.js.map +1 -1
- package/es/picker/pick-interceptor.js +6 -2
- package/es/picker/pick-interceptor.js.map +1 -1
- package/es/plugins/builtin-plugin/3dview-transform-plugin.d.ts +1 -0
- package/es/plugins/builtin-plugin/3dview-transform-plugin.js +6 -0
- package/es/plugins/builtin-plugin/3dview-transform-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/flex-layout-plugin.d.ts +1 -0
- package/es/plugins/builtin-plugin/flex-layout-plugin.js +6 -0
- package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/es/render/contributions/render/arc-render.js +10 -16
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/area-render.js +11 -5
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-render.d.ts +1 -1
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/index.d.ts +1 -0
- package/es/render/contributions/render/index.js +2 -0
- package/es/render/contributions/render/index.js.map +1 -1
- package/es/render/contributions/render/line-render.js +6 -3
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/es/render/contributions/render/utils.d.ts +24 -0
- package/es/render/contributions/render/utils.js +46 -15
- package/es/render/contributions/render/utils.js.map +1 -1
- package/package.json +4 -4
- package/cjs/graphic/graphic-service/common-contribution.d.ts +0 -5
- package/cjs/graphic/graphic-service/common-contribution.js +0 -19
- package/cjs/graphic/graphic-service/common-contribution.js.map +0 -1
- package/cjs/graphic/graphic-service/symbol-contribution.d.ts +0 -6
- package/cjs/graphic/graphic-service/symbol-contribution.js +0 -21
- package/cjs/graphic/graphic-service/symbol-contribution.js.map +0 -1
- package/es/graphic/graphic-service/common-contribution.d.ts +0 -5
- package/es/graphic/graphic-service/common-contribution.js +0 -11
- package/es/graphic/graphic-service/common-contribution.js.map +0 -1
- package/es/graphic/graphic-service/symbol-contribution.d.ts +0 -6
- package/es/graphic/graphic-service/symbol-contribution.js +0 -15
- package/es/graphic/graphic-service/symbol-contribution.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-creator.ts"],"names":[],"mappings":";;;AA8IA,MAAM,cAAc;IAiBlB;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,sBAAsB,CAAC,IAAY,EAAE,EAAO;QAC1C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-creator.ts"],"names":[],"mappings":";;;AA8IA,MAAM,cAAc;IAiBlB;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,sBAAsB,CAAC,IAAY,EAAE,EAAO;QAC1C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxB,IAAY,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa,CAAC,IAAY,EAAE,MAAW;QACrC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,EAAE;YACP,OAAO,IAAI,CAAC;SACb;QACD,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;CACF;AAEY,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","file":"graphic-creator.js","sourcesContent":["// import type {\n// IArc,\n// IArcGraphicAttribute,\n// IArea,\n// IAreaGraphicAttribute,\n// ICircle,\n// ICircleGraphicAttribute,\n// IGroup,\n// IGroupGraphicAttribute,\n// IImageGraphicAttribute,\n// ILine,\n// ILineGraphicAttribute,\n// IPath,\n// IPathGraphicAttribute,\n// IPolygonGraphicAttribute,\n// IRect,\n// IRectGraphicAttribute,\n// ISymbolGraphicAttribute,\n// IText,\n// ITextGraphicAttribute,\n// ISymbol,\n// IImage,\n// IPolygon,\n// IShadowRoot,\n// IGraphic,\n// IRichTextGraphicAttribute,\n// IRichText,\n// IGlyph,\n// IGlyphGraphicAttribute,\n// IRect3d,\n// IRect3dGraphicAttribute,\n// IArc3dGraphicAttribute,\n// IPyramid3dGraphicAttribute,\n// IPyramid3d,\n// IWrapTextGraphicAttribute\n// } from '../interface';\n// import { Arc } from './arc';\n// import { Area } from './area';\n// import { Circle } from './circle';\n// import { Group } from './group';\n// import { Image } from './image';\n// import { Line } from './line';\n// import { Path } from './path';\n// import { Polygon } from './polygon';\n// import { Rect } from './rect';\n// // 这里git会将Symbol强行转成小写symbol,先重命名一下\n// import { Symbol as MarkSymbol } from './symbol';\n// import { ShadowRoot as MarkShadowRoot } from './shadow-root';\n// import { Text } from './text';\n// import { RichText } from './richtext';\n// import { Glyph } from './glyph';\n// import { Rect3d } from './rect3d';\n// import { Arc3d } from './arc3d';\n// import { Pyramid3d } from './pyramid3d';\n// import { WrapText } from './wrap-text';\n\nimport type {\n IArc,\n IArcGraphicAttribute,\n IArea,\n IAreaGraphicAttribute,\n ICircle,\n ICircleGraphicAttribute,\n IGroup,\n IGroupGraphicAttribute,\n IImage,\n IImageGraphicAttribute,\n ILine,\n ILineGraphicAttribute,\n IPath,\n IPathGraphicAttribute,\n IPolygon,\n IPolygonGraphicAttribute,\n IRect,\n IRect3d,\n IRect3dGraphicAttribute,\n IRectGraphicAttribute,\n IRichText,\n IRichTextGraphicAttribute,\n IShadowRoot,\n ISymbol,\n ISymbolGraphicAttribute,\n IText,\n ITextGraphicAttribute,\n IWrapTextGraphicAttribute\n} from '../interface';\n\n// export function createArc(attributes: IArcGraphicAttribute): IArc {\n// return new Arc(attributes);\n// }\n// export function createArc3d(attributes: IArc3dGraphicAttribute): IArc {\n// return new Arc3d(attributes);\n// }\n// export function createPyramid3d(attributes: IPyramid3dGraphicAttribute): IPyramid3d {\n// return new Pyramid3d(attributes);\n// }\n// export function createArea(attributes: IAreaGraphicAttribute): IArea {\n// return new Area(attributes);\n// }\n// export function createCircle(attributes: ICircleGraphicAttribute): ICircle {\n// return new Circle(attributes);\n// }\n// export function createGroup(attributes: IGroupGraphicAttribute): IGroup {\n// return new Group(attributes);\n// }\n// export function createLine(attributes: ILineGraphicAttribute): ILine {\n// return new Line(attributes);\n// }\n// export function createPath(attributes: IPathGraphicAttribute): IPath {\n// return new Path(attributes);\n// }\n// export function createRect(attributes: IRectGraphicAttribute): IRect {\n// return new Rect(attributes);\n// }\n// export function createRect3d(attributes: IRect3dGraphicAttribute): IRect3d {\n// return new Rect3d(attributes);\n// }\n// export function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n// return new Glyph(attributes);\n// }\n// export function createText(attributes: ITextGraphicAttribute): IText {\n// return new Text(attributes);\n// }\n// export function createWrapText(attributes: IWrapTextGraphicAttribute): IText {\n// return new WrapText(attributes);\n// }\n// export function createSymbol(attributes: ISymbolGraphicAttribute): ISymbol {\n// return new MarkSymbol(attributes);\n// }\n// export function createImage(attributes: IImageGraphicAttribute): IImage {\n// return new Image(attributes);\n// }\n// export function createPolygon(attributes: IPolygonGraphicAttribute): IPolygon {\n// return new Polygon(attributes);\n// }\n// export function createShadowRoot(graphic?: IGraphic): IShadowRoot {\n// return new MarkShadowRoot(graphic);\n// }\n// export function createRichText(attributes: IRichTextGraphicAttribute): IRichText {\n// return new RichText(attributes);\n// }\n\nclass GraphicCreator {\n declare store: Map<string, any>;\n declare arc?: (attribute: IArcGraphicAttribute) => IArc;\n declare area?: (attribute: IAreaGraphicAttribute) => IArea;\n declare circle?: (attribute: ICircleGraphicAttribute) => ICircle;\n declare group?: (attribute: IGroupGraphicAttribute) => IGroup;\n declare image?: (attribute: IImageGraphicAttribute) => IImage;\n declare line?: (attribute: ILineGraphicAttribute) => ILine;\n declare path?: (attribute: IPathGraphicAttribute) => IPath;\n declare rect?: (attribute: IRectGraphicAttribute) => IRect;\n declare rect3d?: (attribute: IRect3dGraphicAttribute) => IRect3d;\n declare symbol?: (attribute: ISymbolGraphicAttribute) => ISymbol;\n declare text?: (attribute: ITextGraphicAttribute) => IText;\n declare richtext?: (attribute: IRichTextGraphicAttribute) => IRichText;\n declare polygon?: (attribute: IPolygonGraphicAttribute) => IPolygon;\n declare shadowRoot?: (attribute: IGroupGraphicAttribute) => IShadowRoot;\n declare wraptext?: (attribute: IWrapTextGraphicAttribute) => IText;\n constructor() {\n this.store = new Map();\n }\n\n RegisterGraphicCreator(name: string, cb: any) {\n this.store.set(name, cb);\n (this as any)[name] = cb;\n }\n\n CreateGraphic(name: string, params: any) {\n const cb = this.store.get(name);\n if (!cb) {\n return null;\n }\n return cb(params);\n }\n}\n\nexport const graphicCreator = new GraphicCreator();\n\n// export const graphicCreator = {\n// arc: createArc,\n// area: createArea,\n// circle: createCircle,\n// group: createGroup,\n// image: createImage,\n// line: createLine,\n// path: createPath,\n// rect: createRect,\n// rect3d: createRect3d,\n// symbol: createSymbol,\n// text: createText,\n// richtext: createRichText,\n// polygon: createPolygon,\n// shadowRoot: createShadowRoot,\n// wrapText: createWrapText\n// };\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IAABBBounds } from '@visactor/vutils';
|
|
2
|
+
import type { IGraphicAttribute } from '../../interface';
|
|
3
|
+
export declare const updateBoundsOfCommonOuterBorder: (attribute: Partial<IGraphicAttribute>, theme: Required<IGraphicAttribute>, aabbBounds: IAABBBounds) => import("@visactor/vutils").IBounds;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.updateBoundsOfCommonOuterBorder = void 0;
|
|
6
|
+
|
|
7
|
+
const updateBoundsOfCommonOuterBorder = (attribute, theme, aabbBounds) => {
|
|
8
|
+
const {outerBorder: outerBorder, shadowBlur: shadowBlur = theme.shadowBlur} = attribute;
|
|
9
|
+
if (outerBorder) {
|
|
10
|
+
const defaultOuterBorder = theme.outerBorder, {distance: distance = defaultOuterBorder.distance, lineWidth: lineWidth = defaultOuterBorder.lineWidth} = outerBorder;
|
|
11
|
+
aabbBounds.expand(distance + (shadowBlur + lineWidth) / 2);
|
|
12
|
+
}
|
|
13
|
+
return aabbBounds;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.updateBoundsOfCommonOuterBorder = updateBoundsOfCommonOuterBorder;
|
|
17
|
+
//# sourceMappingURL=common-outer-boder-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-service/common-outer-boder-bounds.ts"],"names":[],"mappings":";;;AAGO,MAAM,+BAA+B,GAAG,CAC7C,SAAqC,EACrC,KAAkC,EAClC,UAAuB,EACvB,EAAE;IACF,MAAM,EAAE,WAAW,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,EAAE,GAAG,SAAS,CAAC;IACjE,IAAI,WAAW,EAAE;QACf,MAAM,kBAAkB,GAAG,KAAK,CAAC,WAAW,CAAC;QAC7C,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,EAAE,SAAS,GAAG,kBAAkB,CAAC,SAAS,EAAE,GAAG,WAAW,CAAC;QAGzG,UAAU,CAAC,MAAM,CAAE,QAAmB,GAAG,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;KACxE;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAdW,QAAA,+BAA+B,mCAc1C","file":"common-outer-boder-bounds.js","sourcesContent":["import type { IAABBBounds } from '@visactor/vutils';\nimport type { IGraphicAttribute } from '../../interface';\n\nexport const updateBoundsOfCommonOuterBorder = (\n attribute: Partial<IGraphicAttribute>,\n theme: Required<IGraphicAttribute>,\n aabbBounds: IAABBBounds\n) => {\n const { outerBorder, shadowBlur = theme.shadowBlur } = attribute;\n if (outerBorder) {\n const defaultOuterBorder = theme.outerBorder;\n const { distance = defaultOuterBorder.distance, lineWidth = defaultOuterBorder.lineWidth } = outerBorder;\n\n // rect的distance一定是number\n aabbBounds.expand((distance as number) + (shadowBlur + lineWidth) / 2);\n }\n return aabbBounds;\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IAABBBounds
|
|
1
|
+
import type { IAABBBounds } from '@visactor/vutils';
|
|
2
2
|
import { AABBBounds } from '@visactor/vutils';
|
|
3
|
-
import type { mat4,
|
|
3
|
+
import type { mat4, IGraphicAttribute, IGraphic, IGroup, IStage, IText, ITextGraphicAttribute, ITransform, IGraphicService, IGraphicCreator, ISyncHook } from '../../interface';
|
|
4
4
|
export declare function getExtraModelMatrix(dx: number, dy: number, graphic: IGraphic): mat4 | null;
|
|
5
5
|
export declare function getModelMatrix(out: mat4, graphic: IGraphic, theme: ITransform): void;
|
|
6
6
|
export declare function shouldUseMat4(graphic: IGraphic): number;
|
|
@@ -18,12 +18,6 @@ export declare class DefaultGraphicService implements IGraphicService {
|
|
|
18
18
|
globalAABBBounds: IAABBBounds;
|
|
19
19
|
}, boolean]>;
|
|
20
20
|
};
|
|
21
|
-
protected _rectBoundsContribitions: IRectBoundsContribution[];
|
|
22
|
-
protected _symbolBoundsContribitions: ISymbolBoundsContribution[];
|
|
23
|
-
protected _imageBoundsContribitions: IImageBoundsContribution[];
|
|
24
|
-
protected _circleBoundsContribitions: ICircleBoundsContribution[];
|
|
25
|
-
protected _arcBoundsContribitions: IArcBoundsContribution[];
|
|
26
|
-
protected _pathBoundsContribitions: IPathBoundsContribution[];
|
|
27
21
|
protected tempAABBBounds1: AABBBounds;
|
|
28
22
|
protected tempAABBBounds2: AABBBounds;
|
|
29
23
|
constructor(creator: IGraphicCreator);
|
|
@@ -38,35 +32,12 @@ export declare class DefaultGraphicService implements IGraphicService {
|
|
|
38
32
|
globalAABBBounds: IAABBBounds;
|
|
39
33
|
}, selfChange: boolean): void;
|
|
40
34
|
updatePathProxyAABBBounds(aabbBounds: IAABBBounds, graphic?: IGraphic): boolean;
|
|
41
|
-
updateRectAABBBounds(attribute: IRectGraphicAttribute, rectTheme: Required<IRectGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IBounds;
|
|
42
|
-
updateGroupAABBBounds(attribute: IGroupGraphicAttribute, groupTheme: Required<IGroupGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGroup): IBounds;
|
|
43
|
-
updateGlyphAABBBounds(attribute: IGlyphGraphicAttribute, theme: Required<IGlyphGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGlyph): IBounds;
|
|
44
35
|
updateHTMLTextAABBBounds(attribute: ITextGraphicAttribute, textTheme: Required<ITextGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IText): void;
|
|
45
|
-
updateRichTextAABBBounds(attribute: IRichTextGraphicAttribute, richtextTheme: Required<IRichTextGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IRichText): IBounds;
|
|
46
|
-
updateTextAABBBounds(attribute: ITextGraphicAttribute, textTheme: Required<ITextGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IText): IBounds;
|
|
47
|
-
updatePathAABBBounds(attribute: IPathGraphicAttribute, pathTheme: Required<IPathGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IPath): IBounds;
|
|
48
|
-
protected updatePathAABBBoundsImprecise(attribute: IPathGraphicAttribute, pathTheme: Required<IPathGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IPath): IAABBBounds;
|
|
49
|
-
updatePyramid3dAABBBounds(attribute: IPyramid3dGraphicAttribute, polygonTheme: Required<IPyramid3dGraphicAttribute>, aabbBounds: IBounds, graphic?: IPyramid3d): IBounds;
|
|
50
|
-
updateArc3dAABBBounds(attribute: IArc3dGraphicAttribute, arcTheme: Required<IArc3dGraphicAttribute>, aabbBounds: IBounds, graphic?: IArc3d): IBounds;
|
|
51
|
-
updatePolygonAABBBounds(attribute: IPolygonGraphicAttribute, polygonTheme: Required<IPolygonGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IPolygon): IBounds;
|
|
52
|
-
protected updatePolygonAABBBoundsImprecise(attribute: IPolygonGraphicAttribute, polygonTheme: Required<IPolygonGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IPolygon): IAABBBounds;
|
|
53
|
-
updateLineAABBBounds(attribute: ILineGraphicAttribute, lineTheme: Required<ILineGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: ILine): IBounds;
|
|
54
|
-
protected updateLineAABBBoundsByPoints(attribute: ILineGraphicAttribute, lineTheme: Required<ILineGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: ILine): IAABBBounds;
|
|
55
|
-
protected updateLineAABBBoundsBySegments(attribute: ILineGraphicAttribute, lineTheme: Required<ILineGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: ILine): IAABBBounds;
|
|
56
|
-
updateAreaAABBBounds(attribute: IAreaGraphicAttribute, areaTheme: Required<IAreaGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IArea): IBounds;
|
|
57
|
-
protected updateAreaAABBBoundsByPoints(attribute: IAreaGraphicAttribute, areaTheme: Required<IAreaGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IArea): IAABBBounds;
|
|
58
|
-
protected updateAreaAABBBoundsBySegments(attribute: IAreaGraphicAttribute, areaTheme: Required<IAreaGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IArea): IAABBBounds;
|
|
59
|
-
updateCircleAABBBounds(attribute: ICircleGraphicAttribute, circleTheme: Required<ICircleGraphicAttribute>, aabbBounds: IAABBBounds, full?: boolean, graphic?: ICircle): IBounds;
|
|
60
|
-
protected updateCircleAABBBoundsImprecise(attribute: ICircleGraphicAttribute, circleTheme: Required<ICircleGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
61
|
-
protected updateCircleAABBBoundsAccurate(attribute: ICircleGraphicAttribute, circleTheme: Required<ICircleGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
62
|
-
updateArcAABBBounds(attribute: IArcGraphicAttribute, arcTheme: Required<IArcGraphicAttribute>, aabbBounds: IAABBBounds, full?: boolean, graphic?: IArc): IBounds;
|
|
63
|
-
protected updateArcAABBBoundsImprecise(attribute: IArcGraphicAttribute, arcTheme: Required<IArcGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
64
|
-
protected updateArcAABBBoundsAccurate(attribute: IArcGraphicAttribute, arcTheme: Required<IArcGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
65
|
-
updateSymbolAABBBounds(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, full?: boolean, graphic?: ISymbol): IBounds;
|
|
66
|
-
protected updateSymbolAABBBoundsImprecise(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
67
|
-
protected updateSymbolAABBBoundsAccurate(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: ISymbol): IAABBBounds;
|
|
68
|
-
updateImageAABBBounds(attribute: IImageGraphicAttribute, imageTheme: Required<IImageGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IBounds;
|
|
69
36
|
combindShadowAABBBounds(bounds: IAABBBounds, graphic?: IGraphic): void;
|
|
70
37
|
transformAABBBounds(attribute: Partial<IGraphicAttribute>, aabbBounds: IAABBBounds, theme: Required<IGraphicAttribute>, miter: boolean, graphic?: IGraphic): void;
|
|
71
|
-
|
|
38
|
+
validCheck(attribute: Partial<IGraphicAttribute>, theme: Required<IGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): boolean;
|
|
39
|
+
updateTempAABBBounds(aabbBounds: IAABBBounds): {
|
|
40
|
+
tb1: AABBBounds;
|
|
41
|
+
tb2: AABBBounds;
|
|
42
|
+
};
|
|
72
43
|
}
|
|
@@ -16,7 +16,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
value: !0
|
|
17
17
|
}), exports.DefaultGraphicService = exports.shouldUseMat4 = exports.getModelMatrix = exports.getExtraModelMatrix = void 0;
|
|
18
18
|
|
|
19
|
-
const inversify_lite_1 = require("../../common/inversify-lite"), vutils_1 = require("@visactor/vutils"), tapable_1 = require("../../tapable"), text_1 = require("../../common/text"),
|
|
19
|
+
const inversify_lite_1 = require("../../common/inversify-lite"), vutils_1 = require("@visactor/vutils"), tapable_1 = require("../../tapable"), text_1 = require("../../common/text"), tools_1 = require("../tools"), matrix_allocate_1 = require("../../allocator/matrix-allocate"), bounds_context_1 = require("../../common/bounds-context"), render_command_list_1 = require("../../common/render-command-list"), constants_1 = require("../constants"), matrix_1 = require("../../common/matrix");
|
|
20
20
|
|
|
21
21
|
function getExtraModelMatrix(dx, dy, graphic) {
|
|
22
22
|
const {alpha: alpha, beta: beta} = graphic.attribute;
|
|
@@ -97,13 +97,7 @@ let DefaultGraphicService = class {
|
|
|
97
97
|
onClearIncremental: new tapable_1.SyncHook([ "graphic", "group", "stage" ]),
|
|
98
98
|
beforeUpdateAABBBounds: new tapable_1.SyncHook([ "graphic", "stage", "willUpdate", "aabbBounds" ]),
|
|
99
99
|
afterUpdateAABBBounds: new tapable_1.SyncHook([ "graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange" ])
|
|
100
|
-
}, this.tempAABBBounds1 = new vutils_1.AABBBounds, this.tempAABBBounds2 = new vutils_1.AABBBounds
|
|
101
|
-
this._rectBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
102
|
-
this._symbolBoundsContribitions = [ new symbol_contribution_1.DefaultSymbolOuterBorderBoundsContribution ],
|
|
103
|
-
this._imageBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
104
|
-
this._circleBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
105
|
-
this._arcBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
106
|
-
this._pathBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ];
|
|
100
|
+
}, this.tempAABBBounds1 = new vutils_1.AABBBounds, this.tempAABBBounds2 = new vutils_1.AABBBounds;
|
|
107
101
|
}
|
|
108
102
|
onAttributeUpdate(graphic) {
|
|
109
103
|
this.hooks.onAttributeUpdate.taps.length && this.hooks.onAttributeUpdate.call(graphic);
|
|
@@ -136,40 +130,6 @@ let DefaultGraphicService = class {
|
|
|
136
130
|
return (0, render_command_list_1.renderCommandList)(path.commandList, boundsContext, 0, 0),
|
|
137
131
|
!0;
|
|
138
132
|
}
|
|
139
|
-
updateRectAABBBounds(attribute, rectTheme, aabbBounds, graphic) {
|
|
140
|
-
if (!this._validCheck(attribute, rectTheme, aabbBounds, graphic)) return aabbBounds;
|
|
141
|
-
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
142
|
-
let {width: width, height: height} = attribute;
|
|
143
|
-
const {x1: x1, y1: y1, x: x, y: y} = attribute;
|
|
144
|
-
width = null != width ? width : x1 - x, height = null != height ? height : y1 - y,
|
|
145
|
-
(isFinite(width) || isFinite(height) || isFinite(x) || isFinite(y)) && aabbBounds.set(0, 0, width || 0, height || 0);
|
|
146
|
-
}
|
|
147
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
148
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
149
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._rectBoundsContribitions.length && this._rectBoundsContribitions.forEach((c => {
|
|
150
|
-
c.updateBounds(attribute, rectTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
151
|
-
})), this.transformAABBBounds(attribute, aabbBounds, rectTheme, !1, graphic), aabbBounds;
|
|
152
|
-
}
|
|
153
|
-
updateGroupAABBBounds(attribute, groupTheme, aabbBounds, graphic) {
|
|
154
|
-
const originalAABBBounds = aabbBounds;
|
|
155
|
-
aabbBounds = aabbBounds.clone();
|
|
156
|
-
const {width: width, height: height, path: path, clip: clip = groupTheme.clip, display: display} = attribute;
|
|
157
|
-
path && path.length ? path.forEach((g => {
|
|
158
|
-
aabbBounds.union(g.AABBBounds);
|
|
159
|
-
})) : null != width && null != height && aabbBounds.set(0, 0, Math.max(0, width), Math.max(0, height)),
|
|
160
|
-
clip || graphic.forEachChildren((node => {
|
|
161
|
-
aabbBounds.union(node.AABBBounds);
|
|
162
|
-
}));
|
|
163
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
164
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
165
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, groupTheme, !1, graphic),
|
|
166
|
-
originalAABBBounds.copy(aabbBounds), originalAABBBounds;
|
|
167
|
-
}
|
|
168
|
-
updateGlyphAABBBounds(attribute, theme, aabbBounds, graphic) {
|
|
169
|
-
return this._validCheck(attribute, theme, aabbBounds, graphic) ? (graphic.getSubGraphic().forEach((node => {
|
|
170
|
-
aabbBounds.union(node.AABBBounds);
|
|
171
|
-
})), aabbBounds) : aabbBounds;
|
|
172
|
-
}
|
|
173
133
|
updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
|
|
174
134
|
const {textAlign: textAlign, textBaseline: textBaseline} = attribute;
|
|
175
135
|
if (null != attribute.forceBoundsHeight) {
|
|
@@ -183,259 +143,6 @@ let DefaultGraphicService = class {
|
|
|
183
143
|
aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
|
|
184
144
|
}
|
|
185
145
|
}
|
|
186
|
-
updateRichTextAABBBounds(attribute, richtextTheme, aabbBounds, graphic) {
|
|
187
|
-
if (!this._validCheck(attribute, richtextTheme, aabbBounds, graphic)) return aabbBounds;
|
|
188
|
-
if (!graphic) return aabbBounds;
|
|
189
|
-
const {width: width = richtextTheme.width, height: height = richtextTheme.height, maxWidth: maxWidth = richtextTheme.maxWidth, maxHeight: maxHeight = richtextTheme.maxHeight, textAlign: textAlign = richtextTheme.textAlign, textBaseline: textBaseline = richtextTheme.textBaseline} = attribute;
|
|
190
|
-
if (width > 0 && height > 0) aabbBounds.set(0, 0, width, height); else {
|
|
191
|
-
const frameCache = graphic.getFrameCache(), {width: actualWidth, height: actualHeight} = frameCache.getActualSize();
|
|
192
|
-
let contentWidth = width || actualWidth || 0, contentHeight = height || actualHeight || 0;
|
|
193
|
-
contentHeight = "number" == typeof maxHeight && contentHeight > maxHeight ? maxHeight : contentHeight || 0,
|
|
194
|
-
contentWidth = "number" == typeof maxWidth && contentWidth > maxWidth ? maxWidth : contentWidth || 0,
|
|
195
|
-
aabbBounds.set(0, 0, contentWidth, contentHeight);
|
|
196
|
-
}
|
|
197
|
-
let deltaY = 0;
|
|
198
|
-
switch (textBaseline) {
|
|
199
|
-
case "top":
|
|
200
|
-
deltaY = 0;
|
|
201
|
-
break;
|
|
202
|
-
|
|
203
|
-
case "middle":
|
|
204
|
-
deltaY = -aabbBounds.height() / 2;
|
|
205
|
-
break;
|
|
206
|
-
|
|
207
|
-
case "bottom":
|
|
208
|
-
deltaY = -aabbBounds.height();
|
|
209
|
-
}
|
|
210
|
-
let deltaX = 0;
|
|
211
|
-
switch (textAlign) {
|
|
212
|
-
case "left":
|
|
213
|
-
deltaX = 0;
|
|
214
|
-
break;
|
|
215
|
-
|
|
216
|
-
case "center":
|
|
217
|
-
deltaX = -aabbBounds.width() / 2;
|
|
218
|
-
break;
|
|
219
|
-
|
|
220
|
-
case "right":
|
|
221
|
-
deltaX = -aabbBounds.width();
|
|
222
|
-
}
|
|
223
|
-
aabbBounds.translate(deltaX, deltaY);
|
|
224
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
225
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
226
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || this.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds),
|
|
227
|
-
this.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, graphic), aabbBounds;
|
|
228
|
-
}
|
|
229
|
-
updateTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
|
|
230
|
-
if (!this._validCheck(attribute, textTheme, aabbBounds, graphic)) return aabbBounds;
|
|
231
|
-
if (!graphic) return aabbBounds;
|
|
232
|
-
const {text: text = textTheme.text} = graphic.attribute;
|
|
233
|
-
Array.isArray(text) ? graphic.updateMultilineAABBBounds(text) : graphic.updateSingallineAABBBounds(text);
|
|
234
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
235
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
236
|
-
const {scaleX: scaleX = textTheme.scaleX, scaleY: scaleY = textTheme.scaleY, shadowBlur: shadowBlur = textTheme.shadowBlur, strokeBoundsBuffer: strokeBoundsBuffer = textTheme.strokeBoundsBuffer} = attribute;
|
|
237
|
-
if (shadowBlur) {
|
|
238
|
-
const shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
|
|
239
|
-
(0, tools_1.boundStroke)(tb1, shadowBlurHalfWidth, !0, strokeBoundsBuffer), aabbBounds.union(tb1);
|
|
240
|
-
}
|
|
241
|
-
return this.combindShadowAABBBounds(aabbBounds, graphic), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || this.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds),
|
|
242
|
-
(0, vutils_1.transformBoundsWithMatrix)(aabbBounds, aabbBounds, graphic.transMatrix),
|
|
243
|
-
aabbBounds;
|
|
244
|
-
}
|
|
245
|
-
updatePathAABBBounds(attribute, pathTheme, aabbBounds, graphic) {
|
|
246
|
-
if (!this._validCheck(attribute, pathTheme, aabbBounds, graphic)) return aabbBounds;
|
|
247
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic);
|
|
248
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
249
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
250
|
-
this._pathBoundsContribitions.length && this._pathBoundsContribitions.forEach((c => {
|
|
251
|
-
c.updateBounds(attribute, pathTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
252
|
-
}));
|
|
253
|
-
const {lineJoin: lineJoin = pathTheme.lineJoin} = attribute;
|
|
254
|
-
return this.transformAABBBounds(attribute, aabbBounds, pathTheme, "miter" === lineJoin, graphic),
|
|
255
|
-
aabbBounds;
|
|
256
|
-
}
|
|
257
|
-
updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic) {
|
|
258
|
-
if (!graphic) return aabbBounds;
|
|
259
|
-
const pathShape = graphic.getParsedPathShape();
|
|
260
|
-
return aabbBounds.union(pathShape.getBounds()), aabbBounds;
|
|
261
|
-
}
|
|
262
|
-
updatePyramid3dAABBBounds(attribute, polygonTheme, aabbBounds, graphic) {
|
|
263
|
-
if (!graphic) return aabbBounds;
|
|
264
|
-
const stage = graphic.stage;
|
|
265
|
-
if (!stage || !stage.camera) return aabbBounds;
|
|
266
|
-
graphic.findFace().vertices.forEach((v => {
|
|
267
|
-
const x = v[0], y = v[1];
|
|
268
|
-
aabbBounds.add(x, y);
|
|
269
|
-
}));
|
|
270
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
271
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
272
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, polygonTheme, !1, graphic),
|
|
273
|
-
aabbBounds;
|
|
274
|
-
}
|
|
275
|
-
updateArc3dAABBBounds(attribute, arcTheme, aabbBounds, graphic) {
|
|
276
|
-
if (!graphic) return aabbBounds;
|
|
277
|
-
const stage = graphic.stage;
|
|
278
|
-
if (!stage || !stage.camera) return aabbBounds;
|
|
279
|
-
const {outerRadius: outerRadius = arcTheme.outerRadius, height: height = 0} = attribute, r = outerRadius + height;
|
|
280
|
-
aabbBounds.setValue(-r, -r, r, r);
|
|
281
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
282
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
283
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, arcTheme, !1, graphic),
|
|
284
|
-
aabbBounds;
|
|
285
|
-
}
|
|
286
|
-
updatePolygonAABBBounds(attribute, polygonTheme, aabbBounds, graphic) {
|
|
287
|
-
if (!this._validCheck(attribute, polygonTheme, aabbBounds, graphic)) return aabbBounds;
|
|
288
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds, graphic);
|
|
289
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
290
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
291
|
-
const {lineJoin: lineJoin = polygonTheme.lineJoin} = attribute;
|
|
292
|
-
return this.transformAABBBounds(attribute, aabbBounds, polygonTheme, "miter" === lineJoin, graphic),
|
|
293
|
-
aabbBounds;
|
|
294
|
-
}
|
|
295
|
-
updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds, graphic) {
|
|
296
|
-
const {points: points = polygonTheme.points} = attribute;
|
|
297
|
-
return points.forEach((p => {
|
|
298
|
-
aabbBounds.add(p.x, p.y);
|
|
299
|
-
})), aabbBounds;
|
|
300
|
-
}
|
|
301
|
-
updateLineAABBBounds(attribute, lineTheme, aabbBounds, graphic) {
|
|
302
|
-
if (!this._validCheck(attribute, lineTheme, aabbBounds, graphic)) return aabbBounds;
|
|
303
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) : this.updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic));
|
|
304
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
305
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
306
|
-
const {lineJoin: lineJoin = lineTheme.lineJoin} = attribute;
|
|
307
|
-
return this.transformAABBBounds(attribute, aabbBounds, lineTheme, "miter" === lineJoin, graphic),
|
|
308
|
-
aabbBounds;
|
|
309
|
-
}
|
|
310
|
-
updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic) {
|
|
311
|
-
const {points: points = lineTheme.points, connectedType: connectedType} = attribute, b = aabbBounds;
|
|
312
|
-
return points.forEach((p => {
|
|
313
|
-
!1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
|
|
314
|
-
})), b;
|
|
315
|
-
}
|
|
316
|
-
updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
|
|
317
|
-
const {segments: segments = lineTheme.segments, connectedType: connectedType} = attribute, b = aabbBounds;
|
|
318
|
-
return segments.forEach((s => {
|
|
319
|
-
s.points.forEach((p => {
|
|
320
|
-
!1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
|
|
321
|
-
}));
|
|
322
|
-
})), b;
|
|
323
|
-
}
|
|
324
|
-
updateAreaAABBBounds(attribute, areaTheme, aabbBounds, graphic) {
|
|
325
|
-
if (!this._validCheck(attribute, areaTheme, aabbBounds, graphic)) return aabbBounds;
|
|
326
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic));
|
|
327
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
328
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
329
|
-
const {lineJoin: lineJoin = areaTheme.lineJoin} = attribute;
|
|
330
|
-
return this.transformAABBBounds(attribute, aabbBounds, areaTheme, "miter" === lineJoin, graphic),
|
|
331
|
-
aabbBounds;
|
|
332
|
-
}
|
|
333
|
-
updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic) {
|
|
334
|
-
const {points: points = areaTheme.points} = attribute, b = aabbBounds;
|
|
335
|
-
return points.forEach((p => {
|
|
336
|
-
var _a, _b;
|
|
337
|
-
b.add(p.x, p.y), b.add(null !== (_a = p.x1) && void 0 !== _a ? _a : p.x, null !== (_b = p.y1) && void 0 !== _b ? _b : p.y);
|
|
338
|
-
})), b;
|
|
339
|
-
}
|
|
340
|
-
updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) {
|
|
341
|
-
const {segments: segments = areaTheme.segments} = attribute, b = aabbBounds;
|
|
342
|
-
return segments.forEach((s => {
|
|
343
|
-
s.points.forEach((p => {
|
|
344
|
-
var _a, _b;
|
|
345
|
-
b.add(p.x, p.y), b.add(null !== (_a = p.x1) && void 0 !== _a ? _a : p.x, null !== (_b = p.y1) && void 0 !== _b ? _b : p.y);
|
|
346
|
-
}));
|
|
347
|
-
})), b;
|
|
348
|
-
}
|
|
349
|
-
updateCircleAABBBounds(attribute, circleTheme, aabbBounds, full, graphic) {
|
|
350
|
-
if (!this._validCheck(attribute, circleTheme, aabbBounds, graphic)) return aabbBounds;
|
|
351
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds, graphic) : this.updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds, graphic));
|
|
352
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
353
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
354
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._circleBoundsContribitions.length && this._circleBoundsContribitions.forEach((c => {
|
|
355
|
-
c.updateBounds(attribute, circleTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
356
|
-
})), this.transformAABBBounds(attribute, aabbBounds, circleTheme, !1, graphic),
|
|
357
|
-
aabbBounds;
|
|
358
|
-
}
|
|
359
|
-
updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds, graphic) {
|
|
360
|
-
const {radius: radius = circleTheme.radius} = attribute;
|
|
361
|
-
return aabbBounds.set(-radius, -radius, radius, radius), aabbBounds;
|
|
362
|
-
}
|
|
363
|
-
updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds, graphic) {
|
|
364
|
-
const {startAngle: startAngle = circleTheme.startAngle, endAngle: endAngle = circleTheme.endAngle, radius: radius = circleTheme.radius} = attribute;
|
|
365
|
-
return endAngle - startAngle > vutils_1.pi2 - vutils_1.epsilon ? aabbBounds.set(-radius, -radius, radius, radius) : (0,
|
|
366
|
-
utils_1.circleBounds)(startAngle, endAngle, radius, aabbBounds), aabbBounds;
|
|
367
|
-
}
|
|
368
|
-
updateArcAABBBounds(attribute, arcTheme, aabbBounds, full, graphic) {
|
|
369
|
-
if (!this._validCheck(attribute, arcTheme, aabbBounds, graphic)) return aabbBounds;
|
|
370
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) : this.updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic));
|
|
371
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
372
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
373
|
-
this._arcBoundsContribitions.length && this._arcBoundsContribitions.forEach((c => {
|
|
374
|
-
c.updateBounds(attribute, arcTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
375
|
-
}));
|
|
376
|
-
const {lineJoin: lineJoin = arcTheme.lineJoin} = attribute;
|
|
377
|
-
return this.transformAABBBounds(attribute, aabbBounds, arcTheme, "miter" === lineJoin, graphic),
|
|
378
|
-
aabbBounds;
|
|
379
|
-
}
|
|
380
|
-
updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) {
|
|
381
|
-
let {outerRadius: outerRadius = arcTheme.outerRadius, innerRadius: innerRadius = arcTheme.innerRadius} = attribute;
|
|
382
|
-
const {outerPadding: outerPadding = arcTheme.outerPadding, innerPadding: innerPadding = arcTheme.innerPadding} = attribute;
|
|
383
|
-
return outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius && (outerRadius = innerRadius),
|
|
384
|
-
aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
|
|
385
|
-
}
|
|
386
|
-
updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic) {
|
|
387
|
-
let {outerRadius: outerRadius = arcTheme.outerRadius, innerRadius: innerRadius = arcTheme.innerRadius} = attribute;
|
|
388
|
-
const {outerPadding: outerPadding = arcTheme.outerPadding, innerPadding: innerPadding = arcTheme.innerPadding} = attribute;
|
|
389
|
-
if (outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius) {
|
|
390
|
-
const temp = outerRadius;
|
|
391
|
-
outerRadius = innerRadius, innerRadius = temp;
|
|
392
|
-
}
|
|
393
|
-
let {endAngle: endAngle = arcTheme.endAngle, startAngle: startAngle = arcTheme.startAngle} = attribute;
|
|
394
|
-
if (startAngle > endAngle) {
|
|
395
|
-
const temp = startAngle;
|
|
396
|
-
startAngle = endAngle, endAngle = temp;
|
|
397
|
-
}
|
|
398
|
-
return outerRadius <= vutils_1.epsilon ? aabbBounds.set(0, 0, 0, 0) : Math.abs(endAngle - startAngle) > vutils_1.pi2 - vutils_1.epsilon ? aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius) : ((0,
|
|
399
|
-
utils_1.circleBounds)(startAngle, endAngle, outerRadius, aabbBounds), (0, utils_1.circleBounds)(startAngle, endAngle, innerRadius, aabbBounds)),
|
|
400
|
-
aabbBounds;
|
|
401
|
-
}
|
|
402
|
-
updateSymbolAABBBounds(attribute, symbolTheme, aabbBounds, full, graphic) {
|
|
403
|
-
if (!this._validCheck(attribute, symbolTheme, aabbBounds, graphic)) return aabbBounds;
|
|
404
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds, graphic));
|
|
405
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
406
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
407
|
-
this._symbolBoundsContribitions.length && this._symbolBoundsContribitions.forEach((c => {
|
|
408
|
-
c.updateBounds(attribute, symbolTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
409
|
-
}));
|
|
410
|
-
const {lineJoin: lineJoin = symbolTheme.lineJoin} = attribute;
|
|
411
|
-
return this.transformAABBBounds(attribute, aabbBounds, symbolTheme, "miter" === lineJoin, graphic),
|
|
412
|
-
aabbBounds;
|
|
413
|
-
}
|
|
414
|
-
updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) {
|
|
415
|
-
const {size: size = symbolTheme.size} = attribute;
|
|
416
|
-
if ((0, vutils_1.isArray)(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2); else {
|
|
417
|
-
const halfWH = size / 2;
|
|
418
|
-
aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);
|
|
419
|
-
}
|
|
420
|
-
return aabbBounds;
|
|
421
|
-
}
|
|
422
|
-
updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds, graphic) {
|
|
423
|
-
if (!graphic) return aabbBounds;
|
|
424
|
-
const {size: size = symbolTheme.size} = attribute;
|
|
425
|
-
return graphic.getParsedPath().bounds(size, aabbBounds), aabbBounds;
|
|
426
|
-
}
|
|
427
|
-
updateImageAABBBounds(attribute, imageTheme, aabbBounds, graphic) {
|
|
428
|
-
if (!this._validCheck(attribute, imageTheme, aabbBounds, graphic)) return aabbBounds;
|
|
429
|
-
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
430
|
-
const {width: width = imageTheme.width, height: height = imageTheme.height} = attribute;
|
|
431
|
-
aabbBounds.set(0, 0, width, height);
|
|
432
|
-
}
|
|
433
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
434
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
435
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._imageBoundsContribitions.length && this._imageBoundsContribitions.forEach((c => {
|
|
436
|
-
c.updateBounds(attribute, imageTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
437
|
-
})), this.transformAABBBounds(attribute, aabbBounds, imageTheme, !1, graphic), aabbBounds;
|
|
438
|
-
}
|
|
439
146
|
combindShadowAABBBounds(bounds, graphic) {
|
|
440
147
|
if (graphic && graphic.shadowRoot) {
|
|
441
148
|
const b = graphic.shadowRoot.AABBBounds;
|
|
@@ -462,13 +169,21 @@ let DefaultGraphicService = class {
|
|
|
462
169
|
graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)),
|
|
463
170
|
updateMatrix && (0, vutils_1.transformBoundsWithMatrix)(aabbBounds, aabbBounds, m);
|
|
464
171
|
}
|
|
465
|
-
|
|
172
|
+
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
466
173
|
if (!graphic) return !0;
|
|
467
174
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
468
175
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
469
176
|
const {visible: visible = theme.visible} = attribute;
|
|
470
177
|
return !!visible || (aabbBounds.clear(), !1);
|
|
471
178
|
}
|
|
179
|
+
updateTempAABBBounds(aabbBounds) {
|
|
180
|
+
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
181
|
+
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
182
|
+
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), {
|
|
183
|
+
tb1: tb1,
|
|
184
|
+
tb2: tb2
|
|
185
|
+
};
|
|
186
|
+
}
|
|
472
187
|
};
|
|
473
188
|
|
|
474
189
|
DefaultGraphicService = __decorate([ (0, inversify_lite_1.injectable)(), __param(0, (0,
|