@visactor/vrender-core 0.20.0-alpha.0 → 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/allocator/matrix-allocate.d.ts +1 -1
- package/cjs/allocator/matrix-allocate.js +2 -4
- package/cjs/allocator/matrix-allocate.js.map +1 -1
- 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/animate/animate.js +4 -2
- package/cjs/animate/animate.js.map +1 -1
- package/cjs/animate/custom-animate.d.ts +5 -16
- package/cjs/animate/custom-animate.js +9 -62
- package/cjs/animate/custom-animate.js.map +1 -1
- package/cjs/animate/group-fade.d.ts +16 -0
- package/cjs/animate/group-fade.js +66 -0
- package/cjs/animate/group-fade.js.map +1 -0
- package/cjs/animate/index.d.ts +1 -0
- package/cjs/animate/index.js +2 -1
- package/cjs/animate/index.js.map +1 -1
- 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/canvas/util.d.ts +0 -1
- package/cjs/canvas/util.js +7 -17
- package/cjs/canvas/util.js.map +1 -1
- package/cjs/common/3d-interceptor.d.ts +3 -0
- package/cjs/common/3d-interceptor.js +50 -0
- package/cjs/common/3d-interceptor.js.map +1 -0
- package/cjs/common/bezier-utils.js +2 -1
- package/cjs/common/canvas-utils.d.ts +1 -1
- package/cjs/common/canvas-utils.js +15 -30
- package/cjs/common/canvas-utils.js.map +1 -1
- package/cjs/common/matrix.d.ts +11 -3
- package/cjs/common/matrix.js +97 -19
- package/cjs/common/matrix.js.map +1 -1
- package/cjs/common/render-command-list.js +1 -2
- package/cjs/common/render-curve.js +22 -32
- package/cjs/common/render-curve.js.map +1 -1
- package/cjs/common/render-utils.js +2 -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/sort.js +15 -12
- package/cjs/common/sort.js.map +1 -1
- package/cjs/common/text.d.ts +0 -2
- package/cjs/common/text.js +8 -14
- package/cjs/common/text.js.map +1 -1
- package/cjs/common/utils.js +1 -1
- package/cjs/common/utils.js.map +1 -1
- package/cjs/core/camera.js +3 -3
- package/cjs/core/camera.js.map +1 -1
- package/cjs/core/contributions/layerHandler/modules.js +2 -5
- package/cjs/core/contributions/layerHandler/modules.js.map +1 -1
- package/cjs/core/stage.d.ts +2 -2
- package/cjs/core/stage.js +23 -11
- package/cjs/core/stage.js.map +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/builtin-symbol/utils.js +1 -5
- package/cjs/graphic/builtin-symbol/utils.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 +7 -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 -42
- package/cjs/graphic/graphic-service/graphic-service.js +21 -396
- 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/utils.js +12 -21
- package/cjs/graphic/richtext/utils.js.map +1 -1
- package/cjs/graphic/richtext.d.ts +4 -4
- package/cjs/graphic/richtext.js +46 -14
- 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 +27 -21
- 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 +3 -0
- package/cjs/index.js +6 -4
- 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/group.d.ts +1 -1
- package/cjs/interface/graphic/group.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/richText.d.ts +1 -0
- package/cjs/interface/graphic/richText.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.d.ts +1 -1
- package/cjs/picker/pick-interceptor.js +6 -44
- package/cjs/picker/pick-interceptor.js.map +1 -1
- package/cjs/picker/picker-service.js +4 -5
- package/cjs/picker/picker-service.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/edit-module.d.ts +22 -0
- package/cjs/plugins/builtin-plugin/edit-module.js +94 -0
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -0
- 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 +2 -2
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/react-attribute-plugin.d.ts +2 -1
- package/cjs/plugins/builtin-plugin/react-attribute-plugin.js +15 -7
- package/cjs/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +76 -0
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +338 -0
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -0
- package/cjs/render/contributions/render/arc-render.js +12 -28
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +12 -7
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-3d-render.d.ts +10 -0
- package/cjs/render/contributions/render/base-3d-render.js +63 -0
- package/cjs/render/contributions/render/base-3d-render.js.map +1 -0
- package/cjs/render/contributions/render/base-render.d.ts +1 -1
- package/cjs/render/contributions/render/base-render.js +5 -5
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +7 -51
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/group-render.js +4 -5
- package/cjs/render/contributions/render/group-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/pyramid3d-render.d.ts +3 -5
- package/cjs/render/contributions/render/pyramid3d-render.js +4 -54
- package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/cjs/render/contributions/render/rect3d-render.d.ts +3 -5
- package/cjs/render/contributions/render/rect3d-render.js +4 -53
- package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.js +9 -18
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/cjs/render/contributions/render/utils.d.ts +24 -0
- package/cjs/render/contributions/render/utils.js +51 -21
- package/cjs/render/contributions/render/utils.js.map +1 -1
- package/dist/index.es.js +9760 -9617
- package/es/allocator/matrix-allocate.d.ts +1 -1
- package/es/allocator/matrix-allocate.js +3 -3
- package/es/allocator/matrix-allocate.js.map +1 -1
- 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/animate/animate.js +4 -2
- package/es/animate/animate.js.map +1 -1
- package/es/animate/custom-animate.d.ts +5 -16
- package/es/animate/custom-animate.js +9 -58
- package/es/animate/custom-animate.js.map +1 -1
- package/es/animate/group-fade.d.ts +16 -0
- package/es/animate/group-fade.js +56 -0
- package/es/animate/group-fade.js.map +1 -0
- package/es/animate/index.d.ts +1 -0
- package/es/animate/index.js +2 -0
- package/es/animate/index.js.map +1 -1
- 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/canvas/util.d.ts +0 -1
- package/es/canvas/util.js +7 -17
- package/es/canvas/util.js.map +1 -1
- package/es/common/3d-interceptor.d.ts +3 -0
- package/es/common/3d-interceptor.js +46 -0
- package/es/common/3d-interceptor.js.map +1 -0
- package/es/common/bezier-utils.js +2 -1
- package/es/common/canvas-utils.d.ts +1 -1
- package/es/common/canvas-utils.js +15 -30
- package/es/common/canvas-utils.js.map +1 -1
- package/es/common/matrix.d.ts +11 -3
- package/es/common/matrix.js +90 -17
- package/es/common/matrix.js.map +1 -1
- package/es/common/render-command-list.js +1 -2
- package/es/common/render-curve.js +22 -32
- package/es/common/render-curve.js.map +1 -1
- package/es/common/render-utils.js +2 -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/sort.js +15 -12
- package/es/common/sort.js.map +1 -1
- package/es/common/text.d.ts +0 -2
- package/es/common/text.js +6 -11
- package/es/common/text.js.map +1 -1
- package/es/common/utils.js +1 -1
- package/es/common/utils.js.map +1 -1
- package/es/core/camera.js +5 -3
- package/es/core/camera.js.map +1 -1
- package/es/core/contributions/layerHandler/modules.js +2 -9
- package/es/core/contributions/layerHandler/modules.js.map +1 -1
- package/es/core/stage.d.ts +2 -2
- package/es/core/stage.js +22 -14
- package/es/core/stage.js.map +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/builtin-symbol/utils.js +1 -4
- package/es/graphic/builtin-symbol/utils.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 +7 -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 -42
- package/es/graphic/graphic-service/graphic-service.js +14 -388
- 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/utils.js +9 -20
- package/es/graphic/richtext/utils.js.map +1 -1
- package/es/graphic/richtext.d.ts +4 -4
- package/es/graphic/richtext.js +45 -13
- 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 +28 -23
- 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 +3 -0
- package/es/index.js +6 -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/group.d.ts +1 -1
- package/es/interface/graphic/group.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/richText.d.ts +1 -0
- package/es/interface/graphic/richText.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.d.ts +1 -1
- package/es/picker/pick-interceptor.js +10 -46
- package/es/picker/pick-interceptor.js.map +1 -1
- package/es/picker/picker-service.js +1 -1
- package/es/picker/picker-service.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/edit-module.d.ts +22 -0
- package/es/plugins/builtin-plugin/edit-module.js +86 -0
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -0
- 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 +2 -2
- package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/react-attribute-plugin.d.ts +2 -1
- package/es/plugins/builtin-plugin/react-attribute-plugin.js +15 -7
- package/es/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +76 -0
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +334 -0
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -0
- package/es/render/contributions/render/arc-render.js +7 -16
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/area-render.js +12 -6
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-3d-render.d.ts +10 -0
- package/es/render/contributions/render/base-3d-render.js +57 -0
- package/es/render/contributions/render/base-3d-render.js.map +1 -0
- package/es/render/contributions/render/base-render.d.ts +1 -1
- package/es/render/contributions/render/base-render.js +3 -1
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +7 -51
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/group-render.js +3 -1
- package/es/render/contributions/render/group-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/pyramid3d-render.d.ts +3 -5
- package/es/render/contributions/render/pyramid3d-render.js +4 -56
- package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/es/render/contributions/render/rect3d-render.d.ts +3 -5
- package/es/render/contributions/render/rect3d-render.js +4 -55
- package/es/render/contributions/render/rect3d-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.js +9 -18
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/es/render/contributions/render/utils.d.ts +24 -0
- package/es/render/contributions/render/utils.js +41 -13
- 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
|
@@ -14,99 +14,9 @@ var __decorate = this && this.__decorate || function(decorators, target, key, de
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", {
|
|
16
16
|
value: !0
|
|
17
|
-
}), exports.DefaultGraphicService = exports.shouldUseMat4 = exports.getModelMatrix = exports.getExtraModelMatrix =
|
|
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"),
|
|
20
|
-
|
|
21
|
-
function identity(out) {
|
|
22
|
-
return out[0] = 1, out[1] = 0, out[2] = 0, out[3] = 0, out[4] = 0, out[5] = 1, out[6] = 0,
|
|
23
|
-
out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = 0, out[13] = 0,
|
|
24
|
-
out[14] = 0, out[15] = 1, out;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function rotateX(out, a, rad) {
|
|
28
|
-
const s = Math.sin(rad), c = Math.cos(rad), a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];
|
|
29
|
-
return a !== out && (out[0] = a[0], out[1] = a[1], out[2] = a[2], out[3] = a[3],
|
|
30
|
-
out[12] = a[12], out[13] = a[13], out[14] = a[14], out[15] = a[15]), out[4] = a10 * c + a20 * s,
|
|
31
|
-
out[5] = a11 * c + a21 * s, out[6] = a12 * c + a22 * s, out[7] = a13 * c + a23 * s,
|
|
32
|
-
out[8] = a20 * c - a10 * s, out[9] = a21 * c - a11 * s, out[10] = a22 * c - a12 * s,
|
|
33
|
-
out[11] = a23 * c - a13 * s, out;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function rotateY(out, a, rad) {
|
|
37
|
-
const s = Math.sin(rad), c = Math.cos(rad), a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];
|
|
38
|
-
return a !== out && (out[4] = a[4], out[5] = a[5], out[6] = a[6], out[7] = a[7],
|
|
39
|
-
out[12] = a[12], out[13] = a[13], out[14] = a[14], out[15] = a[15]), out[0] = a00 * c - a20 * s,
|
|
40
|
-
out[1] = a01 * c - a21 * s, out[2] = a02 * c - a22 * s, out[3] = a03 * c - a23 * s,
|
|
41
|
-
out[8] = a00 * s + a20 * c, out[9] = a01 * s + a21 * c, out[10] = a02 * s + a22 * c,
|
|
42
|
-
out[11] = a03 * s + a23 * c, out;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function rotateZ(out, a, rad) {
|
|
46
|
-
const s = Math.sin(rad), c = Math.cos(rad), a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];
|
|
47
|
-
return a !== out && (out[8] = a[8], out[9] = a[9], out[10] = a[10], out[11] = a[11],
|
|
48
|
-
out[12] = a[12], out[13] = a[13], out[14] = a[14], out[15] = a[15]), out[0] = a00 * c + a10 * s,
|
|
49
|
-
out[1] = a01 * c + a11 * s, out[2] = a02 * c + a12 * s, out[3] = a03 * c + a13 * s,
|
|
50
|
-
out[4] = a10 * c - a00 * s, out[5] = a11 * c - a01 * s, out[6] = a12 * c - a02 * s,
|
|
51
|
-
out[7] = a13 * c - a03 * s, out;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function translate(out, a, v) {
|
|
55
|
-
const x = v[0], y = v[1], z = v[2];
|
|
56
|
-
let a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23;
|
|
57
|
-
return a === out ? (out[12] = a[0] * x + a[4] * y + a[8] * z + a[12], out[13] = a[1] * x + a[5] * y + a[9] * z + a[13],
|
|
58
|
-
out[14] = a[2] * x + a[6] * y + a[10] * z + a[14], out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]) : (a00 = a[0],
|
|
59
|
-
a01 = a[1], a02 = a[2], a03 = a[3], a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
|
|
60
|
-
a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], out[0] = a00, out[1] = a01, out[2] = a02,
|
|
61
|
-
out[3] = a03, out[4] = a10, out[5] = a11, out[6] = a12, out[7] = a13, out[8] = a20,
|
|
62
|
-
out[9] = a21, out[10] = a22, out[11] = a23, out[12] = a00 * x + a10 * y + a20 * z + a[12],
|
|
63
|
-
out[13] = a01 * x + a11 * y + a21 * z + a[13], out[14] = a02 * x + a12 * y + a22 * z + a[14],
|
|
64
|
-
out[15] = a03 * x + a13 * y + a23 * z + a[15]), out;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function mat3Tomat4(out, b) {
|
|
68
|
-
out[0] = b.a, out[1] = b.b, out[2] = 0, out[3] = 0, out[4] = b.c, out[5] = b.d,
|
|
69
|
-
out[6] = 0, out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = b.e,
|
|
70
|
-
out[13] = b.f, out[14] = 0, out[15] = 1;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function multiplyMat4Mat3(out, a, b) {
|
|
74
|
-
const a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
|
|
75
|
-
let b0 = b.a, b1 = b.b, b2 = 0, b3 = 0;
|
|
76
|
-
return out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31,
|
|
77
|
-
out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33,
|
|
78
|
-
b0 = b.c, b1 = b.d, b2 = 0, b3 = 0, out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30,
|
|
79
|
-
out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32,
|
|
80
|
-
out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, b0 = 0, b1 = 0, b2 = 1, b3 = 0,
|
|
81
|
-
out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31,
|
|
82
|
-
out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33,
|
|
83
|
-
b0 = b.e, b1 = b.f, b2 = 0, b3 = 1, out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30,
|
|
84
|
-
out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32,
|
|
85
|
-
out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, out;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function scale(out, a, v) {
|
|
89
|
-
const x = v[0], y = v[1], z = v[2];
|
|
90
|
-
return out[0] = a[0] * x, out[1] = a[1] * x, out[2] = a[2] * x, out[3] = a[3] * x,
|
|
91
|
-
out[4] = a[4] * y, out[5] = a[5] * y, out[6] = a[6] * y, out[7] = a[7] * y, out[8] = a[8] * z,
|
|
92
|
-
out[9] = a[9] * z, out[10] = a[10] * z, out[11] = a[11] * z, out[12] = a[12], out[13] = a[13],
|
|
93
|
-
out[14] = a[14], out[15] = a[15], out;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function multiplyMat4Mat4(out, a, b) {
|
|
97
|
-
const a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
|
|
98
|
-
let b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
|
|
99
|
-
return out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31,
|
|
100
|
-
out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33,
|
|
101
|
-
b0 = b[4], b1 = b[5], b2 = b[6], b3 = b[7], out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30,
|
|
102
|
-
out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32,
|
|
103
|
-
out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, b0 = b[8], b1 = b[9], b2 = b[10],
|
|
104
|
-
b3 = b[11], out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31,
|
|
105
|
-
out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33,
|
|
106
|
-
b0 = b[12], b1 = b[13], b2 = b[14], b3 = b[15], out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30,
|
|
107
|
-
out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32,
|
|
108
|
-
out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, out;
|
|
109
|
-
}
|
|
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");
|
|
110
20
|
|
|
111
21
|
function getExtraModelMatrix(dx, dy, graphic) {
|
|
112
22
|
const {alpha: alpha, beta: beta} = graphic.attribute;
|
|
@@ -128,8 +38,9 @@ function getExtraModelMatrix(dx, dy, graphic) {
|
|
|
128
38
|
}
|
|
129
39
|
_anchor[0] += dx, _anchor[1] += dy;
|
|
130
40
|
const modelMatrix = matrix_allocate_1.mat4Allocate.allocate();
|
|
131
|
-
return translate(modelMatrix, modelMatrix, [ _anchor[0], _anchor[1], 0 ]),
|
|
132
|
-
|
|
41
|
+
return (0, matrix_1.translate)(modelMatrix, modelMatrix, [ _anchor[0], _anchor[1], 0 ]),
|
|
42
|
+
beta && (0, matrix_1.rotateX)(modelMatrix, modelMatrix, beta), alpha && (0, matrix_1.rotateY)(modelMatrix, modelMatrix, alpha),
|
|
43
|
+
(0, matrix_1.translate)(modelMatrix, modelMatrix, [ -_anchor[0], -_anchor[1], 0 ]),
|
|
133
44
|
modelMatrix;
|
|
134
45
|
}
|
|
135
46
|
|
|
@@ -147,9 +58,10 @@ function getModelMatrix(out, graphic, theme) {
|
|
|
147
58
|
} else _anchor[1] = anchor3d[1];
|
|
148
59
|
_anchor[2] = null !== (_a = anchor3d[2]) && void 0 !== _a ? _a : 0;
|
|
149
60
|
}
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
61
|
+
if ((0, matrix_1.identityMat4)(out), (0, matrix_1.translate)(out, out, [ x + dx, y + dy, z + dz ]),
|
|
62
|
+
(0, matrix_1.translate)(out, out, [ _anchor[0], _anchor[1], _anchor[2] ]), (0, matrix_1.rotateX)(out, out, beta),
|
|
63
|
+
(0, matrix_1.rotateY)(out, out, alpha), (0, matrix_1.translate)(out, out, [ -_anchor[0], -_anchor[1], _anchor[2] ]),
|
|
64
|
+
(0, matrix_1.scaleMat4)(out, out, [ scaleX, scaleY, scaleZ ]), angle) {
|
|
153
65
|
const m = matrix_allocate_1.mat4Allocate.allocate(), _anchor = [ 0, 0 ];
|
|
154
66
|
if (anchor) {
|
|
155
67
|
if ("string" == typeof anchor3d[0]) {
|
|
@@ -161,8 +73,8 @@ function getModelMatrix(out, graphic, theme) {
|
|
|
161
73
|
_anchor[1] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;
|
|
162
74
|
} else _anchor[1] = anchor3d[1];
|
|
163
75
|
}
|
|
164
|
-
translate(m, m, [ _anchor[0], _anchor[1], 0 ]),
|
|
165
|
-
multiplyMat4Mat4(out, out, m);
|
|
76
|
+
(0, matrix_1.translate)(m, m, [ _anchor[0], _anchor[1], 0 ]), (0, matrix_1.rotateZ)(m, m, angle),
|
|
77
|
+
(0, matrix_1.translate)(m, m, [ -_anchor[0], -_anchor[1], 0 ]), (0, matrix_1.multiplyMat4Mat4)(out, out, m);
|
|
166
78
|
}
|
|
167
79
|
}
|
|
168
80
|
|
|
@@ -171,8 +83,6 @@ function shouldUseMat4(graphic) {
|
|
|
171
83
|
return alpha || beta;
|
|
172
84
|
}
|
|
173
85
|
|
|
174
|
-
exports.rotateX = rotateX, exports.rotateY = rotateY, exports.translate = translate,
|
|
175
|
-
exports.mat3Tomat4 = mat3Tomat4, exports.multiplyMat4Mat3 = multiplyMat4Mat3, exports.multiplyMat4Mat4 = multiplyMat4Mat4,
|
|
176
86
|
exports.getExtraModelMatrix = getExtraModelMatrix, exports.getModelMatrix = getModelMatrix,
|
|
177
87
|
exports.shouldUseMat4 = shouldUseMat4;
|
|
178
88
|
|
|
@@ -187,13 +97,7 @@ let DefaultGraphicService = class {
|
|
|
187
97
|
onClearIncremental: new tapable_1.SyncHook([ "graphic", "group", "stage" ]),
|
|
188
98
|
beforeUpdateAABBBounds: new tapable_1.SyncHook([ "graphic", "stage", "willUpdate", "aabbBounds" ]),
|
|
189
99
|
afterUpdateAABBBounds: new tapable_1.SyncHook([ "graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange" ])
|
|
190
|
-
}, this.tempAABBBounds1 = new vutils_1.AABBBounds, this.tempAABBBounds2 = new vutils_1.AABBBounds
|
|
191
|
-
this._rectBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
192
|
-
this._symbolBoundsContribitions = [ new symbol_contribution_1.DefaultSymbolOuterBorderBoundsContribution ],
|
|
193
|
-
this._imageBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
194
|
-
this._circleBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
195
|
-
this._arcBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ],
|
|
196
|
-
this._pathBoundsContribitions = [ new common_contribution_1.DefaultOuterBorderBoundsContribution ];
|
|
100
|
+
}, this.tempAABBBounds1 = new vutils_1.AABBBounds, this.tempAABBBounds2 = new vutils_1.AABBBounds;
|
|
197
101
|
}
|
|
198
102
|
onAttributeUpdate(graphic) {
|
|
199
103
|
this.hooks.onAttributeUpdate.taps.length && this.hooks.onAttributeUpdate.call(graphic);
|
|
@@ -226,40 +130,6 @@ let DefaultGraphicService = class {
|
|
|
226
130
|
return (0, render_command_list_1.renderCommandList)(path.commandList, boundsContext, 0, 0),
|
|
227
131
|
!0;
|
|
228
132
|
}
|
|
229
|
-
updateRectAABBBounds(attribute, rectTheme, aabbBounds, graphic) {
|
|
230
|
-
if (!this._validCheck(attribute, rectTheme, aabbBounds, graphic)) return aabbBounds;
|
|
231
|
-
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
232
|
-
let {width: width, height: height} = attribute;
|
|
233
|
-
const {x1: x1, y1: y1, x: x, y: y} = attribute;
|
|
234
|
-
width = null != width ? width : x1 - x, height = null != height ? height : y1 - y,
|
|
235
|
-
aabbBounds.set(0, 0, width || 0, height || 0);
|
|
236
|
-
}
|
|
237
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
238
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
239
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._rectBoundsContribitions.length && this._rectBoundsContribitions.forEach((c => {
|
|
240
|
-
c.updateBounds(attribute, rectTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
241
|
-
})), this.transformAABBBounds(attribute, aabbBounds, rectTheme, !1, graphic), aabbBounds;
|
|
242
|
-
}
|
|
243
|
-
updateGroupAABBBounds(attribute, groupTheme, aabbBounds, graphic) {
|
|
244
|
-
const originalAABBBounds = aabbBounds;
|
|
245
|
-
aabbBounds = aabbBounds.clone();
|
|
246
|
-
const {width: width, height: height, path: path, clip: clip = groupTheme.clip} = attribute;
|
|
247
|
-
path && path.length ? path.forEach((g => {
|
|
248
|
-
aabbBounds.union(g.AABBBounds);
|
|
249
|
-
})) : null != width && null != height && aabbBounds.set(0, 0, Math.max(0, width), Math.max(0, height)),
|
|
250
|
-
clip || graphic.forEachChildren((node => {
|
|
251
|
-
aabbBounds.union(node.AABBBounds);
|
|
252
|
-
}));
|
|
253
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
254
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
255
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, groupTheme, !1, graphic),
|
|
256
|
-
originalAABBBounds.copy(aabbBounds), originalAABBBounds;
|
|
257
|
-
}
|
|
258
|
-
updateGlyphAABBBounds(attribute, theme, aabbBounds, graphic) {
|
|
259
|
-
return this._validCheck(attribute, theme, aabbBounds, graphic) ? (graphic.getSubGraphic().forEach((node => {
|
|
260
|
-
aabbBounds.union(node.AABBBounds);
|
|
261
|
-
})), aabbBounds) : aabbBounds;
|
|
262
|
-
}
|
|
263
133
|
updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
|
|
264
134
|
const {textAlign: textAlign, textBaseline: textBaseline} = attribute;
|
|
265
135
|
if (null != attribute.forceBoundsHeight) {
|
|
@@ -273,259 +143,6 @@ let DefaultGraphicService = class {
|
|
|
273
143
|
aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
|
|
274
144
|
}
|
|
275
145
|
}
|
|
276
|
-
updateRichTextAABBBounds(attribute, richtextTheme, aabbBounds, graphic) {
|
|
277
|
-
if (!this._validCheck(attribute, richtextTheme, aabbBounds, graphic)) return aabbBounds;
|
|
278
|
-
if (!graphic) return aabbBounds;
|
|
279
|
-
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;
|
|
280
|
-
if (width > 0 && height > 0) aabbBounds.set(0, 0, width, height); else {
|
|
281
|
-
const frameCache = graphic.getFrameCache(), {width: actualWidth, height: actualHeight} = frameCache.getActualSize();
|
|
282
|
-
let contentWidth = width || actualWidth || 0, contentHeight = height || actualHeight || 0;
|
|
283
|
-
contentHeight = "number" == typeof maxHeight && contentHeight > maxHeight ? maxHeight : contentHeight || 0,
|
|
284
|
-
contentWidth = "number" == typeof maxWidth && contentWidth > maxWidth ? maxWidth : contentWidth || 0,
|
|
285
|
-
aabbBounds.set(0, 0, contentWidth, contentHeight);
|
|
286
|
-
}
|
|
287
|
-
let deltaY = 0;
|
|
288
|
-
switch (textBaseline) {
|
|
289
|
-
case "top":
|
|
290
|
-
deltaY = 0;
|
|
291
|
-
break;
|
|
292
|
-
|
|
293
|
-
case "middle":
|
|
294
|
-
deltaY = -aabbBounds.height() / 2;
|
|
295
|
-
break;
|
|
296
|
-
|
|
297
|
-
case "bottom":
|
|
298
|
-
deltaY = -aabbBounds.height();
|
|
299
|
-
}
|
|
300
|
-
let deltaX = 0;
|
|
301
|
-
switch (textAlign) {
|
|
302
|
-
case "left":
|
|
303
|
-
deltaX = 0;
|
|
304
|
-
break;
|
|
305
|
-
|
|
306
|
-
case "center":
|
|
307
|
-
deltaX = -aabbBounds.width() / 2;
|
|
308
|
-
break;
|
|
309
|
-
|
|
310
|
-
case "right":
|
|
311
|
-
deltaX = -aabbBounds.width();
|
|
312
|
-
}
|
|
313
|
-
aabbBounds.translate(deltaX, deltaY);
|
|
314
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
315
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
316
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || this.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds),
|
|
317
|
-
this.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, graphic), aabbBounds;
|
|
318
|
-
}
|
|
319
|
-
updateTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
|
|
320
|
-
if (!this._validCheck(attribute, textTheme, aabbBounds, graphic)) return aabbBounds;
|
|
321
|
-
if (!graphic) return aabbBounds;
|
|
322
|
-
const {text: text = textTheme.text} = graphic.attribute;
|
|
323
|
-
Array.isArray(text) ? graphic.updateMultilineAABBBounds(text) : graphic.updateSingallineAABBBounds(text);
|
|
324
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
325
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
326
|
-
const {scaleX: scaleX = textTheme.scaleX, scaleY: scaleY = textTheme.scaleY, shadowBlur: shadowBlur = textTheme.shadowBlur, strokeBoundsBuffer: strokeBoundsBuffer = textTheme.strokeBoundsBuffer} = attribute;
|
|
327
|
-
if (shadowBlur) {
|
|
328
|
-
const shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
|
|
329
|
-
(0, tools_1.boundStroke)(tb1, shadowBlurHalfWidth, !0, strokeBoundsBuffer), aabbBounds.union(tb1);
|
|
330
|
-
}
|
|
331
|
-
return this.combindShadowAABBBounds(aabbBounds, graphic), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || this.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds),
|
|
332
|
-
(0, vutils_1.transformBoundsWithMatrix)(aabbBounds, aabbBounds, graphic.transMatrix),
|
|
333
|
-
aabbBounds;
|
|
334
|
-
}
|
|
335
|
-
updatePathAABBBounds(attribute, pathTheme, aabbBounds, graphic) {
|
|
336
|
-
if (!this._validCheck(attribute, pathTheme, aabbBounds, graphic)) return aabbBounds;
|
|
337
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic);
|
|
338
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
339
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
340
|
-
this._pathBoundsContribitions.length && this._pathBoundsContribitions.forEach((c => {
|
|
341
|
-
c.updateBounds(attribute, pathTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
342
|
-
}));
|
|
343
|
-
const {lineJoin: lineJoin = pathTheme.lineJoin} = attribute;
|
|
344
|
-
return this.transformAABBBounds(attribute, aabbBounds, pathTheme, "miter" === lineJoin, graphic),
|
|
345
|
-
aabbBounds;
|
|
346
|
-
}
|
|
347
|
-
updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic) {
|
|
348
|
-
if (!graphic) return aabbBounds;
|
|
349
|
-
const pathShape = graphic.getParsedPathShape();
|
|
350
|
-
return aabbBounds.union(pathShape.getBounds()), aabbBounds;
|
|
351
|
-
}
|
|
352
|
-
updatePyramid3dAABBBounds(attribute, polygonTheme, aabbBounds, graphic) {
|
|
353
|
-
if (!graphic) return aabbBounds;
|
|
354
|
-
const stage = graphic.stage;
|
|
355
|
-
if (!stage || !stage.camera) return aabbBounds;
|
|
356
|
-
graphic.findFace().vertices.forEach((v => {
|
|
357
|
-
const x = v[0], y = v[1];
|
|
358
|
-
aabbBounds.add(x, y);
|
|
359
|
-
}));
|
|
360
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
361
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
362
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, polygonTheme, !1, graphic),
|
|
363
|
-
aabbBounds;
|
|
364
|
-
}
|
|
365
|
-
updateArc3dAABBBounds(attribute, arcTheme, aabbBounds, graphic) {
|
|
366
|
-
if (!graphic) return aabbBounds;
|
|
367
|
-
const stage = graphic.stage;
|
|
368
|
-
if (!stage || !stage.camera) return aabbBounds;
|
|
369
|
-
const {outerRadius: outerRadius = arcTheme.outerRadius, height: height = 0} = attribute, r = outerRadius + height;
|
|
370
|
-
aabbBounds.setValue(-r, -r, r, r);
|
|
371
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
372
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
373
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, arcTheme, !1, graphic),
|
|
374
|
-
aabbBounds;
|
|
375
|
-
}
|
|
376
|
-
updatePolygonAABBBounds(attribute, polygonTheme, aabbBounds, graphic) {
|
|
377
|
-
if (!this._validCheck(attribute, polygonTheme, aabbBounds, graphic)) return aabbBounds;
|
|
378
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds, graphic);
|
|
379
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
380
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
381
|
-
const {lineJoin: lineJoin = polygonTheme.lineJoin} = attribute;
|
|
382
|
-
return this.transformAABBBounds(attribute, aabbBounds, polygonTheme, "miter" === lineJoin, graphic),
|
|
383
|
-
aabbBounds;
|
|
384
|
-
}
|
|
385
|
-
updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds, graphic) {
|
|
386
|
-
const {points: points = polygonTheme.points} = attribute;
|
|
387
|
-
return points.forEach((p => {
|
|
388
|
-
aabbBounds.add(p.x, p.y);
|
|
389
|
-
})), aabbBounds;
|
|
390
|
-
}
|
|
391
|
-
updateLineAABBBounds(attribute, lineTheme, aabbBounds, graphic) {
|
|
392
|
-
if (!this._validCheck(attribute, lineTheme, aabbBounds, graphic)) return aabbBounds;
|
|
393
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) : this.updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic));
|
|
394
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
395
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
396
|
-
const {lineJoin: lineJoin = lineTheme.lineJoin} = attribute;
|
|
397
|
-
return this.transformAABBBounds(attribute, aabbBounds, lineTheme, "miter" === lineJoin, graphic),
|
|
398
|
-
aabbBounds;
|
|
399
|
-
}
|
|
400
|
-
updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic) {
|
|
401
|
-
const {points: points = lineTheme.points} = attribute, b = aabbBounds;
|
|
402
|
-
return points.forEach((p => {
|
|
403
|
-
b.add(p.x, p.y);
|
|
404
|
-
})), b;
|
|
405
|
-
}
|
|
406
|
-
updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
|
|
407
|
-
const {segments: segments = lineTheme.segments} = attribute, b = aabbBounds;
|
|
408
|
-
return segments.forEach((s => {
|
|
409
|
-
s.points.forEach((p => {
|
|
410
|
-
b.add(p.x, p.y);
|
|
411
|
-
}));
|
|
412
|
-
})), b;
|
|
413
|
-
}
|
|
414
|
-
updateAreaAABBBounds(attribute, areaTheme, aabbBounds, graphic) {
|
|
415
|
-
if (!this._validCheck(attribute, areaTheme, aabbBounds, graphic)) return aabbBounds;
|
|
416
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic));
|
|
417
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
418
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
419
|
-
const {lineJoin: lineJoin = areaTheme.lineJoin} = attribute;
|
|
420
|
-
return this.transformAABBBounds(attribute, aabbBounds, areaTheme, "miter" === lineJoin, graphic),
|
|
421
|
-
aabbBounds;
|
|
422
|
-
}
|
|
423
|
-
updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic) {
|
|
424
|
-
const {points: points = areaTheme.points} = attribute, b = aabbBounds;
|
|
425
|
-
return points.forEach((p => {
|
|
426
|
-
var _a, _b;
|
|
427
|
-
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);
|
|
428
|
-
})), b;
|
|
429
|
-
}
|
|
430
|
-
updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) {
|
|
431
|
-
const {segments: segments = areaTheme.segments} = attribute, b = aabbBounds;
|
|
432
|
-
return segments.forEach((s => {
|
|
433
|
-
s.points.forEach((p => {
|
|
434
|
-
var _a, _b;
|
|
435
|
-
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);
|
|
436
|
-
}));
|
|
437
|
-
})), b;
|
|
438
|
-
}
|
|
439
|
-
updateCircleAABBBounds(attribute, circleTheme, aabbBounds, full, graphic) {
|
|
440
|
-
if (!this._validCheck(attribute, circleTheme, aabbBounds, graphic)) return aabbBounds;
|
|
441
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds, graphic) : this.updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds, graphic));
|
|
442
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
443
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
444
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._circleBoundsContribitions.length && this._circleBoundsContribitions.forEach((c => {
|
|
445
|
-
c.updateBounds(attribute, circleTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
446
|
-
})), this.transformAABBBounds(attribute, aabbBounds, circleTheme, !1, graphic),
|
|
447
|
-
aabbBounds;
|
|
448
|
-
}
|
|
449
|
-
updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds, graphic) {
|
|
450
|
-
const {radius: radius = circleTheme.radius} = attribute;
|
|
451
|
-
return aabbBounds.set(-radius, -radius, radius, radius), aabbBounds;
|
|
452
|
-
}
|
|
453
|
-
updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds, graphic) {
|
|
454
|
-
const {startAngle: startAngle = circleTheme.startAngle, endAngle: endAngle = circleTheme.endAngle, radius: radius = circleTheme.radius} = attribute;
|
|
455
|
-
return endAngle - startAngle > vutils_1.pi2 - vutils_1.epsilon ? aabbBounds.set(-radius, -radius, radius, radius) : (0,
|
|
456
|
-
utils_1.circleBounds)(startAngle, endAngle, radius, aabbBounds), aabbBounds;
|
|
457
|
-
}
|
|
458
|
-
updateArcAABBBounds(attribute, arcTheme, aabbBounds, full, graphic) {
|
|
459
|
-
if (!this._validCheck(attribute, arcTheme, aabbBounds, graphic)) return aabbBounds;
|
|
460
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) : this.updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic));
|
|
461
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
462
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
463
|
-
this._arcBoundsContribitions.length && this._arcBoundsContribitions.forEach((c => {
|
|
464
|
-
c.updateBounds(attribute, arcTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
465
|
-
}));
|
|
466
|
-
const {lineJoin: lineJoin = arcTheme.lineJoin} = attribute;
|
|
467
|
-
return this.transformAABBBounds(attribute, aabbBounds, arcTheme, "miter" === lineJoin, graphic),
|
|
468
|
-
aabbBounds;
|
|
469
|
-
}
|
|
470
|
-
updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) {
|
|
471
|
-
let {outerRadius: outerRadius = arcTheme.outerRadius, innerRadius: innerRadius = arcTheme.innerRadius} = attribute;
|
|
472
|
-
const {outerPadding: outerPadding = arcTheme.outerPadding, innerPadding: innerPadding = arcTheme.innerPadding} = attribute;
|
|
473
|
-
return outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius && (outerRadius = innerRadius),
|
|
474
|
-
aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
|
|
475
|
-
}
|
|
476
|
-
updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic) {
|
|
477
|
-
let {outerRadius: outerRadius = arcTheme.outerRadius, innerRadius: innerRadius = arcTheme.innerRadius} = attribute;
|
|
478
|
-
const {outerPadding: outerPadding = arcTheme.outerPadding, innerPadding: innerPadding = arcTheme.innerPadding} = attribute;
|
|
479
|
-
if (outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius) {
|
|
480
|
-
const temp = outerRadius;
|
|
481
|
-
outerRadius = innerRadius, innerRadius = temp;
|
|
482
|
-
}
|
|
483
|
-
let {endAngle: endAngle = arcTheme.endAngle, startAngle: startAngle = arcTheme.startAngle} = attribute;
|
|
484
|
-
if (startAngle > endAngle) {
|
|
485
|
-
const temp = startAngle;
|
|
486
|
-
startAngle = endAngle, endAngle = temp;
|
|
487
|
-
}
|
|
488
|
-
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,
|
|
489
|
-
utils_1.circleBounds)(startAngle, endAngle, outerRadius, aabbBounds), (0, utils_1.circleBounds)(startAngle, endAngle, innerRadius, aabbBounds)),
|
|
490
|
-
aabbBounds;
|
|
491
|
-
}
|
|
492
|
-
updateSymbolAABBBounds(attribute, symbolTheme, aabbBounds, full, graphic) {
|
|
493
|
-
if (!this._validCheck(attribute, symbolTheme, aabbBounds, graphic)) return aabbBounds;
|
|
494
|
-
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds, graphic));
|
|
495
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
496
|
-
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
497
|
-
this._symbolBoundsContribitions.length && this._symbolBoundsContribitions.forEach((c => {
|
|
498
|
-
c.updateBounds(attribute, symbolTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
499
|
-
}));
|
|
500
|
-
const {lineJoin: lineJoin = symbolTheme.lineJoin} = attribute;
|
|
501
|
-
return this.transformAABBBounds(attribute, aabbBounds, symbolTheme, "miter" === lineJoin, graphic),
|
|
502
|
-
aabbBounds;
|
|
503
|
-
}
|
|
504
|
-
updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) {
|
|
505
|
-
const {size: size = symbolTheme.size} = attribute;
|
|
506
|
-
if ((0, vutils_1.isArray)(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2); else {
|
|
507
|
-
const halfWH = size / 2;
|
|
508
|
-
aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);
|
|
509
|
-
}
|
|
510
|
-
return aabbBounds;
|
|
511
|
-
}
|
|
512
|
-
updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds, graphic) {
|
|
513
|
-
if (!graphic) return aabbBounds;
|
|
514
|
-
const {size: size = symbolTheme.size} = attribute;
|
|
515
|
-
return graphic.getParsedPath().bounds(size, aabbBounds), aabbBounds;
|
|
516
|
-
}
|
|
517
|
-
updateImageAABBBounds(attribute, imageTheme, aabbBounds, graphic) {
|
|
518
|
-
if (!this._validCheck(attribute, imageTheme, aabbBounds, graphic)) return aabbBounds;
|
|
519
|
-
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
520
|
-
const {width: width = imageTheme.width, height: height = imageTheme.height} = attribute;
|
|
521
|
-
aabbBounds.set(0, 0, width, height);
|
|
522
|
-
}
|
|
523
|
-
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
524
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
525
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._imageBoundsContribitions.length && this._imageBoundsContribitions.forEach((c => {
|
|
526
|
-
c.updateBounds(attribute, imageTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
527
|
-
})), this.transformAABBBounds(attribute, aabbBounds, imageTheme, !1, graphic), aabbBounds;
|
|
528
|
-
}
|
|
529
146
|
combindShadowAABBBounds(bounds, graphic) {
|
|
530
147
|
if (graphic && graphic.shadowRoot) {
|
|
531
148
|
const b = graphic.shadowRoot.AABBBounds;
|
|
@@ -552,13 +169,21 @@ let DefaultGraphicService = class {
|
|
|
552
169
|
graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)),
|
|
553
170
|
updateMatrix && (0, vutils_1.transformBoundsWithMatrix)(aabbBounds, aabbBounds, m);
|
|
554
171
|
}
|
|
555
|
-
|
|
172
|
+
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
556
173
|
if (!graphic) return !0;
|
|
557
174
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
558
175
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
559
176
|
const {visible: visible = theme.visible} = attribute;
|
|
560
177
|
return !!visible || (aabbBounds.clear(), !1);
|
|
561
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
|
+
}
|
|
562
187
|
};
|
|
563
188
|
|
|
564
189
|
DefaultGraphicService = __decorate([ (0, inversify_lite_1.injectable)(), __param(0, (0,
|