@leafer-ui/display 2.0.6 → 2.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/display",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "@leafer-ui/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,14 +22,14 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "2.0.6",
26
- "@leafer-ui/data": "2.0.6",
27
- "@leafer-ui/display-module": "2.0.6",
28
- "@leafer-ui/decorator": "2.0.6",
29
- "@leafer-ui/external": "2.0.6"
25
+ "@leafer/core": "2.0.8",
26
+ "@leafer-ui/data": "2.0.8",
27
+ "@leafer-ui/display-module": "2.0.8",
28
+ "@leafer-ui/decorator": "2.0.8",
29
+ "@leafer-ui/external": "2.0.8"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "2.0.6",
33
- "@leafer-ui/interface": "2.0.6"
32
+ "@leafer/interface": "2.0.8",
33
+ "@leafer-ui/interface": "2.0.8"
34
34
  }
35
35
  }
package/src/Ellipse.ts CHANGED
@@ -63,7 +63,7 @@ export class Ellipse<TInputData = IEllipseInputData> extends UI<TInputData> impl
63
63
  if (!open) closePath(path)
64
64
 
65
65
  // fix node
66
- if (Platform.ellipseToCurve || data.__useArrow) data.path = this.getPath(true)
66
+ if (Platform.ellipseToCurve || data.__useArrow || data.cornerRadius) data.path = this.getPath(true)
67
67
 
68
68
  }
69
69
 
package/src/Polygon.ts CHANGED
@@ -36,7 +36,7 @@ export class Polygon<TInputData = IPolygonInputData> extends UI<TInputData> impl
36
36
 
37
37
  if (data.points) {
38
38
 
39
- drawPoints(path, data.points, data.curve, true)
39
+ drawPoints(path, data.points, data.curve, data.closed)
40
40
 
41
41
  } else {
42
42
 
package/src/UI.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ILeaferCanvas, IRenderOptions, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject, IScaleData, IUnitData, IPathCommandObject, ITransition, IFilter, IScaleFixed, IDragBoundsType, IPathCommandNode } from '@leafer/interface'
2
2
  import { Leaf, PathDrawer, surfaceType, dimType, dataType, positionType, scrollType, boundsType, pathType, scaleType, rotationType, opacityType, visibleType, sortType, maskType, dataProcessor, registerUI, useModule, rewrite, rewriteAble, UICreator, PathCorner, hitType, strokeType, PathConvert, eraserType, cursorType, autoLayoutType, pen, naturalBoundsType, pathInputType, MathHelper, Plugin, DataHelper, affectRenderBoundsType, isString, isNumber } from '@leafer/core'
3
3
 
4
- import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowStyle, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction, IKeyframe, IAnimation, IAnimate, IStates, IStateName, IAnimateType, IStateStyle, IColorString, IAnimateList, ILeafPaint, ILinker } from '@leafer-ui/interface'
4
+ import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowStyle, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction, IKeyframe, IAnimation, IAnimate, IStates, IStateName, IAnimateType, IStateStyle, IColorString, IAnimateList, ILeafPaint, ILinker, IPathCommandDataWithRadius } from '@leafer-ui/interface'
5
5
  import { effectType, zoomLayerType } from '@leafer-ui/decorator'
6
6
 
7
7
  import { UIData } from '@leafer-ui/data'
@@ -481,7 +481,7 @@ export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements I
481
481
  public __updateRenderPath(updateCache?: boolean): void {
482
482
  const data = this.__
483
483
  if (data.path) {
484
- data.__pathForRender = data.cornerRadius ? PathCorner.smooth(data.path, data.cornerRadius, data.cornerSmoothing) : data.path
484
+ data.__pathForRender = (data.cornerRadius || (data.path as any as IPathCommandDataWithRadius).radius) ? PathCorner.smooth(data.path, data.cornerRadius, data.cornerSmoothing) : data.path
485
485
  if (data.__useArrow) PathArrow.addArrows(this, updateCache)
486
486
  } else data.__pathForRender && (data.__pathForRender = undefined)
487
487
  }