@visactor/vrender-kits 0.19.19 → 0.20.0-alpha.1

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.
Files changed (226) hide show
  1. package/cjs/canvas/contributions/browser/context.js +2 -2
  2. package/cjs/canvas/contributions/browser/context.js.map +1 -1
  3. package/cjs/canvas/contributions/harmony/context.js +3 -3
  4. package/cjs/canvas/contributions/harmony/context.js.map +1 -1
  5. package/cjs/canvas/contributions/taro/context.js +3 -3
  6. package/cjs/canvas/contributions/taro/context.js.map +1 -1
  7. package/cjs/picker/contributions/canvas-picker/arc-picker.d.ts +3 -4
  8. package/cjs/picker/contributions/canvas-picker/arc-picker.js +3 -24
  9. package/cjs/picker/contributions/canvas-picker/arc-picker.js.map +1 -1
  10. package/cjs/picker/contributions/canvas-picker/arc3d-picker.d.ts +4 -5
  11. package/cjs/picker/contributions/canvas-picker/arc3d-picker.js +4 -23
  12. package/cjs/picker/contributions/canvas-picker/arc3d-picker.js.map +1 -1
  13. package/cjs/picker/contributions/canvas-picker/area-picker.d.ts +3 -4
  14. package/cjs/picker/contributions/canvas-picker/area-picker.js +3 -25
  15. package/cjs/picker/contributions/canvas-picker/area-picker.js.map +1 -1
  16. package/cjs/picker/contributions/canvas-picker/circle-picker.d.ts +3 -4
  17. package/cjs/picker/contributions/canvas-picker/circle-picker.js +3 -23
  18. package/cjs/picker/contributions/canvas-picker/circle-picker.js.map +1 -1
  19. package/cjs/picker/contributions/canvas-picker/glyph-picker.d.ts +3 -6
  20. package/cjs/picker/contributions/canvas-picker/glyph-picker.js +3 -19
  21. package/cjs/picker/contributions/canvas-picker/glyph-picker.js.map +1 -1
  22. package/cjs/picker/contributions/canvas-picker/line-picker.d.ts +3 -5
  23. package/cjs/picker/contributions/canvas-picker/line-picker.js +2 -28
  24. package/cjs/picker/contributions/canvas-picker/line-picker.js.map +1 -1
  25. package/cjs/picker/contributions/canvas-picker/path-picker.d.ts +3 -5
  26. package/cjs/picker/contributions/canvas-picker/path-picker.js +2 -29
  27. package/cjs/picker/contributions/canvas-picker/path-picker.js.map +1 -1
  28. package/cjs/picker/contributions/canvas-picker/polygon-picker.d.ts +3 -4
  29. package/cjs/picker/contributions/canvas-picker/polygon-picker.js +3 -23
  30. package/cjs/picker/contributions/canvas-picker/polygon-picker.js.map +1 -1
  31. package/cjs/picker/contributions/canvas-picker/pyramid3d-picker.d.ts +4 -5
  32. package/cjs/picker/contributions/canvas-picker/pyramid3d-picker.js +4 -24
  33. package/cjs/picker/contributions/canvas-picker/pyramid3d-picker.js.map +1 -1
  34. package/cjs/picker/contributions/canvas-picker/rect-picker.d.ts +3 -6
  35. package/cjs/picker/contributions/canvas-picker/rect-picker.js +3 -35
  36. package/cjs/picker/contributions/canvas-picker/rect-picker.js.map +1 -1
  37. package/cjs/picker/contributions/canvas-picker/rect3d-picker.d.ts +4 -5
  38. package/cjs/picker/contributions/canvas-picker/rect3d-picker.js +4 -23
  39. package/cjs/picker/contributions/canvas-picker/rect3d-picker.js.map +1 -1
  40. package/cjs/picker/contributions/canvas-picker/symbol-picker.d.ts +2 -2
  41. package/cjs/picker/contributions/canvas-picker/symbol-picker.js +2 -2
  42. package/cjs/picker/contributions/canvas-picker/symbol-picker.js.map +1 -1
  43. package/cjs/picker/contributions/canvas-picker/text-picker.d.ts +2 -2
  44. package/cjs/picker/contributions/canvas-picker/text-picker.js +2 -2
  45. package/cjs/picker/contributions/canvas-picker/text-picker.js.map +1 -1
  46. package/cjs/picker/contributions/common/base-3d-picker.d.ts +8 -0
  47. package/cjs/picker/contributions/common/base-3d-picker.js +34 -0
  48. package/cjs/picker/contributions/common/base-3d-picker.js.map +1 -0
  49. package/cjs/picker/contributions/common/base-line-picker.d.ts +7 -0
  50. package/cjs/picker/contributions/common/base-line-picker.js +39 -0
  51. package/cjs/picker/contributions/common/base-line-picker.js.map +1 -0
  52. package/cjs/picker/contributions/common/base.d.ts +6 -0
  53. package/cjs/picker/contributions/common/base.js +34 -0
  54. package/cjs/picker/contributions/common/base.js.map +1 -0
  55. package/cjs/picker/contributions/common/glyph-picker-base.d.ts +7 -0
  56. package/cjs/picker/contributions/common/glyph-picker-base.js +32 -0
  57. package/cjs/picker/contributions/common/glyph-picker-base.js.map +1 -0
  58. package/cjs/picker/contributions/common/picker-utils.d.ts +3 -0
  59. package/cjs/picker/contributions/common/picker-utils.js +14 -0
  60. package/cjs/picker/contributions/common/picker-utils.js.map +1 -0
  61. package/cjs/picker/contributions/common/rect-picker-base.d.ts +8 -0
  62. package/cjs/picker/contributions/common/rect-picker-base.js +48 -0
  63. package/cjs/picker/contributions/common/rect-picker-base.js.map +1 -0
  64. package/cjs/picker/contributions/math-picker/arc-picker.d.ts +3 -4
  65. package/cjs/picker/contributions/math-picker/arc-picker.js +3 -24
  66. package/cjs/picker/contributions/math-picker/arc-picker.js.map +1 -1
  67. package/cjs/picker/contributions/math-picker/area-picker.d.ts +3 -4
  68. package/cjs/picker/contributions/math-picker/area-picker.js +3 -18
  69. package/cjs/picker/contributions/math-picker/area-picker.js.map +1 -1
  70. package/cjs/picker/contributions/math-picker/circle-picker.d.ts +3 -4
  71. package/cjs/picker/contributions/math-picker/circle-picker.js +3 -23
  72. package/cjs/picker/contributions/math-picker/circle-picker.js.map +1 -1
  73. package/cjs/picker/contributions/math-picker/glyph-picker.d.ts +3 -6
  74. package/cjs/picker/contributions/math-picker/glyph-picker.js +3 -17
  75. package/cjs/picker/contributions/math-picker/glyph-picker.js.map +1 -1
  76. package/cjs/picker/contributions/math-picker/line-picker.d.ts +3 -4
  77. package/cjs/picker/contributions/math-picker/line-picker.js +3 -23
  78. package/cjs/picker/contributions/math-picker/line-picker.js.map +1 -1
  79. package/cjs/picker/contributions/math-picker/path-picker.d.ts +3 -4
  80. package/cjs/picker/contributions/math-picker/path-picker.js +3 -23
  81. package/cjs/picker/contributions/math-picker/path-picker.js.map +1 -1
  82. package/cjs/picker/contributions/math-picker/polygon-picker.d.ts +3 -4
  83. package/cjs/picker/contributions/math-picker/polygon-picker.js +3 -22
  84. package/cjs/picker/contributions/math-picker/polygon-picker.js.map +1 -1
  85. package/cjs/picker/contributions/math-picker/rect-picker.d.ts +3 -6
  86. package/cjs/picker/contributions/math-picker/rect-picker.js +3 -35
  87. package/cjs/picker/contributions/math-picker/rect-picker.js.map +1 -1
  88. package/cjs/picker/contributions/math-picker/symbol-picker.d.ts +3 -4
  89. package/cjs/picker/contributions/math-picker/symbol-picker.js +3 -23
  90. package/cjs/picker/contributions/math-picker/symbol-picker.js.map +1 -1
  91. package/cjs/register/register-arc3d.js +1 -0
  92. package/cjs/register/register-arc3d.js.map +1 -1
  93. package/cjs/register/register-pyramid3d.js +1 -0
  94. package/cjs/register/register-pyramid3d.js.map +1 -1
  95. package/cjs/render/contributions/rough/base-render.d.ts +5 -0
  96. package/cjs/render/contributions/rough/base-render.js +14 -0
  97. package/cjs/render/contributions/rough/base-render.js.map +1 -0
  98. package/cjs/render/contributions/rough/rough-arc.d.ts +3 -3
  99. package/cjs/render/contributions/rough/rough-arc.js +4 -6
  100. package/cjs/render/contributions/rough/rough-arc.js.map +1 -1
  101. package/cjs/render/contributions/rough/rough-circle.d.ts +3 -3
  102. package/cjs/render/contributions/rough/rough-circle.js +3 -6
  103. package/cjs/render/contributions/rough/rough-circle.js.map +1 -1
  104. package/cjs/render/contributions/rough/rough-path.d.ts +3 -3
  105. package/cjs/render/contributions/rough/rough-path.js +3 -6
  106. package/cjs/render/contributions/rough/rough-path.js.map +1 -1
  107. package/cjs/render/contributions/rough/rough-rect.d.ts +3 -3
  108. package/cjs/render/contributions/rough/rough-rect.js +3 -6
  109. package/cjs/render/contributions/rough/rough-rect.js.map +1 -1
  110. package/dist/index.es.js +156 -784
  111. package/es/canvas/contributions/browser/context.js +2 -2
  112. package/es/canvas/contributions/browser/context.js.map +1 -1
  113. package/es/canvas/contributions/harmony/context.js +3 -1
  114. package/es/canvas/contributions/harmony/context.js.map +1 -1
  115. package/es/canvas/contributions/taro/context.js +3 -1
  116. package/es/canvas/contributions/taro/context.js.map +1 -1
  117. package/es/picker/contributions/canvas-picker/arc-picker.d.ts +3 -4
  118. package/es/picker/contributions/canvas-picker/arc-picker.js +5 -24
  119. package/es/picker/contributions/canvas-picker/arc-picker.js.map +1 -1
  120. package/es/picker/contributions/canvas-picker/arc3d-picker.d.ts +4 -5
  121. package/es/picker/contributions/canvas-picker/arc3d-picker.js +5 -24
  122. package/es/picker/contributions/canvas-picker/arc3d-picker.js.map +1 -1
  123. package/es/picker/contributions/canvas-picker/area-picker.d.ts +3 -4
  124. package/es/picker/contributions/canvas-picker/area-picker.js +5 -25
  125. package/es/picker/contributions/canvas-picker/area-picker.js.map +1 -1
  126. package/es/picker/contributions/canvas-picker/circle-picker.d.ts +3 -4
  127. package/es/picker/contributions/canvas-picker/circle-picker.js +5 -23
  128. package/es/picker/contributions/canvas-picker/circle-picker.js.map +1 -1
  129. package/es/picker/contributions/canvas-picker/glyph-picker.d.ts +3 -6
  130. package/es/picker/contributions/canvas-picker/glyph-picker.js +5 -19
  131. package/es/picker/contributions/canvas-picker/glyph-picker.js.map +1 -1
  132. package/es/picker/contributions/canvas-picker/line-picker.d.ts +3 -5
  133. package/es/picker/contributions/canvas-picker/line-picker.js +3 -29
  134. package/es/picker/contributions/canvas-picker/line-picker.js.map +1 -1
  135. package/es/picker/contributions/canvas-picker/path-picker.d.ts +3 -5
  136. package/es/picker/contributions/canvas-picker/path-picker.js +3 -30
  137. package/es/picker/contributions/canvas-picker/path-picker.js.map +1 -1
  138. package/es/picker/contributions/canvas-picker/polygon-picker.d.ts +3 -4
  139. package/es/picker/contributions/canvas-picker/polygon-picker.js +5 -23
  140. package/es/picker/contributions/canvas-picker/polygon-picker.js.map +1 -1
  141. package/es/picker/contributions/canvas-picker/pyramid3d-picker.d.ts +4 -5
  142. package/es/picker/contributions/canvas-picker/pyramid3d-picker.js +5 -25
  143. package/es/picker/contributions/canvas-picker/pyramid3d-picker.js.map +1 -1
  144. package/es/picker/contributions/canvas-picker/rect-picker.d.ts +3 -6
  145. package/es/picker/contributions/canvas-picker/rect-picker.js +4 -37
  146. package/es/picker/contributions/canvas-picker/rect-picker.js.map +1 -1
  147. package/es/picker/contributions/canvas-picker/rect3d-picker.d.ts +4 -5
  148. package/es/picker/contributions/canvas-picker/rect3d-picker.js +5 -28
  149. package/es/picker/contributions/canvas-picker/rect3d-picker.js.map +1 -1
  150. package/es/picker/contributions/canvas-picker/symbol-picker.d.ts +2 -2
  151. package/es/picker/contributions/canvas-picker/symbol-picker.js +2 -2
  152. package/es/picker/contributions/canvas-picker/symbol-picker.js.map +1 -1
  153. package/es/picker/contributions/canvas-picker/text-picker.d.ts +2 -2
  154. package/es/picker/contributions/canvas-picker/text-picker.js +2 -2
  155. package/es/picker/contributions/canvas-picker/text-picker.js.map +1 -1
  156. package/es/picker/contributions/common/base-3d-picker.d.ts +8 -0
  157. package/es/picker/contributions/common/base-3d-picker.js +26 -0
  158. package/es/picker/contributions/common/base-3d-picker.js.map +1 -0
  159. package/es/picker/contributions/common/base-line-picker.d.ts +7 -0
  160. package/es/picker/contributions/common/base-line-picker.js +31 -0
  161. package/es/picker/contributions/common/base-line-picker.js.map +1 -0
  162. package/es/picker/contributions/common/base.d.ts +6 -0
  163. package/es/picker/contributions/common/base.js +26 -0
  164. package/es/picker/contributions/common/base.js.map +1 -0
  165. package/es/picker/contributions/common/glyph-picker-base.d.ts +7 -0
  166. package/es/picker/contributions/common/glyph-picker-base.js +24 -0
  167. package/es/picker/contributions/common/glyph-picker-base.js.map +1 -0
  168. package/es/picker/contributions/common/picker-utils.d.ts +3 -0
  169. package/es/picker/contributions/common/picker-utils.js +8 -0
  170. package/es/picker/contributions/common/picker-utils.js.map +1 -0
  171. package/es/picker/contributions/common/rect-picker-base.d.ts +8 -0
  172. package/es/picker/contributions/common/rect-picker-base.js +43 -0
  173. package/es/picker/contributions/common/rect-picker-base.js.map +1 -0
  174. package/es/picker/contributions/math-picker/arc-picker.d.ts +3 -4
  175. package/es/picker/contributions/math-picker/arc-picker.js +5 -24
  176. package/es/picker/contributions/math-picker/arc-picker.js.map +1 -1
  177. package/es/picker/contributions/math-picker/area-picker.d.ts +3 -4
  178. package/es/picker/contributions/math-picker/area-picker.js +5 -18
  179. package/es/picker/contributions/math-picker/area-picker.js.map +1 -1
  180. package/es/picker/contributions/math-picker/circle-picker.d.ts +3 -4
  181. package/es/picker/contributions/math-picker/circle-picker.js +5 -23
  182. package/es/picker/contributions/math-picker/circle-picker.js.map +1 -1
  183. package/es/picker/contributions/math-picker/glyph-picker.d.ts +3 -6
  184. package/es/picker/contributions/math-picker/glyph-picker.js +5 -17
  185. package/es/picker/contributions/math-picker/glyph-picker.js.map +1 -1
  186. package/es/picker/contributions/math-picker/line-picker.d.ts +3 -4
  187. package/es/picker/contributions/math-picker/line-picker.js +5 -23
  188. package/es/picker/contributions/math-picker/line-picker.js.map +1 -1
  189. package/es/picker/contributions/math-picker/path-picker.d.ts +3 -4
  190. package/es/picker/contributions/math-picker/path-picker.js +5 -23
  191. package/es/picker/contributions/math-picker/path-picker.js.map +1 -1
  192. package/es/picker/contributions/math-picker/polygon-picker.d.ts +3 -4
  193. package/es/picker/contributions/math-picker/polygon-picker.js +5 -22
  194. package/es/picker/contributions/math-picker/polygon-picker.js.map +1 -1
  195. package/es/picker/contributions/math-picker/rect-picker.d.ts +3 -6
  196. package/es/picker/contributions/math-picker/rect-picker.js +4 -37
  197. package/es/picker/contributions/math-picker/rect-picker.js.map +1 -1
  198. package/es/picker/contributions/math-picker/symbol-picker.d.ts +3 -4
  199. package/es/picker/contributions/math-picker/symbol-picker.js +5 -23
  200. package/es/picker/contributions/math-picker/symbol-picker.js.map +1 -1
  201. package/es/register/register-arc3d.js +3 -2
  202. package/es/register/register-arc3d.js.map +1 -1
  203. package/es/register/register-pyramid3d.js +3 -2
  204. package/es/register/register-pyramid3d.js.map +1 -1
  205. package/es/render/contributions/rough/base-render.d.ts +5 -0
  206. package/es/render/contributions/rough/base-render.js +6 -0
  207. package/es/render/contributions/rough/base-render.js.map +1 -0
  208. package/es/render/contributions/rough/rough-arc.d.ts +3 -3
  209. package/es/render/contributions/rough/rough-arc.js +5 -5
  210. package/es/render/contributions/rough/rough-arc.js.map +1 -1
  211. package/es/render/contributions/rough/rough-circle.d.ts +3 -3
  212. package/es/render/contributions/rough/rough-circle.js +4 -5
  213. package/es/render/contributions/rough/rough-circle.js.map +1 -1
  214. package/es/render/contributions/rough/rough-path.d.ts +3 -3
  215. package/es/render/contributions/rough/rough-path.js +4 -5
  216. package/es/render/contributions/rough/rough-path.js.map +1 -1
  217. package/es/render/contributions/rough/rough-rect.d.ts +3 -3
  218. package/es/render/contributions/rough/rough-rect.js +4 -5
  219. package/es/render/contributions/rough/rough-rect.js.map +1 -1
  220. package/package.json +3 -3
  221. package/cjs/picker/contributions/canvas-picker/base-picker.d.ts +0 -4
  222. package/cjs/picker/contributions/canvas-picker/base-picker.js +0 -18
  223. package/cjs/picker/contributions/canvas-picker/base-picker.js.map +0 -1
  224. package/es/picker/contributions/canvas-picker/base-picker.d.ts +0 -4
  225. package/es/picker/contributions/canvas-picker/base-picker.js +0 -14
  226. package/es/picker/contributions/canvas-picker/base-picker.js.map +0 -1
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { injectable, inject, DefaultCanvasArcRender, ARC_NUMBER_TYPE, getTheme, CustomPath2D, drawArcPath, DefaultCanvasAreaRender, drawAreaSegments, DefaultCanvasCircleRender, CIRCLE_NUMBER_TYPE, DefaultCanvasLineRender, drawSegments, DefaultCanvasPathRender, PATH_NUMBER_TYPE, DefaultCanvasRectRender, RECT_NUMBER_TYPE, DefaultCanvasSymbolRender, BaseRender, SYMBOL_NUMBER_TYPE, ContainerModule, GraphicRender, graphicCreator, Group, clock, application, WILDCARD, DefaultFillStyle, DefaultStrokeStyle, DefaultTextStyle, matrixAllocate, transformMat4, createColor, getScaledStroke, getContextFont, createConicalGradient, BaseCanvas, CanvasFactory, Context2dFactory, ContributionProvider, named, DrawContribution, PickItemInterceptor, DefaultPickService, canvasAllocate, GROUP_NUMBER_TYPE, bindContributionProvider, PickerService, WindowHandlerContribution, BaseWindowHandlerContribution, BaseEnvContribution, Generator, EnvContribution, container, VGlobal, EmptyContext2d, ArcRender, AreaRender, AREA_NUMBER_TYPE, CircleRender, GlyphRender, GLYPH_NUMBER_TYPE, IMAGE_NUMBER_TYPE, LineRender, LINE_NUMBER_TYPE, PolygonRender, POLYGON_NUMBER_TYPE, PathRender, RectRender, SymbolRender, TEXT_NUMBER_TYPE, rafBasedSto, vglobal, RafBasedSTO, mat4Allocate, TextRender, textLayoutOffsetY, textDrawOffsetX, RichTextRender, RICHTEXT_NUMBER_TYPE, Rect3DRender, RECT3D_NUMBER_TYPE, Arc3dRender, ARC3D_NUMBER_TYPE, Pyramid3dRender, PYRAMID3D_NUMBER_TYPE, isBrowserEnv, registerArcGraphic, arcModule, registerArc3dGraphic, arc3dModule, registerAreaGraphic, areaModule, registerCircleGraphic, circleModule, registerGlyphGraphic, glyphModule, registerGroupGraphic, registerImageGraphic, imageModule, registerLineGraphic, lineModule, registerPathGraphic, pathModule, registerPolygonGraphic, polygonModule, registerPyramid3dGraphic, pyramid3dModule, registerRectGraphic, rectModule, registerRect3dGraphic, rect3dModule, registerRichtextGraphic, richtextModule, registerShadowRootGraphic, registerSymbolGraphic, symbolModule, registerTextGraphic, textModule, registerWrapTextGraphic } from '@visactor/vrender-core';
2
- import { isString, isArray, EventEmitter, Matrix, Logger, pi2, pi, AABBBounds, isValidNumber, isNumber, isFunction } from '@visactor/vutils';
1
+ import { injectable, inject, DefaultCanvasArcRender, ARC_NUMBER_TYPE, getTheme, CustomPath2D, drawArcPath, DefaultCanvasAreaRender, drawAreaSegments, DefaultCanvasCircleRender, CIRCLE_NUMBER_TYPE, DefaultCanvasLineRender, drawSegments, DefaultCanvasPathRender, PATH_NUMBER_TYPE, DefaultCanvasRectRender, RECT_NUMBER_TYPE, DefaultCanvasSymbolRender, BaseRender, SYMBOL_NUMBER_TYPE, ContainerModule, GraphicRender, graphicCreator, Group, clock, application, WILDCARD, DefaultFillStyle, DefaultStrokeStyle, DefaultTextStyle, matrixAllocate, transformMat4, createColor, getScaledStroke, createConicalGradient, BaseCanvas, CanvasFactory, Context2dFactory, ContributionProvider, named, DrawContribution, PickItemInterceptor, DefaultPickService, canvasAllocate, GROUP_NUMBER_TYPE, bindContributionProvider, PickerService, WindowHandlerContribution, BaseWindowHandlerContribution, BaseEnvContribution, Generator, EnvContribution, container, VGlobal, EmptyContext2d, ArcRender, AreaRender, AREA_NUMBER_TYPE, CircleRender, GLYPH_NUMBER_TYPE, GlyphRender, IMAGE_NUMBER_TYPE, LineRender, LINE_NUMBER_TYPE, PolygonRender, POLYGON_NUMBER_TYPE, PathRender, RectRender, SymbolRender, TEXT_NUMBER_TYPE, rafBasedSto, vglobal, RafBasedSTO, mat4Allocate, TextRender, textLayoutOffsetY, textDrawOffsetX, RichTextRender, RICHTEXT_NUMBER_TYPE, Rect3DRender, RECT3D_NUMBER_TYPE, Arc3dRender, ARC3D_NUMBER_TYPE, Pyramid3dRender, PYRAMID3D_NUMBER_TYPE, isBrowserEnv, registerArcGraphic, arcModule, registerArc3dGraphic, registerDirectionalLight, registerOrthoCamera, arc3dModule, registerAreaGraphic, areaModule, registerCircleGraphic, circleModule, registerGlyphGraphic, glyphModule, registerGroupGraphic, registerImageGraphic, imageModule, registerLineGraphic, lineModule, registerPathGraphic, pathModule, registerPolygonGraphic, polygonModule, registerPyramid3dGraphic, pyramid3dModule, registerRectGraphic, rectModule, registerRect3dGraphic, rect3dModule, registerRichtextGraphic, richtextModule, registerShadowRootGraphic, registerSymbolGraphic, symbolModule, registerTextGraphic, textModule, registerWrapTextGraphic } from '@visactor/vrender-core';
2
+ import { isString, isArray, EventEmitter, Matrix, Logger, getContextFont, pi2, pi, AABBBounds, isValidNumber, isNumber, isFunction } from '@visactor/vutils';
3
3
 
4
4
  /******************************************************************************
5
5
  Copyright (c) Microsoft Corporation.
@@ -1546,8 +1546,17 @@ const defaultRouthThemeSpec = {
1546
1546
  fixedDecimalPlaceDigits: undefined
1547
1547
  };
1548
1548
 
1549
- let RoughCanvasArcRender = class RoughCanvasArcRender {
1549
+ class RoughBaseRender {
1550
+ drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb) {
1551
+ if (this.canvasRenderer.drawShape) {
1552
+ return this.canvasRenderer.drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb);
1553
+ }
1554
+ }
1555
+ }
1556
+
1557
+ let RoughCanvasArcRender = class RoughCanvasArcRender extends RoughBaseRender {
1550
1558
  constructor(canvasRenderer) {
1559
+ super();
1551
1560
  this.canvasRenderer = canvasRenderer;
1552
1561
  this.style = 'rough';
1553
1562
  this.type = 'arc';
@@ -1605,11 +1614,6 @@ let RoughCanvasArcRender = class RoughCanvasArcRender {
1605
1614
  });
1606
1615
  context.highPerformanceRestore();
1607
1616
  }
1608
- drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb) {
1609
- if (this.canvasRenderer.drawShape) {
1610
- return this.canvasRenderer.drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb);
1611
- }
1612
- }
1613
1617
  };
1614
1618
  RoughCanvasArcRender = __decorate([
1615
1619
  injectable(),
@@ -1681,8 +1685,9 @@ RoughCanvasAreaRender = __decorate([
1681
1685
  injectable()
1682
1686
  ], RoughCanvasAreaRender);
1683
1687
 
1684
- let RoughCanvasCircleRender = class RoughCanvasCircleRender {
1688
+ let RoughCanvasCircleRender = class RoughCanvasCircleRender extends RoughBaseRender {
1685
1689
  constructor(canvasRenderer) {
1690
+ super();
1686
1691
  this.canvasRenderer = canvasRenderer;
1687
1692
  this.style = 'rough';
1688
1693
  this.type = 'circle';
@@ -1714,11 +1719,6 @@ let RoughCanvasCircleRender = class RoughCanvasCircleRender {
1714
1719
  roughness: 0.5
1715
1720
  });
1716
1721
  }
1717
- drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb) {
1718
- if (this.canvasRenderer.drawShape) {
1719
- return this.canvasRenderer.drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb);
1720
- }
1721
- }
1722
1722
  };
1723
1723
  RoughCanvasCircleRender = __decorate([
1724
1724
  injectable(),
@@ -1791,8 +1791,9 @@ RoughCanvasLineRender = __decorate([
1791
1791
  injectable()
1792
1792
  ], RoughCanvasLineRender);
1793
1793
 
1794
- let RoughCanvasPathRender = class RoughCanvasPathRender {
1794
+ let RoughCanvasPathRender = class RoughCanvasPathRender extends RoughBaseRender {
1795
1795
  constructor(canvasRenderer) {
1796
+ super();
1796
1797
  this.canvasRenderer = canvasRenderer;
1797
1798
  this.style = 'rough';
1798
1799
  this.type = 'path';
@@ -1839,11 +1840,6 @@ let RoughCanvasPathRender = class RoughCanvasPathRender {
1839
1840
  }
1840
1841
  context.highPerformanceRestore();
1841
1842
  }
1842
- drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb) {
1843
- if (this.canvasRenderer.drawShape) {
1844
- return this.canvasRenderer.drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb);
1845
- }
1846
- }
1847
1843
  };
1848
1844
  RoughCanvasPathRender = __decorate([
1849
1845
  injectable(),
@@ -1851,8 +1847,9 @@ RoughCanvasPathRender = __decorate([
1851
1847
  __metadata("design:paramtypes", [Object])
1852
1848
  ], RoughCanvasPathRender);
1853
1849
 
1854
- let RoughCanvasRectRender = class RoughCanvasRectRender {
1850
+ let RoughCanvasRectRender = class RoughCanvasRectRender extends RoughBaseRender {
1855
1851
  constructor(canvasRenderer) {
1852
+ super();
1856
1853
  this.canvasRenderer = canvasRenderer;
1857
1854
  this.style = 'rough';
1858
1855
  this.type = 'rect';
@@ -1911,11 +1908,6 @@ let RoughCanvasRectRender = class RoughCanvasRectRender {
1911
1908
  });
1912
1909
  context.highPerformanceRestore();
1913
1910
  }
1914
- drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb) {
1915
- if (this.canvasRenderer.drawShape) {
1916
- return this.canvasRenderer.drawShape(graphic, ctx, x, y, drawContext, params, fillCb, strokeCb);
1917
- }
1918
- }
1919
1911
  };
1920
1912
  RoughCanvasRectRender = __decorate([
1921
1913
  injectable(),
@@ -4558,39 +4550,34 @@ const m = new ContainerModule(bind => {
4558
4550
  });
4559
4551
  m.__vloaded = false;
4560
4552
 
4561
- let DefaultMathArcPicker = class DefaultMathArcPicker {
4562
- constructor(canvasRenderer) {
4563
- this.canvasRenderer = canvasRenderer;
4564
- this.type = 'arc';
4565
- this.numberType = ARC_NUMBER_TYPE;
4566
- }
4567
- contains(arc, point, params) {
4568
- if (!arc.AABBBounds.containsPoint(point)) {
4553
+ class PickerBase {
4554
+ contains(graphic, point, params) {
4555
+ if (!graphic.AABBBounds.containsPoint(point)) {
4569
4556
  return false;
4570
4557
  }
4571
- if (arc.attribute.pickMode === 'imprecise') {
4558
+ if (graphic.attribute.pickMode === 'imprecise') {
4572
4559
  return true;
4573
4560
  }
4574
4561
  const { pickContext } = params !== null && params !== void 0 ? params : {};
4575
4562
  if (!pickContext) {
4576
4563
  return false;
4577
4564
  }
4578
- const arcAttribute = getTheme(arc).arc;
4565
+ const attribute = getTheme(graphic)[graphic.type];
4579
4566
  pickContext.highPerformanceSave();
4580
- let { x = arcAttribute.x, y = arcAttribute.y } = arc.attribute;
4581
- if (!arc.transMatrix.onlyTranslate()) {
4567
+ let { x = attribute.x, y = attribute.y } = graphic.attribute;
4568
+ if (!graphic.transMatrix.onlyTranslate()) {
4582
4569
  x = 0;
4583
4570
  y = 0;
4584
- pickContext.transformFromMatrix(arc.transMatrix, true);
4571
+ pickContext.transformFromMatrix(graphic.transMatrix, true);
4585
4572
  }
4586
4573
  else {
4587
- const point = arc.getOffsetXY(arcAttribute);
4574
+ const point = graphic.getOffsetXY(attribute);
4588
4575
  x += point.x;
4589
4576
  y += point.y;
4590
4577
  pickContext.setTransformForCurrent();
4591
4578
  }
4592
4579
  let picked = false;
4593
- this.canvasRenderer.drawShape(arc, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => {
4580
+ this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => {
4594
4581
  if (picked) {
4595
4582
  return true;
4596
4583
  }
@@ -4602,13 +4589,22 @@ let DefaultMathArcPicker = class DefaultMathArcPicker {
4602
4589
  }
4603
4590
  const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth;
4604
4591
  const pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
4605
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
4592
+ pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
4606
4593
  picked = context.isPointInStroke(point.x, point.y);
4607
4594
  return picked;
4608
4595
  });
4609
4596
  pickContext.highPerformanceRestore();
4610
4597
  return picked;
4611
4598
  }
4599
+ }
4600
+
4601
+ let DefaultMathArcPicker = class DefaultMathArcPicker extends PickerBase {
4602
+ constructor(canvasRenderer) {
4603
+ super();
4604
+ this.canvasRenderer = canvasRenderer;
4605
+ this.type = 'arc';
4606
+ this.numberType = ARC_NUMBER_TYPE;
4607
+ }
4612
4608
  };
4613
4609
  DefaultMathArcPicker = __decorate([
4614
4610
  injectable(),
@@ -4626,48 +4622,13 @@ const arcMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) =>
4626
4622
  bind(MathPickerContribution).toService(MathArcPicker);
4627
4623
  });
4628
4624
 
4629
- let DefaultMathAreaPicker = class DefaultMathAreaPicker {
4625
+ let DefaultMathAreaPicker = class DefaultMathAreaPicker extends PickerBase {
4630
4626
  constructor(canvasRenderer) {
4627
+ super();
4631
4628
  this.canvasRenderer = canvasRenderer;
4632
4629
  this.type = 'area';
4633
4630
  this.numberType = AREA_NUMBER_TYPE;
4634
4631
  }
4635
- contains(area, point, params) {
4636
- if (!area.AABBBounds.containsPoint(point)) {
4637
- return false;
4638
- }
4639
- if (area.attribute.pickMode === 'imprecise') {
4640
- return true;
4641
- }
4642
- const { pickContext } = params !== null && params !== void 0 ? params : {};
4643
- if (!pickContext) {
4644
- return false;
4645
- }
4646
- const areaAttribute = getTheme(area).area;
4647
- let { x = areaAttribute.x, y = areaAttribute.y } = area.attribute;
4648
- pickContext.highPerformanceSave();
4649
- if (!area.transMatrix.onlyTranslate()) {
4650
- x = 0;
4651
- y = 0;
4652
- pickContext.transformFromMatrix(area.transMatrix, true);
4653
- }
4654
- else {
4655
- const point = area.getOffsetXY(areaAttribute);
4656
- x += point.x;
4657
- y += point.y;
4658
- pickContext.setTransformForCurrent();
4659
- }
4660
- let picked = false;
4661
- this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, context => {
4662
- if (picked) {
4663
- return true;
4664
- }
4665
- picked = context.isPointInPath(point.x, point.y);
4666
- return picked;
4667
- });
4668
- pickContext.highPerformanceRestore();
4669
- return picked;
4670
- }
4671
4632
  };
4672
4633
  DefaultMathAreaPicker = __decorate([
4673
4634
  injectable(),
@@ -4685,57 +4646,13 @@ const areaMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) =
4685
4646
  bind(MathPickerContribution).toService(MathAreaPicker);
4686
4647
  });
4687
4648
 
4688
- let DefaultMathCirclePicker = class DefaultMathCirclePicker {
4649
+ let DefaultMathCirclePicker = class DefaultMathCirclePicker extends PickerBase {
4689
4650
  constructor(canvasRenderer) {
4651
+ super();
4690
4652
  this.canvasRenderer = canvasRenderer;
4691
4653
  this.type = 'circle';
4692
4654
  this.numberType = CIRCLE_NUMBER_TYPE;
4693
4655
  }
4694
- contains(circle, point, params) {
4695
- if (!circle.AABBBounds.containsPoint(point)) {
4696
- return false;
4697
- }
4698
- if (circle.attribute.pickMode === 'imprecise') {
4699
- return true;
4700
- }
4701
- const { pickContext } = params !== null && params !== void 0 ? params : {};
4702
- if (!pickContext) {
4703
- return false;
4704
- }
4705
- const circleAttribute = getTheme(circle).circle;
4706
- let { x = circleAttribute.x, y = circleAttribute.y } = circle.attribute;
4707
- pickContext.highPerformanceSave();
4708
- if (!circle.transMatrix.onlyTranslate()) {
4709
- x = 0;
4710
- y = 0;
4711
- pickContext.transformFromMatrix(circle.transMatrix, true);
4712
- }
4713
- else {
4714
- const point = circle.getOffsetXY(circleAttribute);
4715
- x += point.x;
4716
- y += point.y;
4717
- pickContext.setTransformForCurrent();
4718
- }
4719
- let picked = false;
4720
- this.canvasRenderer.drawShape(circle, pickContext, x, y, {}, null, (context, circleAttribute, themeAttribute) => {
4721
- if (picked) {
4722
- return true;
4723
- }
4724
- picked = context.isPointInPath(point.x, point.y);
4725
- return picked;
4726
- }, (context, circleAttribute, themeAttribute) => {
4727
- if (picked) {
4728
- return true;
4729
- }
4730
- const lineWidth = circleAttribute.lineWidth || themeAttribute.lineWidth;
4731
- const pickStrokeBuffer = circleAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
4732
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
4733
- picked = context.isPointInStroke(point.x, point.y);
4734
- return picked;
4735
- });
4736
- pickContext.highPerformanceRestore();
4737
- return picked;
4738
- }
4739
4656
  };
4740
4657
  DefaultMathCirclePicker = __decorate([
4741
4658
  injectable(),
@@ -4753,9 +4670,8 @@ const circleMathPickModule = new ContainerModule((bind, unbind, isBound, rebind)
4753
4670
  bind(MathPickerContribution).toService(MathCirclePicker);
4754
4671
  });
4755
4672
 
4756
- let DefaultMathGlyphPicker = class DefaultMathGlyphPicker {
4757
- constructor(canvasRenderer) {
4758
- this.canvasRenderer = canvasRenderer;
4673
+ class GlyphPickerBase {
4674
+ constructor() {
4759
4675
  this.type = 'glyph';
4760
4676
  this.numberType = GLYPH_NUMBER_TYPE;
4761
4677
  }
@@ -4777,12 +4693,20 @@ let DefaultMathGlyphPicker = class DefaultMathGlyphPicker {
4777
4693
  if (picked) {
4778
4694
  return;
4779
4695
  }
4780
- picked = !!pickerService.pickItem(g, point, null, params);
4696
+ const data = pickerService.pickItem(g, point, null, params);
4697
+ picked = !!(data && data.graphic);
4781
4698
  });
4782
4699
  return picked;
4783
4700
  }
4784
4701
  return false;
4785
4702
  }
4703
+ }
4704
+
4705
+ let DefaultMathGlyphPicker = class DefaultMathGlyphPicker extends GlyphPickerBase {
4706
+ constructor(canvasRenderer) {
4707
+ super();
4708
+ this.canvasRenderer = canvasRenderer;
4709
+ }
4786
4710
  };
4787
4711
  DefaultMathGlyphPicker = __decorate([
4788
4712
  injectable(),
@@ -4830,57 +4754,13 @@ const imageMathPickModule = new ContainerModule((bind, unbind, isBound, rebind)
4830
4754
  bind(DefaultMathImagePicker).toService(MathImagePicker);
4831
4755
  });
4832
4756
 
4833
- let DefaultMathLinePicker = class DefaultMathLinePicker {
4757
+ let DefaultMathLinePicker = class DefaultMathLinePicker extends PickerBase {
4834
4758
  constructor(canvasRenderer) {
4759
+ super();
4835
4760
  this.canvasRenderer = canvasRenderer;
4836
4761
  this.type = 'line';
4837
4762
  this.numberType = LINE_NUMBER_TYPE;
4838
4763
  }
4839
- contains(line, point, params) {
4840
- if (!line.AABBBounds.containsPoint(point)) {
4841
- return false;
4842
- }
4843
- if (line.attribute.pickMode === 'imprecise') {
4844
- return true;
4845
- }
4846
- const { pickContext } = params !== null && params !== void 0 ? params : {};
4847
- if (!pickContext) {
4848
- return false;
4849
- }
4850
- const lineAttribute = getTheme(line).line;
4851
- let { x = lineAttribute.x, y = lineAttribute.y } = line.attribute;
4852
- pickContext.highPerformanceSave();
4853
- if (!line.transMatrix.onlyTranslate()) {
4854
- x = 0;
4855
- y = 0;
4856
- pickContext.transformFromMatrix(line.transMatrix, true);
4857
- }
4858
- else {
4859
- const point = line.getOffsetXY(lineAttribute);
4860
- x += point.x;
4861
- y += point.y;
4862
- pickContext.setTransformForCurrent();
4863
- }
4864
- let picked = false;
4865
- this.canvasRenderer.drawShape(line, pickContext, x, y, {}, null, context => {
4866
- if (picked) {
4867
- return true;
4868
- }
4869
- picked = context.isPointInPath(point.x, point.y);
4870
- return picked;
4871
- }, (context, circleAttribute, themeAttribute) => {
4872
- if (picked) {
4873
- return true;
4874
- }
4875
- const lineWidth = circleAttribute.lineWidth || themeAttribute.lineWidth;
4876
- const pickStrokeBuffer = circleAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
4877
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
4878
- picked = context.isPointInStroke(point.x, point.y);
4879
- return picked;
4880
- });
4881
- pickContext.highPerformanceRestore();
4882
- return picked;
4883
- }
4884
4764
  };
4885
4765
  DefaultMathLinePicker = __decorate([
4886
4766
  injectable(),
@@ -4898,54 +4778,13 @@ const lineMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) =
4898
4778
  bind(MathPickerContribution).toService(MathLinePicker);
4899
4779
  });
4900
4780
 
4901
- let DefaultMathPolygonPicker = class DefaultMathPolygonPicker {
4781
+ let DefaultMathPolygonPicker = class DefaultMathPolygonPicker extends PickerBase {
4902
4782
  constructor(canvasRenderer) {
4783
+ super();
4903
4784
  this.canvasRenderer = canvasRenderer;
4904
4785
  this.type = 'polygon';
4905
4786
  this.numberType = POLYGON_NUMBER_TYPE;
4906
4787
  }
4907
- contains(polygon, point, params) {
4908
- if (!polygon.AABBBounds.contains(point.x, point.y)) {
4909
- return false;
4910
- }
4911
- const { pickContext } = params !== null && params !== void 0 ? params : {};
4912
- if (!pickContext) {
4913
- return false;
4914
- }
4915
- const pathAttribute = getTheme(polygon).polygon;
4916
- let { x = pathAttribute.x, y = pathAttribute.y } = polygon.attribute;
4917
- pickContext.highPerformanceSave();
4918
- if (!polygon.transMatrix.onlyTranslate()) {
4919
- x = 0;
4920
- y = 0;
4921
- pickContext.transformFromMatrix(polygon.transMatrix, true);
4922
- }
4923
- else {
4924
- const point = polygon.getOffsetXY(pathAttribute);
4925
- x += point.x;
4926
- y += point.y;
4927
- pickContext.setTransformForCurrent();
4928
- }
4929
- let picked = false;
4930
- this.canvasRenderer.drawShape(polygon, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => {
4931
- if (picked) {
4932
- return true;
4933
- }
4934
- picked = context.isPointInPath(point.x, point.y);
4935
- return picked;
4936
- }, (context, pathAttribute, themeAttribute) => {
4937
- if (picked) {
4938
- return true;
4939
- }
4940
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth;
4941
- const pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
4942
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
4943
- picked = context.isPointInStroke(point.x, point.y);
4944
- return picked;
4945
- });
4946
- pickContext.highPerformanceRestore();
4947
- return picked;
4948
- }
4949
4788
  };
4950
4789
  DefaultMathPolygonPicker = __decorate([
4951
4790
  injectable(),
@@ -4963,57 +4802,13 @@ const polygonMathPickModule = new ContainerModule((bind, unbind, isBound, rebind
4963
4802
  bind(MathPickerContribution).toService(MathPolygonPicker);
4964
4803
  });
4965
4804
 
4966
- let DefaultMathPathPicker = class DefaultMathPathPicker {
4805
+ let DefaultMathPathPicker = class DefaultMathPathPicker extends PickerBase {
4967
4806
  constructor(canvasRenderer) {
4807
+ super();
4968
4808
  this.canvasRenderer = canvasRenderer;
4969
4809
  this.type = 'path';
4970
4810
  this.numberType = PATH_NUMBER_TYPE;
4971
4811
  }
4972
- contains(path, point, params) {
4973
- if (!path.AABBBounds.containsPoint(point)) {
4974
- return false;
4975
- }
4976
- if (path.attribute.pickMode === 'imprecise') {
4977
- return true;
4978
- }
4979
- const { pickContext } = params !== null && params !== void 0 ? params : {};
4980
- if (!pickContext) {
4981
- return false;
4982
- }
4983
- const pathAttribute = getTheme(path).path;
4984
- let { x = pathAttribute.x, y = pathAttribute.y } = path.attribute;
4985
- pickContext.highPerformanceSave();
4986
- if (!path.transMatrix.onlyTranslate()) {
4987
- x = 0;
4988
- y = 0;
4989
- pickContext.transformFromMatrix(path.transMatrix, true);
4990
- }
4991
- else {
4992
- const point = path.getOffsetXY(pathAttribute);
4993
- x += point.x;
4994
- y += point.y;
4995
- pickContext.setTransformForCurrent();
4996
- }
4997
- let picked = false;
4998
- this.canvasRenderer.drawShape(path, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => {
4999
- if (picked) {
5000
- return true;
5001
- }
5002
- picked = context.isPointInPath(point.x, point.y);
5003
- return picked;
5004
- }, (context, pathAttribute, themeAttribute) => {
5005
- if (picked) {
5006
- return true;
5007
- }
5008
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth;
5009
- const pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
5010
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
5011
- picked = context.isPointInStroke(point.x, point.y);
5012
- return picked;
5013
- });
5014
- pickContext.highPerformanceRestore();
5015
- return picked;
5016
- }
5017
4812
  };
5018
4813
  DefaultMathPathPicker = __decorate([
5019
4814
  injectable(),
@@ -5031,10 +4826,9 @@ const pathMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) =
5031
4826
  bind(MathPickerContribution).toService(MathPathPicker);
5032
4827
  });
5033
4828
 
5034
- const _bounds$1 = new AABBBounds();
5035
- let DefaultMathRectPicker = class DefaultMathRectPicker {
5036
- constructor(canvasRenderer) {
5037
- this.canvasRenderer = canvasRenderer;
4829
+ const _bounds = new AABBBounds();
4830
+ class RectPickerBase {
4831
+ constructor() {
5038
4832
  this.type = 'rect';
5039
4833
  this.numberType = RECT_NUMBER_TYPE;
5040
4834
  }
@@ -5068,6 +4862,7 @@ let DefaultMathRectPicker = class DefaultMathRectPicker {
5068
4862
  }
5069
4863
  let picked = true;
5070
4864
  if (!onlyTranslate ||
4865
+ rect.shadowRoot ||
5071
4866
  (isNumber(cornerRadius, true) && cornerRadius !== 0) ||
5072
4867
  (isArray(cornerRadius) && cornerRadius.some(num => num !== 0))) {
5073
4868
  picked = false;
@@ -5083,26 +4878,33 @@ let DefaultMathRectPicker = class DefaultMathRectPicker {
5083
4878
  }
5084
4879
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth;
5085
4880
  const pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
5086
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
4881
+ pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
5087
4882
  picked = context.isPointInStroke(point.x, point.y);
5088
4883
  return picked;
5089
4884
  });
5090
4885
  }
5091
- else if (picked) {
4886
+ else {
5092
4887
  const { fill = rectAttribute.fill, stroke = rectAttribute.stroke, lineWidth = rectAttribute.lineWidth } = rect.attribute;
5093
4888
  if (fill) {
5094
4889
  picked = true;
5095
4890
  }
5096
4891
  else if (stroke) {
5097
4892
  const bounds = rect.AABBBounds;
5098
- _bounds$1.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2);
5099
- _bounds$1.expand(-lineWidth / 2);
5100
- picked = !_bounds$1.containsPoint(point);
4893
+ _bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2);
4894
+ _bounds.expand(-lineWidth / 2);
4895
+ picked = !_bounds.containsPoint(point);
5101
4896
  }
5102
4897
  }
5103
4898
  pickContext.highPerformanceRestore();
5104
4899
  return picked;
5105
4900
  }
4901
+ }
4902
+
4903
+ let DefaultMathRectPicker = class DefaultMathRectPicker extends RectPickerBase {
4904
+ constructor(canvasRenderer) {
4905
+ super();
4906
+ this.canvasRenderer = canvasRenderer;
4907
+ }
5106
4908
  };
5107
4909
  DefaultMathRectPicker = __decorate([
5108
4910
  injectable(),
@@ -5130,57 +4932,13 @@ const richTextMathPickModule = new ContainerModule((bind, unbind, isBound, rebin
5130
4932
  bind(DefaultMathImagePicker).toService(MathImagePicker);
5131
4933
  });
5132
4934
 
5133
- let DefaultMathSymbolPicker = class DefaultMathSymbolPicker {
4935
+ let DefaultMathSymbolPicker = class DefaultMathSymbolPicker extends PickerBase {
5134
4936
  constructor(canvasRenderer) {
4937
+ super();
5135
4938
  this.canvasRenderer = canvasRenderer;
5136
4939
  this.type = 'symbol';
5137
4940
  this.numberType = SYMBOL_NUMBER_TYPE;
5138
4941
  }
5139
- contains(symbol, point, params) {
5140
- if (!symbol.AABBBounds.containsPoint(point)) {
5141
- return false;
5142
- }
5143
- if (symbol.attribute.pickMode === 'imprecise') {
5144
- return true;
5145
- }
5146
- const { pickContext } = params !== null && params !== void 0 ? params : {};
5147
- if (!pickContext) {
5148
- return false;
5149
- }
5150
- const symbolAttribute = getTheme(symbol).symbol;
5151
- let { x = symbolAttribute.x, y = symbolAttribute.y } = symbol.attribute;
5152
- pickContext.highPerformanceSave();
5153
- if (!symbol.transMatrix.onlyTranslate()) {
5154
- x = 0;
5155
- y = 0;
5156
- pickContext.transformFromMatrix(symbol.transMatrix, true);
5157
- }
5158
- else {
5159
- const point = symbol.getOffsetXY(symbolAttribute);
5160
- x += point.x;
5161
- y += point.y;
5162
- pickContext.setTransformForCurrent();
5163
- }
5164
- let picked = false;
5165
- this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => {
5166
- if (picked) {
5167
- return true;
5168
- }
5169
- picked = context.isPointInPath(point.x, point.y);
5170
- return picked;
5171
- }, (context, symbolAttribute, themeAttribute) => {
5172
- if (picked) {
5173
- return true;
5174
- }
5175
- const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth;
5176
- const pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
5177
- pickContext.lineWidth = lineWidth + pickStrokeBuffer;
5178
- picked = context.isPointInStroke(point.x, point.y);
5179
- return picked;
5180
- });
5181
- pickContext.highPerformanceRestore();
5182
- return picked;
5183
- }
5184
4942
  };
5185
4943
  DefaultMathSymbolPicker = __decorate([
5186
4944
  injectable(),
@@ -7984,57 +7742,13 @@ function initHarmonyEnv() {
7984
7742
  loadHarmonyEnv(container);
7985
7743
  }
7986
7744
 
7987
- let DefaultCanvasArcPicker = class DefaultCanvasArcPicker {
7745
+ let DefaultCanvasArcPicker = class DefaultCanvasArcPicker extends PickerBase {
7988
7746
  constructor(canvasRenderer) {
7747
+ super();
7989
7748
  this.canvasRenderer = canvasRenderer;
7990
7749
  this.type = 'arc';
7991
7750
  this.numberType = ARC_NUMBER_TYPE;
7992
7751
  }
7993
- contains(arc, point, params) {
7994
- if (!arc.AABBBounds.containsPoint(point)) {
7995
- return false;
7996
- }
7997
- if (arc.attribute.pickMode === 'imprecise') {
7998
- return true;
7999
- }
8000
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8001
- if (!pickContext) {
8002
- return false;
8003
- }
8004
- const arcAttribute = getTheme(arc).arc;
8005
- pickContext.highPerformanceSave();
8006
- let { x = arcAttribute.x, y = arcAttribute.y } = arc.attribute;
8007
- if (!arc.transMatrix.onlyTranslate()) {
8008
- x = 0;
8009
- y = 0;
8010
- pickContext.transformFromMatrix(arc.transMatrix, true);
8011
- }
8012
- else {
8013
- const point = arc.getOffsetXY(arcAttribute);
8014
- x += point.x;
8015
- y += point.y;
8016
- pickContext.setTransformForCurrent();
8017
- }
8018
- let picked = false;
8019
- this.canvasRenderer.drawShape(arc, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => {
8020
- if (picked) {
8021
- return true;
8022
- }
8023
- picked = context.isPointInPath(point.x, point.y);
8024
- return picked;
8025
- }, (context, arcAttribute, themeAttribute) => {
8026
- if (picked) {
8027
- return true;
8028
- }
8029
- const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth;
8030
- const pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
8031
- pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
8032
- picked = context.isPointInStroke(point.x, point.y);
8033
- return picked;
8034
- });
8035
- pickContext.highPerformanceRestore();
8036
- return picked;
8037
- }
8038
7752
  };
8039
7753
  DefaultCanvasArcPicker = __decorate([
8040
7754
  injectable(),
@@ -8052,78 +7766,10 @@ const arcCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
8052
7766
  bind(CanvasPickerContribution).toService(CanvasArcPicker);
8053
7767
  });
8054
7768
 
8055
- const _bounds = new AABBBounds();
8056
- let DefaultCanvasRectPicker = class DefaultCanvasRectPicker {
7769
+ let DefaultCanvasRectPicker = class DefaultCanvasRectPicker extends RectPickerBase {
8057
7770
  constructor(canvasRenderer) {
7771
+ super();
8058
7772
  this.canvasRenderer = canvasRenderer;
8059
- this.type = 'rect';
8060
- this.numberType = RECT_NUMBER_TYPE;
8061
- }
8062
- contains(rect, point, params) {
8063
- if (!rect.AABBBounds.containsPoint(point)) {
8064
- return false;
8065
- }
8066
- if (rect.attribute.pickMode === 'imprecise') {
8067
- return true;
8068
- }
8069
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8070
- if (!pickContext) {
8071
- return false;
8072
- }
8073
- const rectAttribute = getTheme(rect).rect;
8074
- const { cornerRadius = rectAttribute.cornerRadius } = rect.attribute;
8075
- let { x = rectAttribute.x, y = rectAttribute.y } = rect.attribute;
8076
- pickContext.highPerformanceSave();
8077
- let onlyTranslate = true;
8078
- if (!rect.transMatrix.onlyTranslate()) {
8079
- x = 0;
8080
- y = 0;
8081
- onlyTranslate = false;
8082
- pickContext.transformFromMatrix(rect.transMatrix, true);
8083
- }
8084
- else {
8085
- const point = rect.getOffsetXY(rectAttribute);
8086
- x += point.x;
8087
- y += point.y;
8088
- pickContext.setTransformForCurrent();
8089
- }
8090
- let picked = true;
8091
- if (!onlyTranslate ||
8092
- rect.shadowRoot ||
8093
- (isNumber(cornerRadius, true) && cornerRadius !== 0) ||
8094
- (isArray(cornerRadius) && cornerRadius.some(num => num !== 0))) {
8095
- picked = false;
8096
- this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => {
8097
- if (picked) {
8098
- return true;
8099
- }
8100
- picked = context.isPointInPath(point.x, point.y);
8101
- return picked;
8102
- }, (context, rectAttribute, themeAttribute) => {
8103
- if (picked) {
8104
- return true;
8105
- }
8106
- const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth;
8107
- const pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
8108
- pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
8109
- picked = context.isPointInStroke(point.x, point.y);
8110
- return picked;
8111
- });
8112
- }
8113
- else {
8114
- const { fill = rectAttribute.fill, stroke = rectAttribute.stroke, lineWidth = rectAttribute.lineWidth } = rect.attribute;
8115
- if (fill) {
8116
- picked = true;
8117
- }
8118
- else if (stroke) {
8119
- const bounds = rect.AABBBounds;
8120
- _bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2);
8121
- _bounds.expand(-lineWidth / 2);
8122
- picked = !_bounds.containsPoint(point);
8123
- }
8124
- }
8125
- pickContext.highPerformanceRestore();
8126
- return picked;
8127
7773
  }
8128
7774
  };
8129
7775
  DefaultCanvasRectPicker = __decorate([
@@ -8142,24 +7788,12 @@ const rectCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
8142
7788
  bind(CanvasPickerContribution).toService(CanvasRectPicker);
8143
7789
  });
8144
7790
 
8145
- let BasePicker = class BasePicker extends BaseRender {
8146
- };
8147
- BasePicker = __decorate([
8148
- injectable()
8149
- ], BasePicker);
8150
-
8151
- let DefaultCanvasLinePicker = class DefaultCanvasLinePicker extends BasePicker {
8152
- constructor(canvasRenderer) {
8153
- super();
8154
- this.canvasRenderer = canvasRenderer;
8155
- this.type = 'line';
8156
- this.numberType = LINE_NUMBER_TYPE;
8157
- }
8158
- contains(line, point, params) {
8159
- if (!line.AABBBounds.containsPoint(point)) {
7791
+ class BaseLinePicker extends BaseRender {
7792
+ contains(graphic, point, params) {
7793
+ if (!graphic.AABBBounds.containsPoint(point)) {
8160
7794
  return false;
8161
7795
  }
8162
- if (line.attribute.pickMode === 'imprecise') {
7796
+ if (graphic.attribute.pickMode === 'imprecise') {
8163
7797
  return true;
8164
7798
  }
8165
7799
  const { pickContext } = params !== null && params !== void 0 ? params : {};
@@ -8167,19 +7801,19 @@ let DefaultCanvasLinePicker = class DefaultCanvasLinePicker extends BasePicker {
8167
7801
  return false;
8168
7802
  }
8169
7803
  pickContext.highPerformanceSave();
8170
- const lineAttribute = getTheme(line).line;
8171
- const data = this.transform(line, lineAttribute, pickContext);
7804
+ const lineAttribute = getTheme(graphic)[graphic.type];
7805
+ const data = this.transform(graphic, lineAttribute, pickContext);
8172
7806
  const { x, y, z, lastModelMatrix } = data;
8173
7807
  let pickPoint = point;
8174
7808
  if (pickContext.camera) {
8175
7809
  pickPoint = point.clone();
8176
- const globalMatrix = line.parent.globalTransMatrix;
7810
+ const globalMatrix = graphic.parent.globalTransMatrix;
8177
7811
  pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e;
8178
7812
  pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
8179
7813
  }
8180
7814
  this.canvasRenderer.z = z;
8181
7815
  let picked = false;
8182
- this.canvasRenderer.drawShape(line, pickContext, x, y, {}, null, context => {
7816
+ this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => {
8183
7817
  if (picked) {
8184
7818
  return true;
8185
7819
  }
@@ -8203,6 +7837,15 @@ let DefaultCanvasLinePicker = class DefaultCanvasLinePicker extends BasePicker {
8203
7837
  pickContext.highPerformanceRestore();
8204
7838
  return picked;
8205
7839
  }
7840
+ }
7841
+
7842
+ let DefaultCanvasLinePicker = class DefaultCanvasLinePicker extends BaseLinePicker {
7843
+ constructor(canvasRenderer) {
7844
+ super();
7845
+ this.canvasRenderer = canvasRenderer;
7846
+ this.type = 'line';
7847
+ this.numberType = LINE_NUMBER_TYPE;
7848
+ }
8206
7849
  };
8207
7850
  DefaultCanvasLinePicker = __decorate([
8208
7851
  injectable(),
@@ -8220,64 +7863,13 @@ const lineCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
8220
7863
  bind(CanvasPickerContribution).toService(CanvasLinePicker);
8221
7864
  });
8222
7865
 
8223
- let DefaultCanvasAreaPicker = class DefaultCanvasAreaPicker {
7866
+ let DefaultCanvasAreaPicker = class DefaultCanvasAreaPicker extends PickerBase {
8224
7867
  constructor(canvasRenderer) {
7868
+ super();
8225
7869
  this.canvasRenderer = canvasRenderer;
8226
7870
  this.type = 'area';
8227
7871
  this.numberType = AREA_NUMBER_TYPE;
8228
7872
  }
8229
- contains(area, point, params) {
8230
- if (!area.AABBBounds.containsPoint(point)) {
8231
- return false;
8232
- }
8233
- if (area.attribute.pickMode === 'imprecise') {
8234
- return true;
8235
- }
8236
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8237
- if (!pickContext) {
8238
- return false;
8239
- }
8240
- const areaAttribute = getTheme(area).area;
8241
- let { x = areaAttribute.x, y = areaAttribute.y } = area.attribute;
8242
- const { fillPickable = areaAttribute.fillPickable, strokePickable = areaAttribute.strokePickable } = area.attribute;
8243
- pickContext.highPerformanceSave();
8244
- if (!area.transMatrix.onlyTranslate()) {
8245
- x = 0;
8246
- y = 0;
8247
- pickContext.transformFromMatrix(area.transMatrix, true);
8248
- }
8249
- else {
8250
- const point = area.getOffsetXY(areaAttribute);
8251
- x += point.x;
8252
- y += point.y;
8253
- pickContext.setTransformForCurrent();
8254
- }
8255
- let picked = false;
8256
- this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, context => {
8257
- if (picked) {
8258
- return true;
8259
- }
8260
- if (!fillPickable) {
8261
- return false;
8262
- }
8263
- picked = context.isPointInPath(point.x, point.y);
8264
- return picked;
8265
- }, (context, areaAttribute, themeAttribute) => {
8266
- if (picked) {
8267
- return true;
8268
- }
8269
- if (!strokePickable) {
8270
- return false;
8271
- }
8272
- const lineWidth = areaAttribute.lineWidth || themeAttribute.lineWidth;
8273
- const pickStrokeBuffer = areaAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
8274
- pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
8275
- picked = context.isPointInStroke(point.x, point.y);
8276
- return picked;
8277
- });
8278
- pickContext.highPerformanceRestore();
8279
- return picked;
8280
- }
8281
7873
  };
8282
7874
  DefaultCanvasAreaPicker = __decorate([
8283
7875
  injectable(),
@@ -8295,7 +7887,44 @@ const areaCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
8295
7887
  bind(CanvasPickerContribution).toService(CanvasAreaPicker);
8296
7888
  });
8297
7889
 
8298
- let DefaultCanvasSymbolPicker = class DefaultCanvasSymbolPicker extends BasePicker {
7890
+ class Base3dPicker extends BaseRender {
7891
+ contains(graphic, point, params) {
7892
+ var _a;
7893
+ const { pickContext } = params !== null && params !== void 0 ? params : {};
7894
+ if (!pickContext) {
7895
+ return false;
7896
+ }
7897
+ const attribute = getTheme(graphic)[(_a = this.themeType) !== null && _a !== void 0 ? _a : graphic.type];
7898
+ pickContext.highPerformanceSave();
7899
+ const data = this.transform(graphic, attribute, pickContext);
7900
+ const { x, y, z, lastModelMatrix } = data;
7901
+ let pickPoint = point;
7902
+ if (pickContext.camera) {
7903
+ pickPoint = point.clone();
7904
+ const globalMatrix = graphic.parent.globalTransMatrix;
7905
+ pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e;
7906
+ pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
7907
+ }
7908
+ this.canvasRenderer.z = z;
7909
+ let picked = false;
7910
+ this.canvasRenderer.drawShape(graphic, pickContext, x, y, params, null, (context, arc3dAttribute, themeAttribute) => {
7911
+ if (picked) {
7912
+ return true;
7913
+ }
7914
+ picked = context.isPointInPath(pickPoint.x, pickPoint.y);
7915
+ return picked;
7916
+ });
7917
+ this.canvasRenderer.z = 0;
7918
+ if (pickContext.modelMatrix !== lastModelMatrix) {
7919
+ mat4Allocate.free(pickContext.modelMatrix);
7920
+ }
7921
+ pickContext.modelMatrix = lastModelMatrix;
7922
+ pickContext.highPerformanceRestore();
7923
+ return picked;
7924
+ }
7925
+ }
7926
+
7927
+ let DefaultCanvasSymbolPicker = class DefaultCanvasSymbolPicker extends Base3dPicker {
8299
7928
  constructor(canvasRenderer) {
8300
7929
  super();
8301
7930
  this.canvasRenderer = canvasRenderer;
@@ -8370,57 +7999,13 @@ const symbolCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebin
8370
7999
  bind(CanvasPickerContribution).toService(CanvasSymbolPicker);
8371
8000
  });
8372
8001
 
8373
- let DefaultCanvasCirclePicker = class DefaultCanvasCirclePicker {
8002
+ let DefaultCanvasCirclePicker = class DefaultCanvasCirclePicker extends PickerBase {
8374
8003
  constructor(canvasRenderer) {
8004
+ super();
8375
8005
  this.canvasRenderer = canvasRenderer;
8376
8006
  this.type = 'circle';
8377
8007
  this.numberType = CIRCLE_NUMBER_TYPE;
8378
8008
  }
8379
- contains(circle, point, params) {
8380
- if (!circle.AABBBounds.containsPoint(point)) {
8381
- return false;
8382
- }
8383
- if (circle.attribute.pickMode === 'imprecise') {
8384
- return true;
8385
- }
8386
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8387
- if (!pickContext) {
8388
- return false;
8389
- }
8390
- const circleAttribute = getTheme(circle).circle;
8391
- let { x = circleAttribute.x, y = circleAttribute.y } = circle.attribute;
8392
- pickContext.highPerformanceSave();
8393
- if (!circle.transMatrix.onlyTranslate()) {
8394
- x = 0;
8395
- y = 0;
8396
- pickContext.transformFromMatrix(circle.transMatrix, true);
8397
- }
8398
- else {
8399
- const point = circle.getOffsetXY(circleAttribute);
8400
- x += point.x;
8401
- y += point.y;
8402
- pickContext.setTransformForCurrent();
8403
- }
8404
- let picked = false;
8405
- this.canvasRenderer.drawShape(circle, pickContext, x, y, {}, null, (context, circleAttribute, themeAttribute) => {
8406
- if (picked) {
8407
- return true;
8408
- }
8409
- picked = context.isPointInPath(point.x, point.y);
8410
- return picked;
8411
- }, (context, circleAttribute, themeAttribute) => {
8412
- if (picked) {
8413
- return true;
8414
- }
8415
- const lineWidth = circleAttribute.lineWidth || themeAttribute.lineWidth;
8416
- const pickStrokeBuffer = circleAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
8417
- pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
8418
- picked = context.isPointInStroke(point.x, point.y);
8419
- return picked;
8420
- });
8421
- pickContext.highPerformanceRestore();
8422
- return picked;
8423
- }
8424
8009
  };
8425
8010
  DefaultCanvasCirclePicker = __decorate([
8426
8011
  injectable(),
@@ -8438,7 +8023,7 @@ const circleCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebin
8438
8023
  bind(CanvasPickerContribution).toService(CanvasCirclePicker);
8439
8024
  });
8440
8025
 
8441
- let DefaultCanvasTextPicker = class DefaultCanvasTextPicker extends BasePicker {
8026
+ let DefaultCanvasTextPicker = class DefaultCanvasTextPicker extends Base3dPicker {
8442
8027
  constructor(canvasRenderer) {
8443
8028
  super();
8444
8029
  this.canvasRenderer = canvasRenderer;
@@ -8513,61 +8098,13 @@ const textCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
8513
8098
  bind(CanvasPickerContribution).toService(CanvasTextPicker);
8514
8099
  });
8515
8100
 
8516
- let DefaultCanvasPathPicker = class DefaultCanvasPathPicker extends BasePicker {
8101
+ let DefaultCanvasPathPicker = class DefaultCanvasPathPicker extends BaseLinePicker {
8517
8102
  constructor(canvasRenderer) {
8518
8103
  super();
8519
8104
  this.canvasRenderer = canvasRenderer;
8520
8105
  this.type = 'path';
8521
8106
  this.numberType = PATH_NUMBER_TYPE;
8522
8107
  }
8523
- contains(path, point, params) {
8524
- if (!path.AABBBounds.containsPoint(point)) {
8525
- return false;
8526
- }
8527
- if (path.attribute.pickMode === 'imprecise') {
8528
- return true;
8529
- }
8530
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8531
- if (!pickContext) {
8532
- return false;
8533
- }
8534
- const pathAttribute = getTheme(path).path;
8535
- pickContext.highPerformanceSave();
8536
- const data = this.transform(path, pathAttribute, pickContext);
8537
- const { x, y, z, lastModelMatrix } = data;
8538
- let pickPoint = point;
8539
- if (pickContext.camera) {
8540
- pickPoint = point.clone();
8541
- const globalMatrix = path.parent.globalTransMatrix;
8542
- pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e;
8543
- pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
8544
- }
8545
- this.canvasRenderer.z = z;
8546
- let picked = false;
8547
- this.canvasRenderer.drawShape(path, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => {
8548
- if (picked) {
8549
- return true;
8550
- }
8551
- picked = context.isPointInPath(pickPoint.x, pickPoint.y);
8552
- return picked;
8553
- }, (context, pathAttribute, themeAttribute) => {
8554
- if (picked) {
8555
- return true;
8556
- }
8557
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth;
8558
- const pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
8559
- pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
8560
- picked = context.isPointInStroke(pickPoint.x, pickPoint.y);
8561
- return picked;
8562
- });
8563
- this.canvasRenderer.z = 0;
8564
- if (pickContext.modelMatrix !== lastModelMatrix) {
8565
- mat4Allocate.free(pickContext.modelMatrix);
8566
- }
8567
- pickContext.modelMatrix = lastModelMatrix;
8568
- pickContext.highPerformanceRestore();
8569
- return picked;
8570
- }
8571
8108
  };
8572
8109
  DefaultCanvasPathPicker = __decorate([
8573
8110
  injectable(),
@@ -8585,57 +8122,13 @@ const pathCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
8585
8122
  bind(CanvasPickerContribution).toService(CanvasPathPicker);
8586
8123
  });
8587
8124
 
8588
- let DefaultCanvasPolygonPicker = class DefaultCanvasPolygonPicker {
8125
+ let DefaultCanvasPolygonPicker = class DefaultCanvasPolygonPicker extends PickerBase {
8589
8126
  constructor(canvasRenderer) {
8127
+ super();
8590
8128
  this.canvasRenderer = canvasRenderer;
8591
8129
  this.type = 'polygon';
8592
8130
  this.numberType = POLYGON_NUMBER_TYPE;
8593
8131
  }
8594
- contains(polygon, point, params) {
8595
- if (!polygon.AABBBounds.contains(point.x, point.y)) {
8596
- return false;
8597
- }
8598
- if (polygon.attribute.pickMode === 'imprecise') {
8599
- return true;
8600
- }
8601
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8602
- if (!pickContext) {
8603
- return false;
8604
- }
8605
- const polygonAttribute = getTheme(polygon).polygon;
8606
- let { x = polygonAttribute.x, y = polygonAttribute.y } = polygon.attribute;
8607
- pickContext.highPerformanceSave();
8608
- if (!polygon.transMatrix.onlyTranslate()) {
8609
- x = 0;
8610
- y = 0;
8611
- pickContext.transformFromMatrix(polygon.transMatrix, true);
8612
- }
8613
- else {
8614
- const point = polygon.getOffsetXY(polygonAttribute);
8615
- x += point.x;
8616
- y += point.y;
8617
- pickContext.setTransformForCurrent();
8618
- }
8619
- let picked = false;
8620
- this.canvasRenderer.drawShape(polygon, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => {
8621
- if (picked) {
8622
- return true;
8623
- }
8624
- picked = context.isPointInPath(point.x, point.y);
8625
- return picked;
8626
- }, (context, pathAttribute, themeAttribute) => {
8627
- if (picked) {
8628
- return true;
8629
- }
8630
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth;
8631
- const pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
8632
- pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr);
8633
- picked = context.isPointInStroke(point.x, point.y);
8634
- return picked;
8635
- });
8636
- pickContext.highPerformanceRestore();
8637
- return picked;
8638
- }
8639
8132
  };
8640
8133
  DefaultCanvasPolygonPicker = __decorate([
8641
8134
  injectable(),
@@ -8653,36 +8146,10 @@ const polygonCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebi
8653
8146
  bind(CanvasPickerContribution).toService(CanvasPolygonPicker);
8654
8147
  });
8655
8148
 
8656
- let DefaultCanvasGlyphPicker = class DefaultCanvasGlyphPicker {
8149
+ let DefaultCanvasGlyphPicker = class DefaultCanvasGlyphPicker extends GlyphPickerBase {
8657
8150
  constructor(canvasRenderer) {
8151
+ super();
8658
8152
  this.canvasRenderer = canvasRenderer;
8659
- this.type = 'glyph';
8660
- this.numberType = GLYPH_NUMBER_TYPE;
8661
- }
8662
- contains(glyph, point, params) {
8663
- if (!glyph.AABBBounds.containsPoint(point)) {
8664
- return false;
8665
- }
8666
- if (glyph.attribute.pickMode === 'imprecise') {
8667
- return true;
8668
- }
8669
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8670
- if (!pickContext) {
8671
- return false;
8672
- }
8673
- const pickerService = params === null || params === void 0 ? void 0 : params.pickerService;
8674
- if (pickerService) {
8675
- let picked = false;
8676
- glyph.getSubGraphic().forEach(g => {
8677
- if (picked) {
8678
- return;
8679
- }
8680
- const data = pickerService.pickItem(g, point, null, params);
8681
- picked = !!(data && data.graphic);
8682
- });
8683
- return picked;
8684
- }
8685
- return false;
8686
8153
  }
8687
8154
  };
8688
8155
  DefaultCanvasGlyphPicker = __decorate([
@@ -8760,46 +8227,13 @@ const imageCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind
8760
8227
  bind(CanvasPickerContribution).toService(CanvasImagePicker);
8761
8228
  });
8762
8229
 
8763
- new AABBBounds();
8764
- let DefaultCanvasRect3dPicker = class DefaultCanvasRect3dPicker extends BasePicker {
8230
+ let DefaultCanvasRect3dPicker = class DefaultCanvasRect3dPicker extends Base3dPicker {
8765
8231
  constructor(canvasRenderer) {
8766
8232
  super();
8767
8233
  this.canvasRenderer = canvasRenderer;
8768
8234
  this.type = 'rect3d';
8769
8235
  this.numberType = RECT3D_NUMBER_TYPE;
8770
- }
8771
- contains(rect, point, params) {
8772
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8773
- if (!pickContext) {
8774
- return false;
8775
- }
8776
- const rectAttribute = getTheme(rect).rect;
8777
- pickContext.highPerformanceSave();
8778
- const data = this.transform(rect, rectAttribute, pickContext);
8779
- const { x, y, z, lastModelMatrix } = data;
8780
- let pickPoint = point;
8781
- if (pickContext.camera) {
8782
- pickPoint = point.clone();
8783
- const globalMatrix = rect.parent.globalTransMatrix;
8784
- pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e;
8785
- pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
8786
- }
8787
- this.canvasRenderer.z = z;
8788
- let picked = false;
8789
- this.canvasRenderer.drawShape(rect, pickContext, x, y, params, null, (context, arc3dAttribute, themeAttribute) => {
8790
- if (picked) {
8791
- return true;
8792
- }
8793
- picked = context.isPointInPath(pickPoint.x, pickPoint.y);
8794
- return picked;
8795
- });
8796
- this.canvasRenderer.z = 0;
8797
- if (pickContext.modelMatrix !== lastModelMatrix) {
8798
- mat4Allocate.free(pickContext.modelMatrix);
8799
- }
8800
- pickContext.modelMatrix = lastModelMatrix;
8801
- pickContext.highPerformanceRestore();
8802
- return picked;
8236
+ this.themeType = 'rect';
8803
8237
  }
8804
8238
  };
8805
8239
  DefaultCanvasRect3dPicker = __decorate([
@@ -8818,45 +8252,13 @@ const rect3dCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebin
8818
8252
  bind(CanvasPickerContribution).toService(CanvasRect3dPicker);
8819
8253
  });
8820
8254
 
8821
- let DefaultCanvasArc3dPicker = class DefaultCanvasArc3dPicker extends BasePicker {
8255
+ let DefaultCanvasArc3dPicker = class DefaultCanvasArc3dPicker extends Base3dPicker {
8822
8256
  constructor(canvasRenderer) {
8823
8257
  super();
8824
8258
  this.canvasRenderer = canvasRenderer;
8825
8259
  this.type = 'arc3d';
8826
8260
  this.numberType = ARC3D_NUMBER_TYPE;
8827
- }
8828
- contains(arc3d, point, params) {
8829
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8830
- if (!pickContext) {
8831
- return false;
8832
- }
8833
- const arc3dAttribute = getTheme(arc3d).arc;
8834
- pickContext.highPerformanceSave();
8835
- const data = this.transform(arc3d, arc3dAttribute, pickContext);
8836
- const { x, y, z, lastModelMatrix } = data;
8837
- let pickPoint = point;
8838
- if (pickContext.camera) {
8839
- pickPoint = point.clone();
8840
- const globalMatrix = arc3d.parent.globalTransMatrix;
8841
- pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e;
8842
- pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
8843
- }
8844
- this.canvasRenderer.z = z;
8845
- let picked = false;
8846
- this.canvasRenderer.drawShape(arc3d, pickContext, x, y, params, null, (context, arc3dAttribute, themeAttribute) => {
8847
- if (picked) {
8848
- return true;
8849
- }
8850
- picked = context.isPointInPath(pickPoint.x, pickPoint.y);
8851
- return picked;
8852
- });
8853
- this.canvasRenderer.z = 0;
8854
- if (pickContext.modelMatrix !== lastModelMatrix) {
8855
- mat4Allocate.free(pickContext.modelMatrix);
8856
- }
8857
- pickContext.modelMatrix = lastModelMatrix;
8858
- pickContext.highPerformanceRestore();
8859
- return picked;
8261
+ this.themeType = 'arc';
8860
8262
  }
8861
8263
  };
8862
8264
  DefaultCanvasArc3dPicker = __decorate([
@@ -8875,47 +8277,13 @@ const arc3dCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind
8875
8277
  bind(CanvasPickerContribution).toService(CanvasArc3dPicker);
8876
8278
  });
8877
8279
 
8878
- let DefaultCanvasPyramid3dPicker = class DefaultCanvasPyramid3dPicker extends BasePicker {
8280
+ let DefaultCanvasPyramid3dPicker = class DefaultCanvasPyramid3dPicker extends Base3dPicker {
8879
8281
  constructor(canvasRenderer) {
8880
8282
  super();
8881
8283
  this.canvasRenderer = canvasRenderer;
8882
8284
  this.type = 'pyramid3d';
8883
8285
  this.numberType = PYRAMID3D_NUMBER_TYPE;
8884
- }
8885
- contains(pyramid3d, point, params) {
8886
- const { pickContext } = params !== null && params !== void 0 ? params : {};
8887
- if (!pickContext) {
8888
- return false;
8889
- }
8890
- const pyramid3dAttribute = getTheme(pyramid3d).polygon;
8891
- pickContext.highPerformanceSave();
8892
- const data = this.transform(pyramid3d, pyramid3dAttribute, pickContext);
8893
- const { x, y, z, lastModelMatrix } = data;
8894
- let pickPoint = point;
8895
- if (pickContext.camera) {
8896
- pickPoint = point.clone();
8897
- const globalMatrix = pyramid3d.parent.globalTransMatrix;
8898
- pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e;
8899
- pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
8900
- }
8901
- this.canvasRenderer.z = z;
8902
- let picked = false;
8903
- this.canvasRenderer.drawShape(pyramid3d, pickContext, x, y, {}, null, (context, pyramid3dAttribute, themeAttribute) => {
8904
- if (picked) {
8905
- return true;
8906
- }
8907
- picked = context.isPointInPath(pickPoint.x, pickPoint.y);
8908
- return picked;
8909
- }, (context, pyramid3dAttribute, themeAttribute) => {
8910
- return false;
8911
- });
8912
- this.canvasRenderer.z = 0;
8913
- if (pickContext.modelMatrix !== lastModelMatrix) {
8914
- mat4Allocate.free(pickContext.modelMatrix);
8915
- }
8916
- pickContext.modelMatrix = lastModelMatrix;
8917
- pickContext.highPerformanceRestore();
8918
- return picked;
8286
+ this.themeType = 'polygon';
8919
8287
  }
8920
8288
  };
8921
8289
  DefaultCanvasPyramid3dPicker = __decorate([
@@ -8954,6 +8322,8 @@ function _registerArc3d() {
8954
8322
  }
8955
8323
  _registerArc3d.__loaded = true;
8956
8324
  registerArc3dGraphic();
8325
+ registerDirectionalLight();
8326
+ registerOrthoCamera();
8957
8327
  container.load(arc3dModule);
8958
8328
  container.load(browser ? arc3dCanvasPickModule : arc3dCanvasPickModule);
8959
8329
  }
@@ -9060,6 +8430,8 @@ function _registerPyramid3d() {
9060
8430
  }
9061
8431
  _registerPyramid3d.__loaded = true;
9062
8432
  registerPyramid3dGraphic();
8433
+ registerDirectionalLight();
8434
+ registerOrthoCamera();
9063
8435
  container.load(pyramid3dModule);
9064
8436
  container.load(browser ? pyramid3dCanvasPickModule : pyramid3dCanvasPickModule);
9065
8437
  }