@leafer-ui/display 1.0.0-rc.26 → 1.0.0-rc.27
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/Canvas.ts +3 -6
- package/src/UI.ts +6 -1
- package/types/index.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.27",
|
|
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": "1.0.0-rc.
|
|
26
|
-
"@leafer-ui/data": "1.0.0-rc.
|
|
27
|
-
"@leafer-ui/display-module": "1.0.0-rc.
|
|
28
|
-
"@leafer-ui/decorator": "1.0.0-rc.
|
|
29
|
-
"@leafer-ui/external": "1.0.0-rc.
|
|
25
|
+
"@leafer/core": "1.0.0-rc.27",
|
|
26
|
+
"@leafer-ui/data": "1.0.0-rc.27",
|
|
27
|
+
"@leafer-ui/display-module": "1.0.0-rc.27",
|
|
28
|
+
"@leafer-ui/decorator": "1.0.0-rc.27",
|
|
29
|
+
"@leafer-ui/external": "1.0.0-rc.27"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.0.0-rc.
|
|
33
|
-
"@leafer-ui/interface": "1.0.0-rc.
|
|
32
|
+
"@leafer/interface": "1.0.0-rc.27",
|
|
33
|
+
"@leafer-ui/interface": "1.0.0-rc.27"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Canvas.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILeaferCanvas, ILeaferCanvasConfig, INumber, IRenderOptions, IPointData, ICanvasContext2D, ICanvasContext2DSettings, IScreenSizeData, ISizeData
|
|
2
|
-
import { Creator, Matrix, Platform, dataProcessor, registerUI
|
|
1
|
+
import { ILeaferCanvas, ILeaferCanvasConfig, INumber, IRenderOptions, IPointData, ICanvasContext2D, ICanvasContext2DSettings, IScreenSizeData, ISizeData } from '@leafer/interface'
|
|
2
|
+
import { Creator, Matrix, Platform, dataProcessor, registerUI } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { ICanvas, ICanvasData, ICanvasInputData, IUI } from '@leafer-ui/interface'
|
|
5
5
|
import { CanvasData } from '@leafer-ui/data'
|
|
@@ -31,9 +31,6 @@ export class Canvas extends Rect implements ICanvas {
|
|
|
31
31
|
@resizeType()
|
|
32
32
|
public contextSettings: ICanvasContext2DSettings
|
|
33
33
|
|
|
34
|
-
@hitType('all')
|
|
35
|
-
declare public hitFill: IHitType
|
|
36
|
-
|
|
37
34
|
public canvas: ILeaferCanvas
|
|
38
35
|
|
|
39
36
|
public context: ICanvasContext2D
|
|
@@ -42,7 +39,7 @@ export class Canvas extends Rect implements ICanvas {
|
|
|
42
39
|
super(data)
|
|
43
40
|
this.canvas = Creator.canvas(this.__ as ILeaferCanvasConfig)
|
|
44
41
|
this.context = this.canvas.context
|
|
45
|
-
this.__.__drawAfterFill = true
|
|
42
|
+
this.__.__isCanvas = this.__.__drawAfterFill = true
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
public draw(ui: IUI, offset?: IPointData, scale?: number | IPointData, rotation?: number): void {
|
package/src/UI.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData } from '@leafer/interface'
|
|
1
|
+
import { ILeaferCanvas, IPathDrawer, IPathCommandData, IHitType, INumber, IBoolean, IString, IPathString, IExportFileType, IPointData, ICursorType, IMaskType, IEraserType, IValue, IWindingRule, IPathCreator, IFourNumber, IBoundsData, IFlowType, IGap, IFlowWrap, IAxis, IConstraint, IAutoBoxData, IFlowBoxType, IPointGap, IFlowAlign, IFlowAxisAlign, IFindCondition, IAutoSize, IRangeSize, IAlign, IUnitPointData, IObject } from '@leafer/interface'
|
|
2
2
|
import { Leaf, PathDrawer, surfaceType, dataType, positionType, boundsType, pathType, scaleType, rotationType, opacityType, visibleType, sortType, maskType, dataProcessor, registerUI, useModule, rewrite, rewriteAble, UICreator, PathCorner, hitType, strokeType, PathConvert, eraserType, cursorType, autoLayoutType, pen, naturalBoundsType, pathInputType } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { IUI, IShadowEffect, IBlurEffect, IStrokeAlign, IStrokeJoin, IStrokeCap, IBlendMode, IDashPatternString, IShadowString, IGrayscaleEffect, IUIData, IGroup, IStrokeWidthString, ICornerRadiusString, IUIInputData, IExportOptions, IExportResult, IFill, IStroke, IArrowType, IFindUIMethod, ILeafer, IEditorConfig, IEditorConfigFunction, IEditToolFunction } from '@leafer-ui/interface'
|
|
@@ -326,6 +326,11 @@ export class UI extends Leaf implements IUI { // tip: rewrited Box
|
|
|
326
326
|
public disabledStyle: IUIInputData
|
|
327
327
|
|
|
328
328
|
|
|
329
|
+
// 预留给用户使用的数据对象
|
|
330
|
+
@dataType({})
|
|
331
|
+
public data: IObject
|
|
332
|
+
|
|
333
|
+
|
|
329
334
|
public set scale(value: INumber | IPointData) {
|
|
330
335
|
if (typeof value === 'number') {
|
|
331
336
|
this.scaleX = this.scaleY = value
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IHitType, ICursorType, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent,
|
|
1
|
+
import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathString, IWindingRule, IFlowType, IFourNumber, IGap, IPointGap, IFlowAlign, IFlowAxisAlign, IFlowWrap, IFlowBoxType, IAutoSize, IAutoBoxData, IConstraint, IRangeSize, IAxis, IBoundsData, IHitType, ICursorType, IObject, IPointData, IPathCreator, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, IExportFileType, IPickOptions, IPickResult, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, IZoomType, IClientPointData, IRenderOptions, ILeaferImage, ICanvasContext2DSettings, ICanvasContext2D, IUnitData } from '@leafer/interface';
|
|
2
2
|
import { Leaf, LeafList } from '@leafer/core';
|
|
3
3
|
import { IUI, IUIData, IUIInputData, ILeafer, IGroup, IBlendMode, IFill, IStroke, IStrokeAlign, IStrokeWidthString, IStrokeCap, IStrokeJoin, IDashPatternString, IArrowType, ICornerRadiusString, IShadowEffect, IShadowString, IBlurEffect, IGrayscaleEffect, IEditorConfig, IFindUIMethod, IExportOptions, IExportResult, IEditorConfigFunction, IEditToolFunction, IGroupData, IGroupInputData, ILeaferData, IApp, IEditorBase, IFunction, ILeaferInputData, IBox, IBoxData, IOverflow, IBoxInputData, IFrame, IFrameData, IFrameInputData, IRect, IRectData, IRectInputData, IEllipse, IEllipseData, IEllipseInputData, IPolygon, IPolygonData, IPolygonInputData, IStar, IStarData, IStarInputData, ILine, ILineData, ILineInputData, IImage, IImageData, IImageInputData, ICanvas, ICanvasData, ICanvasInputData, IText, ITextData, IHitType as IHitType$1, IFontWeight, ITextCase, ITextDecoration, ITextAlign, IVerticalAlign, ITextWrap, ITextDrawData, ITextInputData, IPath, IPathData, IPathInputData, IPen, IPenData, IPathCommandData as IPathCommandData$1, IPenInputData } from '@leafer-ui/interface';
|
|
4
4
|
|
|
@@ -93,6 +93,7 @@ declare class UI extends Leaf implements IUI {
|
|
|
93
93
|
focusStyle: IUIInputData;
|
|
94
94
|
selectedStyle: IUIInputData;
|
|
95
95
|
disabledStyle: IUIInputData;
|
|
96
|
+
data: IObject;
|
|
96
97
|
set scale(value: INumber | IPointData);
|
|
97
98
|
get scale(): INumber | IPointData;
|
|
98
99
|
get pen(): IPathCreator;
|
|
@@ -341,7 +342,6 @@ declare class Canvas extends Rect implements ICanvas {
|
|
|
341
342
|
pixelRatio: INumber;
|
|
342
343
|
smooth: boolean;
|
|
343
344
|
contextSettings: ICanvasContext2DSettings;
|
|
344
|
-
hitFill: IHitType;
|
|
345
345
|
canvas: ILeaferCanvas;
|
|
346
346
|
context: ICanvasContext2D;
|
|
347
347
|
constructor(data?: ICanvasInputData);
|