@visactor/vrender-core 0.17.0-alpha.7 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/allocator/bounds-allocate.d.ts +13 -0
- package/cjs/allocator/bounds-allocate.js +38 -0
- package/cjs/allocator/bounds-allocate.js.map +1 -0
- package/cjs/allocator/canvas-allocate.d.ts +4 -0
- package/cjs/allocator/canvas-allocate.js +19 -6
- package/cjs/allocator/canvas-allocate.js.map +1 -1
- package/cjs/allocator/graphic-allocate.d.ts +56 -1
- package/cjs/allocator/graphic-allocate.js +163 -1
- package/cjs/allocator/graphic-allocate.js.map +1 -1
- package/cjs/animate/Ticker/default-ticker.js +3 -3
- package/cjs/animate/Ticker/default-ticker.js.map +1 -1
- package/cjs/animate/animate.js +1 -1
- package/cjs/animate/animate.js.map +1 -1
- package/cjs/animate/config.js +1 -2
- package/cjs/animate/custom-animate.d.ts +12 -3
- package/cjs/animate/custom-animate.js +92 -2
- package/cjs/animate/custom-animate.js.map +1 -1
- package/cjs/canvas/contributions/base-canvas.js +4 -2
- package/cjs/canvas/contributions/base-canvas.js.map +1 -1
- package/cjs/common/Reflect-metadata.js +349 -359
- package/cjs/common/Reflect-metadata.js.map +1 -1
- package/cjs/common/bezier-utils.js +2 -1
- package/cjs/common/inversify/annotation/inject.d.ts +1 -0
- package/cjs/common/inversify/annotation/inject.js +10 -0
- package/cjs/common/inversify/annotation/inject.js.map +1 -0
- package/cjs/common/inversify/annotation/inject_base.d.ts +14 -0
- package/cjs/common/inversify/annotation/inject_base.js +39 -0
- package/cjs/common/inversify/annotation/inject_base.js.map +1 -0
- package/cjs/common/inversify/annotation/injectable.d.ts +1 -0
- package/cjs/common/{inversify-lite/annotation/post_construct.js → inversify/annotation/injectable.js} +15 -5
- package/cjs/common/inversify/annotation/injectable.js.map +1 -0
- package/cjs/common/inversify/annotation/multi_inject.d.ts +1 -0
- package/cjs/common/inversify/annotation/multi_inject.js +10 -0
- package/cjs/common/inversify/annotation/multi_inject.js.map +1 -0
- package/cjs/common/inversify/annotation/named.d.ts +1 -0
- package/cjs/common/inversify/annotation/named.js +14 -0
- package/cjs/common/inversify/annotation/named.js.map +1 -0
- package/cjs/common/inversify/binding.d.ts +18 -0
- package/cjs/common/inversify/binding.js +26 -0
- package/cjs/common/inversify/binding.js.map +1 -0
- package/cjs/common/inversify/container.d.ts +28 -0
- package/cjs/common/inversify/container.js +155 -0
- package/cjs/common/inversify/container.js.map +1 -0
- package/cjs/common/inversify/cotainer-module.d.ts +6 -0
- package/cjs/common/inversify/cotainer-module.js +16 -0
- package/cjs/common/inversify/cotainer-module.js.map +1 -0
- package/cjs/common/inversify/index.d.ts +7 -0
- package/cjs/common/inversify/index.js +75 -0
- package/cjs/common/inversify/index.js.map +1 -0
- package/cjs/common/inversify/interfaces.d.ts +218 -0
- package/cjs/common/inversify/interfaces.js +6 -0
- package/cjs/common/inversify/interfaces.js.map +1 -0
- package/cjs/common/inversify/literal_types.d.ts +5 -0
- package/cjs/common/inversify/literal_types.js +34 -0
- package/cjs/common/inversify/literal_types.js.map +1 -0
- package/cjs/common/inversify/meta-data.d.ts +6 -0
- package/cjs/common/inversify/meta-data.js +19 -0
- package/cjs/common/inversify/meta-data.js.map +1 -0
- package/cjs/common/inversify/metadata_keys.d.ts +12 -0
- package/cjs/common/inversify/metadata_keys.js +15 -0
- package/cjs/common/inversify/metadata_keys.js.map +1 -0
- package/cjs/common/inversify/metadata_reader.d.ts +6 -0
- package/cjs/common/inversify/metadata_reader.js +28 -0
- package/cjs/common/inversify/metadata_reader.js.map +1 -0
- package/cjs/common/inversify/syntax/binding_in_syntax.d.ts +10 -0
- package/cjs/common/inversify/syntax/binding_in_syntax.js +29 -0
- package/cjs/common/inversify/syntax/binding_in_syntax.js.map +1 -0
- package/cjs/common/inversify/syntax/binding_to_syntax.d.ts +12 -0
- package/cjs/common/inversify/syntax/binding_to_syntax.js +40 -0
- package/cjs/common/inversify/syntax/binding_to_syntax.js.map +1 -0
- package/cjs/common/inversify/syntax/constraint_helpers.d.ts +2 -0
- package/cjs/common/inversify/syntax/constraint_helpers.js +20 -0
- package/cjs/common/inversify/syntax/constraint_helpers.js.map +1 -0
- package/cjs/common/inversify-lite/container/container.js +1 -3
- package/cjs/common/inversify-lite/container/container.js.map +1 -1
- package/cjs/common/inversify-lite/index.d.ts +1 -8
- package/cjs/common/inversify-lite/index.js +1 -64
- package/cjs/common/inversify-lite/index.js.map +1 -1
- package/cjs/common/inversify-lite/interfaces/interfaces.d.ts +0 -2
- package/cjs/common/inversify-lite/interfaces/interfaces.js.map +1 -1
- package/cjs/common/inversify-lite/planning/queryable_string.d.ts +0 -2
- package/cjs/common/inversify-lite/planning/queryable_string.js +0 -10
- package/cjs/common/inversify-lite/planning/queryable_string.js.map +1 -1
- package/cjs/common/inversify-lite/resolution/resolver.js.map +1 -1
- package/cjs/common/shape/rect.js +2 -1
- package/cjs/common/shape/rect.js.map +1 -1
- package/cjs/common/sort.js +1 -2
- package/cjs/common/split-path.js +2 -1
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.d.ts +2 -2
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +4 -9
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/empty-contribution.d.ts +2 -2
- package/cjs/core/contributions/layerHandler/empty-contribution.js +4 -9
- package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.d.ts +2 -2
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +4 -9
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/cjs/core/contributions/textMeasure/AtextMeasure.d.ts +14 -2
- package/cjs/core/contributions/textMeasure/AtextMeasure.js +99 -13
- package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/cjs/core/contributions/textMeasure/layout.d.ts +2 -2
- package/cjs/core/contributions/textMeasure/layout.js +4 -4
- package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
- package/cjs/core/contributions/textMeasure/modules.js +1 -2
- package/cjs/core/contributions/textMeasure/modules.js.map +1 -1
- package/cjs/core/core-modules.js +5 -6
- package/cjs/core/core-modules.js.map +1 -1
- package/cjs/core/global.d.ts +4 -0
- package/cjs/core/global.js +8 -5
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/graphic-utils.d.ts +7 -4
- package/cjs/core/graphic-utils.js +18 -14
- package/cjs/core/graphic-utils.js.map +1 -1
- package/cjs/core/layer-service.d.ts +5 -2
- package/cjs/core/layer-service.js +13 -13
- package/cjs/core/layer-service.js.map +1 -1
- package/cjs/core/stage.d.ts +7 -4
- package/cjs/core/stage.js +38 -34
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.d.ts +2 -2
- package/cjs/core/window.js +7 -12
- package/cjs/core/window.js.map +1 -1
- package/cjs/event/event-manager.d.ts +5 -1
- package/cjs/event/event-manager.js +28 -22
- package/cjs/event/event-manager.js.map +1 -1
- package/cjs/event/event-system.js +12 -11
- package/cjs/event/event-system.js.map +1 -1
- package/cjs/event/federated-event/base-event.d.ts +5 -6
- package/cjs/event/federated-event/base-event.js +14 -5
- package/cjs/event/federated-event/base-event.js.map +1 -1
- package/cjs/event/federated-event/mouse-event.d.ts +6 -6
- package/cjs/event/federated-event/mouse-event.js +17 -3
- package/cjs/event/federated-event/mouse-event.js.map +1 -1
- package/cjs/graphic/area.js +1 -0
- package/cjs/graphic/area.js.map +1 -1
- package/cjs/graphic/config.js +8 -3
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic-service/arc-contribution.d.ts +1 -5
- package/cjs/graphic/graphic-service/arc-contribution.js +0 -18
- package/cjs/graphic/graphic-service/arc-contribution.js.map +1 -1
- package/cjs/graphic/graphic-service/area-contribution.d.ts +1 -1
- package/cjs/graphic/graphic-service/area-contribution.js +1 -4
- package/cjs/graphic/graphic-service/area-contribution.js.map +1 -1
- package/cjs/graphic/graphic-service/circle-contribution.d.ts +1 -5
- package/cjs/graphic/graphic-service/circle-contribution.js +0 -18
- package/cjs/graphic/graphic-service/circle-contribution.js.map +1 -1
- package/cjs/graphic/graphic-service/common-contribution.js +2 -11
- package/cjs/graphic/graphic-service/common-contribution.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-module.js +2 -17
- package/cjs/graphic/graphic-service/graphic-module.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-service.d.ts +5 -9
- package/cjs/graphic/graphic-service/graphic-service.js +43 -32
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/graphic-service/path-contribution.d.ts +1 -5
- package/cjs/graphic/graphic-service/path-contribution.js +0 -18
- package/cjs/graphic/graphic-service/path-contribution.js.map +1 -1
- package/cjs/graphic/graphic-service/rect-contribution.d.ts +1 -5
- package/cjs/graphic/graphic-service/rect-contribution.js +0 -18
- package/cjs/graphic/graphic-service/rect-contribution.js.map +1 -1
- package/cjs/graphic/graphic-service/symbol-contribution.d.ts +0 -1
- package/cjs/graphic/graphic-service/symbol-contribution.js +4 -13
- package/cjs/graphic/graphic-service/symbol-contribution.js.map +1 -1
- package/cjs/graphic/graphic.js +5 -3
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/group.d.ts +1 -0
- package/cjs/graphic/group.js +7 -3
- package/cjs/graphic/group.js.map +1 -1
- package/cjs/graphic/line.js +1 -0
- package/cjs/graphic/line.js.map +1 -1
- package/cjs/graphic/node-tree.js +1 -1
- package/cjs/graphic/node-tree.js.map +1 -1
- package/cjs/graphic/rect.d.ts +2 -3
- package/cjs/graphic/rect.js +3 -5
- package/cjs/graphic/rect.js.map +1 -1
- package/cjs/graphic/richtext.d.ts +3 -3
- package/cjs/graphic/richtext.js.map +1 -1
- package/cjs/graphic/symbol.js +8 -7
- package/cjs/graphic/symbol.js.map +1 -1
- package/cjs/graphic/text.js +8 -8
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/graphic/theme.d.ts +4 -4
- package/cjs/graphic/theme.js +26 -27
- package/cjs/graphic/theme.js.map +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/interface/allocator.d.ts +1 -0
- package/cjs/interface/allocator.js.map +1 -1
- package/cjs/interface/event.d.ts +15 -44
- package/cjs/interface/event.js.map +1 -1
- package/cjs/interface/global.d.ts +1 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic/rect.d.ts +2 -0
- package/cjs/interface/graphic/rect.js.map +1 -1
- package/cjs/interface/graphic/text.d.ts +1 -0
- package/cjs/interface/graphic/text.js.map +1 -1
- package/cjs/interface/graphic.d.ts +1 -1
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/render.d.ts +2 -2
- package/cjs/interface/render.js.map +1 -1
- package/cjs/interface/stage.d.ts +8 -1
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/interface/text.d.ts +2 -2
- package/cjs/interface/text.js.map +1 -1
- package/cjs/modules.d.ts +1 -2
- package/cjs/modules.js +8 -8
- package/cjs/modules.js.map +1 -1
- package/cjs/picker/global-picker-service.d.ts +2 -2
- package/cjs/picker/global-picker-service.js +4 -9
- package/cjs/picker/global-picker-service.js.map +1 -1
- package/cjs/picker/pick-interceptor.js +2 -1
- package/cjs/picker/pick-interceptor.js.map +1 -1
- package/cjs/picker/pick-modules.js +2 -4
- package/cjs/picker/pick-modules.js.map +1 -1
- package/cjs/picker/picker-service.d.ts +2 -2
- package/cjs/picker/picker-service.js +6 -6
- package/cjs/picker/picker-service.js.map +1 -1
- package/cjs/plugins/plugin-modules.js +1 -2
- package/cjs/plugins/plugin-modules.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.js +2 -1
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/area-render.d.ts +1 -0
- package/cjs/render/contributions/render/area-render.js +44 -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 +15 -18
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/circle-render.js +2 -1
- package/cjs/render/contributions/render/circle-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/arc-contribution-render.d.ts +3 -7
- package/cjs/render/contributions/render/contributions/arc-contribution-render.js +7 -30
- package/cjs/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/area-contribution-render.d.ts +3 -4
- package/cjs/render/contributions/render/contributions/area-contribution-render.js +7 -21
- package/cjs/render/contributions/render/contributions/area-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/base-contribution-render.d.ts +4 -0
- package/cjs/render/contributions/render/contributions/base-contribution-render.js +18 -11
- package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/circle-contribution-render.d.ts +3 -7
- package/cjs/render/contributions/render/contributions/circle-contribution-render.js +7 -30
- package/cjs/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/constants.d.ts +1 -0
- package/cjs/render/contributions/render/contributions/constants.js +2 -2
- package/cjs/render/contributions/render/contributions/constants.js.map +1 -1
- package/cjs/render/contributions/render/contributions/group-contribution-render.d.ts +1 -0
- package/cjs/render/contributions/render/contributions/group-contribution-render.js +8 -14
- package/cjs/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.d.ts +1 -0
- package/cjs/render/contributions/render/contributions/image-contribution-render.js +8 -15
- package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/path-contribution-render.d.ts +2 -9
- package/cjs/render/contributions/render/contributions/path-contribution-render.js +4 -25
- package/cjs/render/contributions/render/contributions/path-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/polygon-contribution-render.d.ts +2 -9
- package/cjs/render/contributions/render/contributions/polygon-contribution-render.js +4 -25
- package/cjs/render/contributions/render/contributions/polygon-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.d.ts +5 -7
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +17 -37
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.d.ts +3 -7
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +6 -27
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/text-contribution-render.d.ts +8 -1
- package/cjs/render/contributions/render/contributions/text-contribution-render.js +25 -1
- package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.d.ts +7 -6
- package/cjs/render/contributions/render/draw-contribution.js +37 -25
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.d.ts +9 -1
- package/cjs/render/contributions/render/draw-interceptor.js +41 -27
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/group-render.js +3 -2
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/image-render.js +4 -2
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-draw-contribution.d.ts +2 -6
- package/cjs/render/contributions/render/incremental-draw-contribution.js +8 -11
- package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/line-render.d.ts +1 -0
- package/cjs/render/contributions/render/line-render.js +21 -6
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/cjs/render/contributions/render/module.js +32 -87
- package/cjs/render/contributions/render/module.js.map +1 -1
- package/cjs/render/contributions/render/path-render.d.ts +2 -1
- package/cjs/render/contributions/render/path-render.js +8 -5
- package/cjs/render/contributions/render/path-render.js.map +1 -1
- package/cjs/render/contributions/render/polygon-render.js +2 -1
- package/cjs/render/contributions/render/polygon-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.d.ts +2 -1
- package/cjs/render/contributions/render/rect-render.js +11 -5
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/render-slector.d.ts +1 -4
- package/cjs/render/contributions/render/render-slector.js +0 -20
- package/cjs/render/contributions/render/render-slector.js.map +1 -1
- package/cjs/render/contributions/render/richtext-render.d.ts +1 -0
- package/cjs/render/contributions/render/richtext-render.js +12 -7
- package/cjs/render/contributions/render/richtext-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.js +22 -5
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/cjs/render/contributions/render/text-render.js +12 -9
- package/cjs/render/contributions/render/text-render.js.map +1 -1
- package/cjs/render/contributions/render/utils.js +2 -2
- package/cjs/render/contributions/render/utils.js.map +1 -1
- package/cjs/render/render-modules.js +1 -1
- package/cjs/render/render-modules.js.map +1 -1
- package/cjs/render/render-service.js +1 -1
- package/cjs/render/render-service.js.map +1 -1
- package/dist/index.js +5903 -6437
- package/dist/index.min.js +1 -1
- package/es/allocator/bounds-allocate.d.ts +13 -0
- package/es/allocator/bounds-allocate.js +32 -0
- package/es/allocator/bounds-allocate.js.map +1 -0
- package/es/allocator/canvas-allocate.d.ts +4 -0
- package/es/allocator/canvas-allocate.js +19 -6
- package/es/allocator/canvas-allocate.js.map +1 -1
- package/es/allocator/graphic-allocate.d.ts +56 -1
- package/es/allocator/graphic-allocate.js +155 -1
- package/es/allocator/graphic-allocate.js.map +1 -1
- package/es/animate/Ticker/default-ticker.js +4 -2
- package/es/animate/Ticker/default-ticker.js.map +1 -1
- package/es/animate/animate.js +2 -2
- package/es/animate/animate.js.map +1 -1
- package/es/animate/config.js +1 -2
- package/es/animate/custom-animate.d.ts +12 -3
- package/es/animate/custom-animate.js +96 -2
- package/es/animate/custom-animate.js.map +1 -1
- package/es/canvas/contributions/base-canvas.js +4 -2
- package/es/canvas/contributions/base-canvas.js.map +1 -1
- package/es/common/Reflect-metadata.js +349 -359
- package/es/common/Reflect-metadata.js.map +1 -1
- package/es/common/bezier-utils.js +2 -1
- package/es/common/inversify/annotation/inject.d.ts +1 -0
- package/es/common/inversify/annotation/inject.js +6 -0
- package/es/common/inversify/annotation/inject.js.map +1 -0
- package/es/common/inversify/annotation/inject_base.d.ts +14 -0
- package/es/common/inversify/annotation/inject_base.js +29 -0
- package/es/common/inversify/annotation/inject_base.js.map +1 -0
- package/es/common/inversify/annotation/injectable.d.ts +1 -0
- package/es/common/inversify/annotation/injectable.js +10 -0
- package/es/common/inversify/annotation/injectable.js.map +1 -0
- package/es/common/inversify/annotation/multi_inject.d.ts +1 -0
- package/es/common/inversify/annotation/multi_inject.js +6 -0
- package/es/common/inversify/annotation/multi_inject.js.map +1 -0
- package/es/common/inversify/annotation/named.d.ts +1 -0
- package/es/common/inversify/annotation/named.js +10 -0
- package/es/common/inversify/annotation/named.js.map +1 -0
- package/es/common/inversify/binding.d.ts +18 -0
- package/es/common/inversify/binding.js +22 -0
- package/es/common/inversify/binding.js.map +1 -0
- package/es/common/inversify/container.d.ts +28 -0
- package/es/common/inversify/container.js +155 -0
- package/es/common/inversify/container.js.map +1 -0
- package/es/common/inversify/cotainer-module.d.ts +6 -0
- package/es/common/inversify/cotainer-module.js +8 -0
- package/es/common/inversify/cotainer-module.js.map +1 -0
- package/es/common/inversify/index.d.ts +7 -0
- package/es/common/inversify/index.js +14 -0
- package/es/common/inversify/index.js.map +1 -0
- package/es/common/inversify/interfaces.d.ts +218 -0
- package/es/common/inversify/interfaces.js +2 -0
- package/es/common/inversify/interfaces.js.map +1 -0
- package/es/common/inversify/literal_types.d.ts +5 -0
- package/es/common/inversify/literal_types.js +20 -0
- package/es/common/inversify/literal_types.js.map +1 -0
- package/es/common/inversify/meta-data.d.ts +6 -0
- package/es/common/inversify/meta-data.js +11 -0
- package/es/common/inversify/meta-data.js.map +1 -0
- package/es/common/inversify/metadata_keys.d.ts +12 -0
- package/es/common/inversify/metadata_keys.js +28 -0
- package/es/common/inversify/metadata_keys.js.map +1 -0
- package/es/common/inversify/metadata_reader.d.ts +6 -0
- package/es/common/inversify/metadata_reader.js +18 -0
- package/es/common/inversify/metadata_reader.js.map +1 -0
- package/es/common/inversify/syntax/binding_in_syntax.d.ts +10 -0
- package/es/common/inversify/syntax/binding_in_syntax.js +24 -0
- package/es/common/inversify/syntax/binding_in_syntax.js.map +1 -0
- package/es/common/inversify/syntax/binding_to_syntax.d.ts +12 -0
- package/es/common/inversify/syntax/binding_to_syntax.js +36 -0
- package/es/common/inversify/syntax/binding_to_syntax.js.map +1 -0
- package/es/common/inversify/syntax/constraint_helpers.d.ts +2 -0
- package/es/common/inversify/syntax/constraint_helpers.js +18 -0
- package/es/common/inversify/syntax/constraint_helpers.js.map +1 -0
- package/es/common/inversify-lite/container/container.js +2 -4
- package/es/common/inversify-lite/container/container.js.map +1 -1
- package/es/common/inversify-lite/index.d.ts +1 -8
- package/es/common/inversify-lite/index.js +1 -15
- package/es/common/inversify-lite/index.js.map +1 -1
- package/es/common/inversify-lite/interfaces/interfaces.d.ts +0 -2
- package/es/common/inversify-lite/interfaces/interfaces.js.map +1 -1
- package/es/common/inversify-lite/planning/queryable_string.d.ts +0 -2
- package/es/common/inversify-lite/planning/queryable_string.js +0 -10
- package/es/common/inversify-lite/planning/queryable_string.js.map +1 -1
- package/es/common/inversify-lite/resolution/resolver.js.map +1 -1
- package/es/common/shape/rect.js +2 -1
- package/es/common/shape/rect.js.map +1 -1
- package/es/common/sort.js +1 -2
- package/es/common/split-path.js +2 -1
- package/es/core/contributions/layerHandler/canvas2d-contribution.d.ts +2 -2
- package/es/core/contributions/layerHandler/canvas2d-contribution.js +5 -9
- package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/empty-contribution.d.ts +2 -2
- package/es/core/contributions/layerHandler/empty-contribution.js +5 -9
- package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/offscreen2d-contribution.d.ts +2 -2
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js +5 -9
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/es/core/contributions/textMeasure/AtextMeasure.d.ts +14 -2
- package/es/core/contributions/textMeasure/AtextMeasure.js +99 -13
- package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
- package/es/core/contributions/textMeasure/layout.d.ts +2 -2
- package/es/core/contributions/textMeasure/layout.js +4 -4
- package/es/core/contributions/textMeasure/layout.js.map +1 -1
- package/es/core/contributions/textMeasure/modules.js +1 -1
- package/es/core/contributions/textMeasure/modules.js.map +1 -1
- package/es/core/core-modules.js +4 -6
- package/es/core/core-modules.js.map +1 -1
- package/es/core/global.d.ts +4 -0
- package/es/core/global.js +8 -4
- package/es/core/global.js.map +1 -1
- package/es/core/graphic-utils.d.ts +7 -4
- package/es/core/graphic-utils.js +20 -15
- package/es/core/graphic-utils.js.map +1 -1
- package/es/core/layer-service.d.ts +5 -2
- package/es/core/layer-service.js +14 -13
- package/es/core/layer-service.js.map +1 -1
- package/es/core/stage.d.ts +7 -4
- package/es/core/stage.js +42 -36
- package/es/core/stage.js.map +1 -1
- package/es/core/window.d.ts +2 -2
- package/es/core/window.js +8 -12
- package/es/core/window.js.map +1 -1
- package/es/event/event-manager.d.ts +5 -1
- package/es/event/event-manager.js +29 -23
- package/es/event/event-manager.js.map +1 -1
- package/es/event/event-system.js +8 -6
- package/es/event/event-system.js.map +1 -1
- package/es/event/federated-event/base-event.d.ts +5 -6
- package/es/event/federated-event/base-event.js +14 -5
- package/es/event/federated-event/base-event.js.map +1 -1
- package/es/event/federated-event/mouse-event.d.ts +6 -6
- package/es/event/federated-event/mouse-event.js +16 -4
- package/es/event/federated-event/mouse-event.js.map +1 -1
- package/es/graphic/area.js +1 -0
- package/es/graphic/area.js.map +1 -1
- package/es/graphic/config.js +9 -4
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic-service/arc-contribution.d.ts +1 -5
- package/es/graphic/graphic-service/arc-contribution.js +0 -15
- package/es/graphic/graphic-service/arc-contribution.js.map +1 -1
- package/es/graphic/graphic-service/area-contribution.d.ts +1 -1
- package/es/graphic/graphic-service/area-contribution.js +2 -1
- package/es/graphic/graphic-service/area-contribution.js.map +1 -1
- package/es/graphic/graphic-service/circle-contribution.d.ts +1 -5
- package/es/graphic/graphic-service/circle-contribution.js +0 -15
- package/es/graphic/graphic-service/circle-contribution.js.map +1 -1
- package/es/graphic/graphic-service/common-contribution.js +2 -14
- package/es/graphic/graphic-service/common-contribution.js.map +1 -1
- package/es/graphic/graphic-service/graphic-module.js +1 -23
- package/es/graphic/graphic-service/graphic-module.js.map +1 -1
- package/es/graphic/graphic-service/graphic-service.d.ts +5 -9
- package/es/graphic/graphic-service/graphic-service.js +44 -34
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/graphic-service/path-contribution.d.ts +1 -5
- package/es/graphic/graphic-service/path-contribution.js +0 -15
- package/es/graphic/graphic-service/path-contribution.js.map +1 -1
- package/es/graphic/graphic-service/rect-contribution.d.ts +1 -5
- package/es/graphic/graphic-service/rect-contribution.js +0 -15
- package/es/graphic/graphic-service/rect-contribution.js.map +1 -1
- package/es/graphic/graphic-service/symbol-contribution.d.ts +0 -1
- package/es/graphic/graphic-service/symbol-contribution.js +2 -16
- package/es/graphic/graphic-service/symbol-contribution.js.map +1 -1
- package/es/graphic/graphic.js +5 -3
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/group.d.ts +1 -0
- package/es/graphic/group.js +8 -1
- package/es/graphic/group.js.map +1 -1
- package/es/graphic/line.js +1 -0
- package/es/graphic/line.js.map +1 -1
- package/es/graphic/node-tree.js +2 -2
- package/es/graphic/node-tree.js.map +1 -1
- package/es/graphic/rect.d.ts +2 -3
- package/es/graphic/rect.js +3 -7
- package/es/graphic/rect.js.map +1 -1
- package/es/graphic/richtext.d.ts +3 -3
- package/es/graphic/richtext.js.map +1 -1
- package/es/graphic/symbol.js +7 -7
- package/es/graphic/symbol.js.map +1 -1
- package/es/graphic/text.js +8 -8
- package/es/graphic/text.js.map +1 -1
- package/es/graphic/theme.d.ts +4 -4
- package/es/graphic/theme.js +27 -28
- package/es/graphic/theme.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/allocator.d.ts +1 -0
- package/es/interface/allocator.js.map +1 -1
- package/es/interface/event.d.ts +15 -44
- package/es/interface/event.js.map +1 -1
- package/es/interface/global.d.ts +1 -0
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic/rect.d.ts +2 -0
- package/es/interface/graphic/rect.js.map +1 -1
- package/es/interface/graphic/text.d.ts +1 -0
- package/es/interface/graphic/text.js.map +1 -1
- package/es/interface/graphic.d.ts +1 -1
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/render.d.ts +2 -2
- package/es/interface/render.js.map +1 -1
- package/es/interface/stage.d.ts +8 -1
- package/es/interface/stage.js.map +1 -1
- package/es/interface/text.d.ts +2 -2
- package/es/interface/text.js.map +1 -1
- package/es/modules.d.ts +1 -2
- package/es/modules.js +0 -4
- package/es/modules.js.map +1 -1
- package/es/picker/global-picker-service.d.ts +2 -2
- package/es/picker/global-picker-service.js +5 -9
- package/es/picker/global-picker-service.js.map +1 -1
- package/es/picker/pick-interceptor.js +2 -1
- package/es/picker/pick-interceptor.js.map +1 -1
- package/es/picker/pick-modules.js +1 -4
- package/es/picker/pick-modules.js.map +1 -1
- package/es/picker/picker-service.d.ts +2 -2
- package/es/picker/picker-service.js +5 -5
- package/es/picker/picker-service.js.map +1 -1
- package/es/plugins/plugin-modules.js +1 -2
- package/es/plugins/plugin-modules.js.map +1 -1
- package/es/render/contributions/render/arc-render.js +3 -0
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/area-render.d.ts +1 -0
- package/es/render/contributions/render/area-render.js +45 -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 +15 -22
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/circle-render.js +3 -0
- package/es/render/contributions/render/circle-render.js.map +1 -1
- package/es/render/contributions/render/contributions/arc-contribution-render.d.ts +3 -7
- package/es/render/contributions/render/contributions/arc-contribution-render.js +6 -32
- package/es/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/area-contribution-render.d.ts +3 -4
- package/es/render/contributions/render/contributions/area-contribution-render.js +5 -23
- package/es/render/contributions/render/contributions/area-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/base-contribution-render.d.ts +4 -0
- package/es/render/contributions/render/contributions/base-contribution-render.js +15 -12
- package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/circle-contribution-render.d.ts +3 -7
- package/es/render/contributions/render/contributions/circle-contribution-render.js +6 -32
- package/es/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/constants.d.ts +1 -0
- package/es/render/contributions/render/contributions/constants.js +2 -0
- package/es/render/contributions/render/contributions/constants.js.map +1 -1
- package/es/render/contributions/render/contributions/group-contribution-render.d.ts +1 -0
- package/es/render/contributions/render/contributions/group-contribution-render.js +5 -15
- package/es/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.d.ts +1 -0
- package/es/render/contributions/render/contributions/image-contribution-render.js +6 -17
- package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/path-contribution-render.d.ts +2 -9
- package/es/render/contributions/render/contributions/path-contribution-render.js +3 -29
- package/es/render/contributions/render/contributions/path-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/polygon-contribution-render.d.ts +2 -9
- package/es/render/contributions/render/contributions/polygon-contribution-render.js +3 -29
- package/es/render/contributions/render/contributions/polygon-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.d.ts +5 -7
- package/es/render/contributions/render/contributions/rect-contribution-render.js +19 -46
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/symbol-contribution-render.d.ts +3 -7
- package/es/render/contributions/render/contributions/symbol-contribution-render.js +6 -24
- package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/text-contribution-render.d.ts +8 -1
- package/es/render/contributions/render/contributions/text-contribution-render.js +24 -1
- package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.d.ts +7 -6
- package/es/render/contributions/render/draw-contribution.js +42 -28
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.d.ts +9 -1
- package/es/render/contributions/render/draw-interceptor.js +38 -35
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/group-render.js +4 -1
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/image-render.js +5 -2
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/render/contributions/render/incremental-draw-contribution.d.ts +2 -6
- package/es/render/contributions/render/incremental-draw-contribution.js +5 -11
- package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/es/render/contributions/render/line-render.d.ts +1 -0
- package/es/render/contributions/render/line-render.js +21 -6
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/es/render/contributions/render/module.js +29 -83
- package/es/render/contributions/render/module.js.map +1 -1
- package/es/render/contributions/render/path-render.d.ts +2 -1
- package/es/render/contributions/render/path-render.js +8 -4
- package/es/render/contributions/render/path-render.js.map +1 -1
- package/es/render/contributions/render/polygon-render.js +3 -0
- package/es/render/contributions/render/polygon-render.js.map +1 -1
- package/es/render/contributions/render/rect-render.d.ts +2 -1
- package/es/render/contributions/render/rect-render.js +11 -3
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/render-slector.d.ts +1 -4
- package/es/render/contributions/render/render-slector.js +0 -15
- package/es/render/contributions/render/render-slector.js.map +1 -1
- package/es/render/contributions/render/richtext-render.d.ts +1 -0
- package/es/render/contributions/render/richtext-render.js +12 -6
- package/es/render/contributions/render/richtext-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.js +23 -4
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/es/render/contributions/render/text-render.js +13 -9
- package/es/render/contributions/render/text-render.js.map +1 -1
- package/es/render/contributions/render/utils.js +2 -2
- package/es/render/contributions/render/utils.js.map +1 -1
- package/es/render/render-modules.js +1 -1
- package/es/render/render-modules.js.map +1 -1
- package/es/render/render-service.js +1 -1
- package/es/render/render-service.js.map +1 -1
- package/package.json +6 -4
- package/cjs/common/inversify-lite/annotation/post_construct.d.ts +0 -4
- package/cjs/common/inversify-lite/annotation/post_construct.js.map +0 -1
- package/es/common/inversify-lite/annotation/post_construct.d.ts +0 -4
- package/es/common/inversify-lite/annotation/post_construct.js +0 -10
- package/es/common/inversify-lite/annotation/post_construct.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-service/area-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-service/area-contribution.ts"],"names":[],"mappings":"","file":"area-contribution.js","sourcesContent":["// export const AreaBoundsContribution = Symbol.for('AreaBoundsContribution');\n\n// // @injectable()\n// // export class DefaultArcOuterBorderBoundsContribution\n// // extends DefaultOuterBorderBoundsContribution\n// // implements IArcBoundsContribution {}\n"]}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DefaultOuterBorderBoundsContribution } from './common-contribution';
|
|
3
|
-
export declare const CircleBoundsContribution: unique symbol;
|
|
4
|
-
export declare class DefaultCircleOuterBorderBoundsContribution extends DefaultOuterBorderBoundsContribution implements ICircleBoundsContribution {
|
|
5
|
-
}
|
|
1
|
+
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
};
|
|
6
1
|
|
|
7
|
-
import { injectable } from "../../common/inversify-lite";
|
|
8
2
|
|
|
9
|
-
import { DefaultOuterBorderBoundsContribution } from "./common-contribution";
|
|
10
|
-
|
|
11
|
-
export const CircleBoundsContribution = Symbol.for("CircleBoundsContribution");
|
|
12
|
-
|
|
13
|
-
let DefaultCircleOuterBorderBoundsContribution = class extends DefaultOuterBorderBoundsContribution {};
|
|
14
|
-
|
|
15
|
-
DefaultCircleOuterBorderBoundsContribution = __decorate([ injectable() ], DefaultCircleOuterBorderBoundsContribution);
|
|
16
|
-
|
|
17
|
-
export { DefaultCircleOuterBorderBoundsContribution };
|
|
18
3
|
//# sourceMappingURL=circle-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-service/circle-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-service/circle-contribution.ts"],"names":[],"mappings":"","file":"circle-contribution.js","sourcesContent":["// import { injectable } from '../../common/inversify-lite';\n// import type { ICircleBoundsContribution } from '../../interface';\n// import { DefaultOuterBorderBoundsContribution } from './common-contribution';\n\n// export const CircleBoundsContribution = Symbol.for('CircleBoundsContribution');\n\n// @injectable()\n// export class DefaultCircleOuterBorderBoundsContribution\n// extends DefaultOuterBorderBoundsContribution\n// implements ICircleBoundsContribution {}\n"]}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
3
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
4
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
import { injectable } from "../../common/inversify-lite";
|
|
8
|
-
|
|
9
|
-
let DefaultOuterBorderBoundsContribution = class {
|
|
1
|
+
export class DefaultOuterBorderBoundsContribution {
|
|
10
2
|
updateBounds(attribute, theme, aabbBounds, graphic) {
|
|
11
3
|
const {outerBorder: outerBorder, shadowBlur: shadowBlur = theme.shadowBlur} = attribute;
|
|
12
4
|
if (outerBorder) {
|
|
@@ -15,9 +7,5 @@ let DefaultOuterBorderBoundsContribution = class {
|
|
|
15
7
|
}
|
|
16
8
|
return aabbBounds;
|
|
17
9
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
DefaultOuterBorderBoundsContribution = __decorate([ injectable() ], DefaultOuterBorderBoundsContribution);
|
|
21
|
-
|
|
22
|
-
export { DefaultOuterBorderBoundsContribution };
|
|
10
|
+
}
|
|
23
11
|
//# sourceMappingURL=common-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-service/common-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-service/common-contribution.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,oCAAoC;IAC/C,YAAY,CACV,SAAqC,EACrC,KAAkC,EAClC,UAAuB,EACvB,OAAkB;QAElB,MAAM,EAAE,WAAW,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,EAAE,GAAG,SAAS,CAAC;QACjE,IAAI,WAAW,EAAE;YACf,MAAM,kBAAkB,GAAG,KAAK,CAAC,WAAW,CAAC;YAC7C,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,EAAE,SAAS,GAAG,kBAAkB,CAAC,SAAS,EAAE,GAAG,WAAW,CAAC;YAGzG,UAAU,CAAC,MAAM,CAAE,QAAmB,GAAG,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;SACxE;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","file":"common-contribution.js","sourcesContent":["import type { IAABBBounds } from '@visactor/vutils';\nimport type { IGraphicAttribute, IGraphic } from '../../interface';\n\nexport class DefaultOuterBorderBoundsContribution {\n updateBounds(\n attribute: Partial<IGraphicAttribute>,\n theme: Required<IGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IGraphic\n ): IAABBBounds {\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}\n"]}
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
import { ContainerModule } from "../../common/inversify-lite";
|
|
2
2
|
|
|
3
|
-
import { bindContributionProvider } from "../../common/contribution-provider";
|
|
4
|
-
|
|
5
|
-
import { ArcBoundsContribution, DefaultArcOuterBorderBoundsContribution } from "./arc-contribution";
|
|
6
|
-
|
|
7
|
-
import { CircleBoundsContribution, DefaultCircleOuterBorderBoundsContribution } from "./circle-contribution";
|
|
8
|
-
|
|
9
3
|
import { DefaultGraphicService } from "./graphic-service";
|
|
10
4
|
|
|
11
|
-
import { DefaultPathOuterBorderBoundsContribution, PathBoundsContribution } from "./path-contribution";
|
|
12
|
-
|
|
13
|
-
import { RectBoundsContribution, DefaultRectOuterBorderBoundsContribution } from "./rect-contribution";
|
|
14
|
-
|
|
15
|
-
import { DefaultSymbolOuterBorderBoundsContribution, SymbolBoundsContribution } from "./symbol-contribution";
|
|
16
|
-
|
|
17
5
|
import { GraphicCreator, GraphicService } from "../constants";
|
|
18
6
|
|
|
19
7
|
import { graphicCreator } from "../graphic-creator";
|
|
20
8
|
|
|
21
9
|
export default new ContainerModule((bind => {
|
|
22
|
-
bind(
|
|
23
|
-
bind(DefaultRectOuterBorderBoundsContribution).toSelf().inSingletonScope(), bind(RectBoundsContribution).toService(DefaultRectOuterBorderBoundsContribution),
|
|
24
|
-
bindContributionProvider(bind, RectBoundsContribution), bind(DefaultSymbolOuterBorderBoundsContribution).toSelf().inSingletonScope(),
|
|
25
|
-
bind(SymbolBoundsContribution).toService(DefaultSymbolOuterBorderBoundsContribution),
|
|
26
|
-
bindContributionProvider(bind, SymbolBoundsContribution), bind(DefaultCircleOuterBorderBoundsContribution).toSelf().inSingletonScope(),
|
|
27
|
-
bind(CircleBoundsContribution).toService(DefaultCircleOuterBorderBoundsContribution),
|
|
28
|
-
bindContributionProvider(bind, CircleBoundsContribution), bind(DefaultArcOuterBorderBoundsContribution).toSelf().inSingletonScope(),
|
|
29
|
-
bind(ArcBoundsContribution).toService(DefaultArcOuterBorderBoundsContribution),
|
|
30
|
-
bindContributionProvider(bind, ArcBoundsContribution), bind(DefaultPathOuterBorderBoundsContribution).toSelf().inSingletonScope(),
|
|
31
|
-
bind(PathBoundsContribution).toService(DefaultPathOuterBorderBoundsContribution),
|
|
32
|
-
bindContributionProvider(bind, PathBoundsContribution), bind(GraphicCreator).toConstantValue(graphicCreator);
|
|
10
|
+
bind(GraphicService).to(DefaultGraphicService).inSingletonScope(), bind(GraphicCreator).toConstantValue(graphicCreator);
|
|
33
11
|
}));
|
|
34
12
|
//# sourceMappingURL=graphic-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/graphic-service/graphic-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/graphic/graphic-service/graphic-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,eAAe,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE;IACxC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAElE,IAAI,CAAC,cAAc,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC","file":"graphic-module.js","sourcesContent":["import { ContainerModule } from '../../common/inversify-lite';\n// import { DefaultTheme } from './default-theme';\nimport { DefaultGraphicService } from './graphic-service';\nimport { GraphicCreator, GraphicService } from '../constants';\nimport { graphicCreator } from '../graphic-creator';\n// import { DefaultThemeService, Theme, ThemeServce } from './theme-service';\n\nexport default new ContainerModule(bind => {\n bind(GraphicService).to(DefaultGraphicService).inSingletonScope();\n\n bind(GraphicCreator).toConstantValue(graphicCreator);\n});\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IAABBBounds, IBounds, IMatrix } from '@visactor/vutils';
|
|
2
2
|
import { AABBBounds } from '@visactor/vutils';
|
|
3
|
-
import type { mat4, vec3, IArc, IArcGraphicAttribute, IArea, IAreaGraphicAttribute, IGraphicAttribute, ICircle, ICircleGraphicAttribute, IGraphic, IGroup, IGroupGraphicAttribute, ILine, ILineGraphicAttribute, IPath, IPathGraphicAttribute, IPolygon, IPolygonGraphicAttribute, IRectGraphicAttribute, IStage, ISymbol, ISymbolGraphicAttribute, IText, ITextGraphicAttribute, IGlyph, IGlyphGraphicAttribute, IRichTextGraphicAttribute, IRichText, IPyramid3dGraphicAttribute, IPyramid3d, IArc3dGraphicAttribute, IArc3d, IImageGraphicAttribute, ITransform, IGraphicService, IGraphicCreator, ISyncHook, IRectBoundsContribution, ISymbolBoundsContribution, ICircleBoundsContribution, IArcBoundsContribution, IPathBoundsContribution
|
|
3
|
+
import type { mat4, vec3, IArc, IArcGraphicAttribute, IArea, IAreaGraphicAttribute, IGraphicAttribute, ICircle, ICircleGraphicAttribute, IGraphic, IGroup, IGroupGraphicAttribute, ILine, ILineGraphicAttribute, IPath, IPathGraphicAttribute, IPolygon, IPolygonGraphicAttribute, IRectGraphicAttribute, IStage, ISymbol, ISymbolGraphicAttribute, IText, ITextGraphicAttribute, IGlyph, IGlyphGraphicAttribute, IRichTextGraphicAttribute, IRichText, IPyramid3dGraphicAttribute, IPyramid3d, IArc3dGraphicAttribute, IArc3d, IImageGraphicAttribute, ITransform, IGraphicService, IGraphicCreator, ISyncHook, IRectBoundsContribution, ISymbolBoundsContribution, ICircleBoundsContribution, IArcBoundsContribution, IPathBoundsContribution } from '../../interface';
|
|
4
4
|
export declare function rotateX(out: mat4, a: mat4, rad: number): mat4;
|
|
5
5
|
export declare function rotateY(out: mat4, a: mat4, rad: number): mat4;
|
|
6
6
|
export declare function translate(out: mat4, a: mat4, v: vec3): mat4;
|
|
@@ -12,11 +12,6 @@ export declare function getModelMatrix(out: mat4, graphic: IGraphic, theme: ITra
|
|
|
12
12
|
export declare function shouldUseMat4(graphic: IGraphic): number;
|
|
13
13
|
export declare class DefaultGraphicService implements IGraphicService {
|
|
14
14
|
readonly creator: IGraphicCreator;
|
|
15
|
-
protected readonly rectBoundsContribitions: IContributionProvider<IRectBoundsContribution>;
|
|
16
|
-
protected readonly symbolBoundsContribitions: IContributionProvider<ISymbolBoundsContribution>;
|
|
17
|
-
protected readonly circleBoundsContribitions: IContributionProvider<ICircleBoundsContribution>;
|
|
18
|
-
protected readonly arcBoundsContribitions: IContributionProvider<IArcBoundsContribution>;
|
|
19
|
-
protected readonly pathBoundsContribitions: IContributionProvider<IPathBoundsContribution>;
|
|
20
15
|
hooks: {
|
|
21
16
|
onAttributeUpdate: ISyncHook<[IGraphic]>;
|
|
22
17
|
onSetStage: ISyncHook<[IGraphic, IStage]>;
|
|
@@ -36,7 +31,7 @@ export declare class DefaultGraphicService implements IGraphicService {
|
|
|
36
31
|
protected _pathBoundsContribitions: IPathBoundsContribution[];
|
|
37
32
|
protected tempAABBBounds1: AABBBounds;
|
|
38
33
|
protected tempAABBBounds2: AABBBounds;
|
|
39
|
-
constructor(creator: IGraphicCreator
|
|
34
|
+
constructor(creator: IGraphicCreator);
|
|
40
35
|
onAttributeUpdate(graphic: IGraphic): void;
|
|
41
36
|
onSetStage(graphic: IGraphic, stage: IStage): void;
|
|
42
37
|
onRemove(graphic: IGraphic<Partial<IGraphicAttribute>>): void;
|
|
@@ -72,9 +67,10 @@ export declare class DefaultGraphicService implements IGraphicService {
|
|
|
72
67
|
protected updateArcAABBBoundsImprecise(attribute: IArcGraphicAttribute, arcTheme: Required<IArcGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
73
68
|
protected updateArcAABBBoundsAccurate(attribute: IArcGraphicAttribute, arcTheme: Required<IArcGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
74
69
|
updateSymbolAABBBounds(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, full?: boolean, graphic?: ISymbol): IBounds;
|
|
75
|
-
updateSymbolAABBBoundsImprecise(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
76
|
-
updateSymbolAABBBoundsAccurate(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: ISymbol): IAABBBounds;
|
|
70
|
+
protected updateSymbolAABBBoundsImprecise(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IAABBBounds;
|
|
71
|
+
protected updateSymbolAABBBoundsAccurate(attribute: ISymbolGraphicAttribute, symbolTheme: Required<ISymbolGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: ISymbol): IAABBBounds;
|
|
77
72
|
updateImageAABBBounds(attribute: IImageGraphicAttribute, imageTheme: Required<IImageGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): IBounds;
|
|
78
73
|
combindShadowAABBBounds(bounds: IAABBBounds, graphic?: IGraphic): void;
|
|
79
74
|
transformAABBBounds(attribute: Partial<IGraphicAttribute>, aabbBounds: IAABBBounds, theme: Required<IGraphicAttribute>, miter: boolean, graphic?: IGraphic): void;
|
|
75
|
+
protected _validCheck(attribute: Partial<IGraphicAttribute>, theme: Required<IGraphicAttribute>, aabbBounds: IAABBBounds, graphic?: IGraphic): boolean;
|
|
80
76
|
}
|
|
@@ -10,30 +10,20 @@ var __decorate = this && this.__decorate || function(decorators, target, key, de
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
import { inject, injectable
|
|
13
|
+
import { inject, injectable } from "../../common/inversify-lite";
|
|
14
14
|
|
|
15
15
|
import { AABBBounds, epsilon, isArray, pi2, transformBoundsWithMatrix } from "@visactor/vutils";
|
|
16
16
|
|
|
17
17
|
import { SyncHook } from "../../tapable";
|
|
18
18
|
|
|
19
|
-
import { RectBoundsContribution } from "./rect-contribution";
|
|
20
|
-
|
|
21
19
|
import { textDrawOffsetX } from "../../common/text";
|
|
22
20
|
|
|
23
|
-
import {
|
|
21
|
+
import { DefaultSymbolOuterBorderBoundsContribution } from "./symbol-contribution";
|
|
24
22
|
|
|
25
23
|
import { boundStroke } from "../tools";
|
|
26
24
|
|
|
27
|
-
import { CircleBoundsContribution } from "./circle-contribution";
|
|
28
|
-
|
|
29
|
-
import { ArcBoundsContribution } from "./arc-contribution";
|
|
30
|
-
|
|
31
|
-
import { PathBoundsContribution } from "./path-contribution";
|
|
32
|
-
|
|
33
25
|
import { mat4Allocate } from "../../allocator/matrix-allocate";
|
|
34
26
|
|
|
35
|
-
import { ContributionProvider } from "../../common/contribution-provider";
|
|
36
|
-
|
|
37
27
|
import { BoundsContext } from "../../common/bounds-context";
|
|
38
28
|
|
|
39
29
|
import { renderCommandList } from "../../common/render-command-list";
|
|
@@ -42,6 +32,8 @@ import { circleBounds } from "../../common/utils";
|
|
|
42
32
|
|
|
43
33
|
import { GraphicCreator } from "../constants";
|
|
44
34
|
|
|
35
|
+
import { DefaultOuterBorderBoundsContribution } from "./common-contribution";
|
|
36
|
+
|
|
45
37
|
function identity(out) {
|
|
46
38
|
return out[0] = 1, out[1] = 0, out[2] = 0, out[3] = 0, out[4] = 0, out[5] = 1, out[6] = 0,
|
|
47
39
|
out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = 0, out[13] = 0,
|
|
@@ -196,11 +188,8 @@ export function shouldUseMat4(graphic) {
|
|
|
196
188
|
}
|
|
197
189
|
|
|
198
190
|
let DefaultGraphicService = class {
|
|
199
|
-
constructor(creator
|
|
200
|
-
this.creator = creator, this.
|
|
201
|
-
this.symbolBoundsContribitions = symbolBoundsContribitions, this.circleBoundsContribitions = circleBoundsContribitions,
|
|
202
|
-
this.arcBoundsContribitions = arcBoundsContribitions, this.pathBoundsContribitions = pathBoundsContribitions,
|
|
203
|
-
this.hooks = {
|
|
191
|
+
constructor(creator) {
|
|
192
|
+
this.creator = creator, this.hooks = {
|
|
204
193
|
onAttributeUpdate: new SyncHook([ "graphic" ]),
|
|
205
194
|
onSetStage: new SyncHook([ "graphic", "stage" ]),
|
|
206
195
|
onRemove: new SyncHook([ "graphic" ]),
|
|
@@ -209,7 +198,10 @@ let DefaultGraphicService = class {
|
|
|
209
198
|
onClearIncremental: new SyncHook([ "graphic", "group", "stage" ]),
|
|
210
199
|
beforeUpdateAABBBounds: new SyncHook([ "graphic", "stage", "willUpdate", "aabbBounds" ]),
|
|
211
200
|
afterUpdateAABBBounds: new SyncHook([ "graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange" ])
|
|
212
|
-
}, this.tempAABBBounds1 = new AABBBounds, this.tempAABBBounds2 = new AABBBounds
|
|
201
|
+
}, this.tempAABBBounds1 = new AABBBounds, this.tempAABBBounds2 = new AABBBounds,
|
|
202
|
+
this._rectBoundsContribitions = [ new DefaultOuterBorderBoundsContribution ], this._symbolBoundsContribitions = [ new DefaultSymbolOuterBorderBoundsContribution ],
|
|
203
|
+
this._circleBoundsContribitions = [ new DefaultOuterBorderBoundsContribution ],
|
|
204
|
+
this._arcBoundsContribitions = [ new DefaultOuterBorderBoundsContribution ], this._pathBoundsContribitions = [ new DefaultOuterBorderBoundsContribution ];
|
|
213
205
|
}
|
|
214
206
|
onAttributeUpdate(graphic) {
|
|
215
207
|
this.hooks.onAttributeUpdate.taps.length && this.hooks.onAttributeUpdate.call(graphic);
|
|
@@ -242,14 +234,16 @@ let DefaultGraphicService = class {
|
|
|
242
234
|
return renderCommandList(path.commandList, boundsContext, 0, 0), !0;
|
|
243
235
|
}
|
|
244
236
|
updateRectAABBBounds(attribute, rectTheme, aabbBounds, graphic) {
|
|
237
|
+
if (!this._validCheck(attribute, rectTheme, aabbBounds, graphic)) return aabbBounds;
|
|
245
238
|
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
246
|
-
|
|
247
|
-
|
|
239
|
+
let {width: width, height: height} = attribute;
|
|
240
|
+
const {x1: x1, y1: y1, x: x, y: y} = attribute;
|
|
241
|
+
width = null != width ? width : x1 - x, height = null != height ? height : y1 - y,
|
|
242
|
+
aabbBounds.set(0, 0, width || 0, height || 0);
|
|
248
243
|
}
|
|
249
244
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
250
245
|
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
251
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._rectBoundsContribitions
|
|
252
|
-
this._rectBoundsContribitions.length && this._rectBoundsContribitions.forEach((c => {
|
|
246
|
+
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._rectBoundsContribitions.length && this._rectBoundsContribitions.forEach((c => {
|
|
253
247
|
c.updateBounds(attribute, rectTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
254
248
|
})), this.transformAABBBounds(attribute, aabbBounds, rectTheme, !1, graphic), aabbBounds;
|
|
255
249
|
}
|
|
@@ -266,11 +260,12 @@ let DefaultGraphicService = class {
|
|
|
266
260
|
aabbBounds;
|
|
267
261
|
}
|
|
268
262
|
updateGlyphAABBBounds(attribute, theme, aabbBounds, graphic) {
|
|
269
|
-
return graphic.getSubGraphic().forEach((node => {
|
|
263
|
+
return this._validCheck(attribute, theme, aabbBounds, graphic) ? (graphic.getSubGraphic().forEach((node => {
|
|
270
264
|
aabbBounds.union(node.AABBBounds);
|
|
271
|
-
})), aabbBounds;
|
|
265
|
+
})), aabbBounds) : aabbBounds;
|
|
272
266
|
}
|
|
273
267
|
updateRichTextAABBBounds(attribute, richtextTheme, aabbBounds, graphic) {
|
|
268
|
+
if (!this._validCheck(attribute, richtextTheme, aabbBounds, graphic)) return aabbBounds;
|
|
274
269
|
if (!graphic) return aabbBounds;
|
|
275
270
|
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;
|
|
276
271
|
if (width > 0 && height > 0) aabbBounds.set(0, 0, width, height); else {
|
|
@@ -313,6 +308,7 @@ let DefaultGraphicService = class {
|
|
|
313
308
|
aabbBounds;
|
|
314
309
|
}
|
|
315
310
|
updateTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
|
|
311
|
+
if (!this._validCheck(attribute, textTheme, aabbBounds, graphic)) return aabbBounds;
|
|
316
312
|
if (!graphic) return aabbBounds;
|
|
317
313
|
const {text: text = textTheme.text} = graphic.attribute;
|
|
318
314
|
Array.isArray(text) ? graphic.updateMultilineAABBBounds(text) : graphic.updateSingallineAABBBounds(text);
|
|
@@ -327,10 +323,10 @@ let DefaultGraphicService = class {
|
|
|
327
323
|
aabbBounds;
|
|
328
324
|
}
|
|
329
325
|
updatePathAABBBounds(attribute, pathTheme, aabbBounds, graphic) {
|
|
326
|
+
if (!this._validCheck(attribute, pathTheme, aabbBounds, graphic)) return aabbBounds;
|
|
330
327
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic);
|
|
331
328
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
332
329
|
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
333
|
-
this._pathBoundsContribitions || (this._pathBoundsContribitions = this.pathBoundsContribitions.getContributions() || []),
|
|
334
330
|
this._pathBoundsContribitions.length && this._pathBoundsContribitions.forEach((c => {
|
|
335
331
|
c.updateBounds(attribute, pathTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
336
332
|
}));
|
|
@@ -368,6 +364,7 @@ let DefaultGraphicService = class {
|
|
|
368
364
|
aabbBounds;
|
|
369
365
|
}
|
|
370
366
|
updatePolygonAABBBounds(attribute, polygonTheme, aabbBounds, graphic) {
|
|
367
|
+
if (!this._validCheck(attribute, polygonTheme, aabbBounds, graphic)) return aabbBounds;
|
|
371
368
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds, graphic);
|
|
372
369
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
373
370
|
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
@@ -382,6 +379,7 @@ let DefaultGraphicService = class {
|
|
|
382
379
|
})), aabbBounds;
|
|
383
380
|
}
|
|
384
381
|
updateLineAABBBounds(attribute, lineTheme, aabbBounds, graphic) {
|
|
382
|
+
if (!this._validCheck(attribute, lineTheme, aabbBounds, graphic)) return aabbBounds;
|
|
385
383
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) : this.updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic));
|
|
386
384
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
387
385
|
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
@@ -404,6 +402,7 @@ let DefaultGraphicService = class {
|
|
|
404
402
|
})), b;
|
|
405
403
|
}
|
|
406
404
|
updateAreaAABBBounds(attribute, areaTheme, aabbBounds, graphic) {
|
|
405
|
+
if (!this._validCheck(attribute, areaTheme, aabbBounds, graphic)) return aabbBounds;
|
|
407
406
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic));
|
|
408
407
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
409
408
|
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2);
|
|
@@ -428,11 +427,11 @@ let DefaultGraphicService = class {
|
|
|
428
427
|
})), b;
|
|
429
428
|
}
|
|
430
429
|
updateCircleAABBBounds(attribute, circleTheme, aabbBounds, full, graphic) {
|
|
430
|
+
if (!this._validCheck(attribute, circleTheme, aabbBounds, graphic)) return aabbBounds;
|
|
431
431
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds, graphic) : this.updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds, graphic));
|
|
432
432
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
433
433
|
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
434
|
-
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._circleBoundsContribitions
|
|
435
|
-
this._circleBoundsContribitions.length && this._circleBoundsContribitions.forEach((c => {
|
|
434
|
+
tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._circleBoundsContribitions.length && this._circleBoundsContribitions.forEach((c => {
|
|
436
435
|
c.updateBounds(attribute, circleTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
437
436
|
})), this.transformAABBBounds(attribute, aabbBounds, circleTheme, !1, graphic),
|
|
438
437
|
aabbBounds;
|
|
@@ -447,10 +446,10 @@ let DefaultGraphicService = class {
|
|
|
447
446
|
aabbBounds;
|
|
448
447
|
}
|
|
449
448
|
updateArcAABBBounds(attribute, arcTheme, aabbBounds, full, graphic) {
|
|
449
|
+
if (!this._validCheck(attribute, arcTheme, aabbBounds, graphic)) return aabbBounds;
|
|
450
450
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) : this.updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic));
|
|
451
451
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
452
452
|
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
453
|
-
this._arcBoundsContribitions || (this._arcBoundsContribitions = this.arcBoundsContribitions.getContributions() || []),
|
|
454
453
|
this._arcBoundsContribitions.length && this._arcBoundsContribitions.forEach((c => {
|
|
455
454
|
c.updateBounds(attribute, arcTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
456
455
|
}));
|
|
@@ -477,10 +476,10 @@ let DefaultGraphicService = class {
|
|
|
477
476
|
circleBounds(startAngle, endAngle, innerRadius, aabbBounds)), aabbBounds;
|
|
478
477
|
}
|
|
479
478
|
updateSymbolAABBBounds(attribute, symbolTheme, aabbBounds, full, graphic) {
|
|
479
|
+
if (!this._validCheck(attribute, symbolTheme, aabbBounds, graphic)) return aabbBounds;
|
|
480
480
|
this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds, graphic));
|
|
481
481
|
const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
482
482
|
tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
|
|
483
|
-
this._symbolBoundsContribitions || (this._symbolBoundsContribitions = this.symbolBoundsContribitions.getContributions() || []),
|
|
484
483
|
this._symbolBoundsContribitions.length && this._symbolBoundsContribitions.forEach((c => {
|
|
485
484
|
c.updateBounds(attribute, symbolTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
486
485
|
}));
|
|
@@ -502,6 +501,7 @@ let DefaultGraphicService = class {
|
|
|
502
501
|
return graphic.getParsedPath().bounds(size, aabbBounds), aabbBounds;
|
|
503
502
|
}
|
|
504
503
|
updateImageAABBBounds(attribute, imageTheme, aabbBounds, graphic) {
|
|
504
|
+
if (!this._validCheck(attribute, imageTheme, aabbBounds, graphic)) return aabbBounds;
|
|
505
505
|
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
506
506
|
const {width: width = imageTheme.width, height: height = imageTheme.height} = attribute;
|
|
507
507
|
aabbBounds.set(0, 0, width, height);
|
|
@@ -519,20 +519,30 @@ let DefaultGraphicService = class {
|
|
|
519
519
|
}
|
|
520
520
|
transformAABBBounds(attribute, aabbBounds, theme, miter, graphic) {
|
|
521
521
|
const {scaleX: scaleX = theme.scaleX, scaleY: scaleY = theme.scaleY, stroke: stroke = theme.stroke, shadowBlur: shadowBlur = theme.shadowBlur, lineWidth: lineWidth = theme.lineWidth, strokeBoundsBuffer: strokeBoundsBuffer = theme.strokeBoundsBuffer} = attribute, tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
|
|
522
|
-
if (stroke) {
|
|
522
|
+
if (stroke && lineWidth) {
|
|
523
523
|
const scaledHalfLineWidth = lineWidth / Math.abs(scaleX + scaleY);
|
|
524
524
|
boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1),
|
|
525
525
|
tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
526
526
|
}
|
|
527
527
|
if (shadowBlur) {
|
|
528
|
-
const
|
|
529
|
-
boundStroke(tb1,
|
|
528
|
+
const {shadowOffsetX: shadowOffsetX = theme.shadowOffsetX, shadowOffsetY: shadowOffsetY = theme.shadowOffsetY} = attribute, shadowBlurWidth = shadowBlur / Math.abs(scaleX + scaleY) * 2 + Math.max(shadowOffsetX, shadowOffsetY);
|
|
529
|
+
boundStroke(tb1, shadowBlurWidth, miter, strokeBoundsBuffer + 1), aabbBounds.union(tb1);
|
|
530
530
|
}
|
|
531
|
-
this.combindShadowAABBBounds(aabbBounds, graphic)
|
|
531
|
+
this.combindShadowAABBBounds(aabbBounds, graphic);
|
|
532
|
+
let updateMatrix = !0;
|
|
533
|
+
const m = graphic.transMatrix;
|
|
534
|
+
graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)),
|
|
535
|
+
updateMatrix && transformBoundsWithMatrix(aabbBounds, aabbBounds, m);
|
|
536
|
+
}
|
|
537
|
+
_validCheck(attribute, theme, aabbBounds, graphic) {
|
|
538
|
+
if (!graphic) return !0;
|
|
539
|
+
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
540
|
+
const {visible: visible = theme.visible} = attribute;
|
|
541
|
+
return !!visible || (aabbBounds.clear(), !1);
|
|
532
542
|
}
|
|
533
543
|
};
|
|
534
544
|
|
|
535
|
-
DefaultGraphicService = __decorate([ injectable(), __param(0, inject(GraphicCreator)),
|
|
545
|
+
DefaultGraphicService = __decorate([ injectable(), __param(0, inject(GraphicCreator)), __metadata("design:paramtypes", [ Object ]) ], DefaultGraphicService);
|
|
536
546
|
|
|
537
547
|
export { DefaultGraphicService };
|
|
538
548
|
//# sourceMappingURL=graphic-service.js.map
|