@leafer-ui/display 2.0.5 → 2.0.7
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 +8 -8
- package/src/Ellipse.ts +1 -1
- package/src/Polygon.ts +1 -1
- package/src/UI.ts +3 -2
- package/types/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
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.
|
|
26
|
-
"@leafer-ui/data": "2.0.
|
|
27
|
-
"@leafer-ui/display-module": "2.0.
|
|
28
|
-
"@leafer-ui/decorator": "2.0.
|
|
29
|
-
"@leafer-ui/external": "2.0.
|
|
25
|
+
"@leafer/core": "2.0.7",
|
|
26
|
+
"@leafer-ui/data": "2.0.7",
|
|
27
|
+
"@leafer-ui/display-module": "2.0.7",
|
|
28
|
+
"@leafer-ui/decorator": "2.0.7",
|
|
29
|
+
"@leafer-ui/external": "2.0.7"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "2.0.
|
|
33
|
-
"@leafer-ui/interface": "2.0.
|
|
32
|
+
"@leafer/interface": "2.0.7",
|
|
33
|
+
"@leafer-ui/interface": "2.0.7"
|
|
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
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'
|
|
@@ -436,6 +436,7 @@ export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements I
|
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
public createProxyData(): IUIInputData { return undefined }
|
|
439
|
+
public clearProxyData(): void { }
|
|
439
440
|
|
|
440
441
|
|
|
441
442
|
// hit rewrite
|
|
@@ -480,7 +481,7 @@ export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements I
|
|
|
480
481
|
public __updateRenderPath(updateCache?: boolean): void {
|
|
481
482
|
const data = this.__
|
|
482
483
|
if (data.path) {
|
|
483
|
-
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
|
|
484
485
|
if (data.__useArrow) PathArrow.addArrows(this, updateCache)
|
|
485
486
|
} else data.__pathForRender && (data.__pathForRender = undefined)
|
|
486
487
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -135,6 +135,7 @@ declare class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements
|
|
|
135
135
|
set(data: IUIInputData, _transition?: ITransition | 'temp'): void;
|
|
136
136
|
get<K extends keyof this>(name?: K | K[] | IUIInputData): IUIInputData | this[K];
|
|
137
137
|
createProxyData(): IUIInputData;
|
|
138
|
+
clearProxyData(): void;
|
|
138
139
|
find(_condition: number | string | IFindCondition | IFindUIMethod, _options?: any): IUI[];
|
|
139
140
|
findTag(tag: string | string[]): IUI[];
|
|
140
141
|
findOne(_condition: number | string | IFindCondition | IFindUIMethod, _options?: any): IUI | undefined;
|