@leafer-ui/display
Advanced tools
+8
-8
| { | ||
| "name": "@leafer-ui/display", | ||
| "version": "1.12.1", | ||
| "version": "1.12.2", | ||
| "description": "@leafer-ui/display", | ||
@@ -25,12 +25,12 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/core": "1.12.1", | ||
| "@leafer-ui/data": "1.12.1", | ||
| "@leafer-ui/display-module": "1.12.1", | ||
| "@leafer-ui/decorator": "1.12.1", | ||
| "@leafer-ui/external": "1.12.1" | ||
| "@leafer/core": "1.12.2", | ||
| "@leafer-ui/data": "1.12.2", | ||
| "@leafer-ui/display-module": "1.12.2", | ||
| "@leafer-ui/decorator": "1.12.2", | ||
| "@leafer-ui/external": "1.12.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.12.1", | ||
| "@leafer-ui/interface": "1.12.1" | ||
| "@leafer/interface": "1.12.2", | ||
| "@leafer-ui/interface": "1.12.2" | ||
| } | ||
| } |
+5
-5
@@ -42,3 +42,2 @@ import { INumber } from '@leafer/interface' | ||
| ellipse(path, rx, ry, rx, ry, 0, endAngle, startAngle, true) | ||
| if (innerRadius < 1) closePath(path) | ||
| } else { | ||
@@ -52,5 +51,2 @@ if (innerRadius < 1) { | ||
| // fix node | ||
| if (Platform.ellipseToCurve) this.__.path = this.getPath(true) | ||
| } else { | ||
@@ -61,3 +57,2 @@ | ||
| ellipse(path, rx, ry, rx, ry, 0, startAngle, endAngle, false) | ||
| closePath(path) | ||
| } else { | ||
@@ -69,4 +64,9 @@ ellipse(path, rx, ry, rx, ry) | ||
| closePath(path) | ||
| // fix node | ||
| if (Platform.ellipseToCurve) this.__.path = this.getPath(true) | ||
| } | ||
| } |
+2
-3
@@ -47,3 +47,3 @@ import { ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, IEventListenerId, ITimer, IValue, IObject, IControl, IPointData, ILeaferType, ICursorType, IBoundsData, INumber, IZoomType, IZoomOptions, IFourNumber, IBounds, IClientPointData, ITransition, ICanvasSizeAttr, ILeaferMode } from '@leafer/interface' | ||
| public view: unknown | ||
| public get view(): unknown { return this.canvas && this.canvas.view } | ||
@@ -132,3 +132,2 @@ // manager | ||
| this.__checkAutoLayout() | ||
| this.view = canvas.view | ||
@@ -471,3 +470,3 @@ // interaction / manager | ||
| this.config.view = this.view = this.parentApp = null | ||
| this.config.view = this.parentApp = null | ||
| if (this.userConfig) this.userConfig.view = null | ||
@@ -474,0 +473,0 @@ |
+10
-6
@@ -107,2 +107,5 @@ 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' | ||
| // @leafer-in/scale-fixed will rewrite | ||
| public scaleFixed?: IScaleFixed | ||
| // rotate | ||
@@ -442,3 +445,3 @@ @rotationType(0, true) | ||
| let path = pathForRender ? this.__.__pathForRender : this.__.path | ||
| if (!path) pen.set(path = []), this.__drawPathByBox(pen) | ||
| if (!path) pen.set(path = []), this.__drawPathByBox(pen, !pathForRender) | ||
| return curve ? PathConvert.toCanvasData(path, true) : path | ||
@@ -478,15 +481,16 @@ } | ||
| canvas.beginPath() | ||
| this.__drawPathByData(canvas, this.__.path) | ||
| this.__drawPathByData(canvas, this.__.path, true) | ||
| } | ||
| public __drawPathByData(drawer: IPathDrawer, data: IPathCommandData): void { | ||
| data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer) | ||
| public __drawPathByData(drawer: IPathDrawer, data: IPathCommandData, ignoreCornerRadius?: boolean): void { | ||
| data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius) | ||
| } | ||
| public __drawPathByBox(drawer: IPathDrawer): void { | ||
| public __drawPathByBox(drawer: IPathDrawer, ignoreCornerRadius?: boolean): void { | ||
| const { x, y, width, height } = this.__layout.boxBounds | ||
| if (this.__.cornerRadius) { | ||
| if (this.__.cornerRadius && !ignoreCornerRadius) { | ||
| const { cornerRadius } = this.__ | ||
| drawer.roundRect(x, y, width, height, isNumber(cornerRadius) ? [cornerRadius] : cornerRadius) // 修复微信浏览器bug, 后续需进一步优化 | ||
| } else drawer.rect(x, y, width, height) | ||
| drawer.closePath() | ||
| } | ||
@@ -493,0 +497,0 @@ |
+5
-4
@@ -1,2 +0,2 @@ | ||
| import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IFourNumber, IPathCommandData, IPathCommandNode, IPathCommandObject, IPathString, IWindingRule, IFlowType, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IDragBoundsType, IHitType, ICursorType, IScaleFixed, IFilter, ITransition, IUnitData, IObject, IPointData, IPathCreator, IFindCondition, ILeaferCanvas, IPathDrawer, IRenderOptions, IExportFileType, IJSONOptions, IPickOptions, IPickResult, ILeaferMode, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IValue, ICanvasSizeAttr, IZoomType, IZoomOptions, IClientPointData, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface'; | ||
| import { IString, INumber, IBoolean, IMaskType, IEraserType, IScaleFixed, IAlign, IUnitPointData, IFourNumber, IPathCommandData, IPathCommandNode, IPathCommandObject, IPathString, IWindingRule, IFlowType, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IDragBoundsType, IHitType, ICursorType, IFilter, ITransition, IUnitData, IObject, IPointData, IPathCreator, IFindCondition, ILeaferCanvas, IPathDrawer, IRenderOptions, IExportFileType, IJSONOptions, IPickOptions, IPickResult, ILeaferMode, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IValue, ICanvasSizeAttr, IZoomType, IZoomOptions, IClientPointData, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface'; | ||
| import { Leaf, LeafList } from '@leafer/core'; | ||
@@ -34,2 +34,3 @@ import { IUIInputData, IUI, IUIData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowStyle, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IAnimation, IStates, IStateName, IStateStyle, IColorString, IEditorConfig, IAnimate, IAnimateList, IFindUIMethod, ILeafPaint, IKeyframe, IAnimateType, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupInputData, IGroupData, IUIJSONData, IFindCondition as IFindCondition$1, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBoxInputData, IBox, IBoxData, IOverflow, IScrollConfig, IScroller, IFrameInputData, IFrame, IFrameData, IRectInputData, IRect, IRectData, IEllipseInputData, IEllipse, IEllipseData, IPolygonInputData, IPolygon, IPolygonData, IStarInputData, IStar, IStarData, ILineInputData, ILine, ILineData, IImageInputData, IImage, IImageData, ICanvasInputData, ICanvas, ICanvasData, ITextInputData, IText, ITextData, IBackgroundBoxStyle, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, IWritingMode, ITextAlign, IVerticalAlign, ITextWrap, ITextOverflow, ITextDrawData, IPathInputData, IPath, IPathData, IPenInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPointData as IPointData$1 } from '@leafer-ui/interface'; | ||
| scaleY?: INumber; | ||
| scaleFixed?: IScaleFixed; | ||
| rotation?: INumber; | ||
@@ -144,4 +145,4 @@ skewX?: INumber; | ||
| __drawPath(canvas: ILeaferCanvas): void; | ||
| __drawPathByData(drawer: IPathDrawer, data: IPathCommandData): void; | ||
| __drawPathByBox(drawer: IPathDrawer): void; | ||
| __drawPathByData(drawer: IPathDrawer, data: IPathCommandData, ignoreCornerRadius?: boolean): void; | ||
| __drawPathByBox(drawer: IPathDrawer, ignoreCornerRadius?: boolean): void; | ||
| drawImagePlaceholder(_paint: ILeafPaint, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void; | ||
@@ -205,3 +206,3 @@ animate(keyframe?: IUIInputData | IKeyframe[] | IAnimation | IAnimation[], _options?: ITransition, _type?: IAnimateType, _isTemp?: boolean): IAnimate; | ||
| transforming: boolean; | ||
| view: unknown; | ||
| get view(): unknown; | ||
| canvas: ILeaferCanvas; | ||
@@ -208,0 +209,0 @@ renderer: IRenderer; |
83971
0.32%1843
0.11%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated