@leafer-ui/display 1.9.7 → 1.9.9
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/Box.ts +4 -4
- package/src/Text.ts +5 -5
- package/src/UI.ts +2 -2
- package/types/index.d.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.9",
|
|
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.9.
|
|
26
|
-
"@leafer-ui/data": "1.9.
|
|
27
|
-
"@leafer-ui/display-module": "1.9.
|
|
28
|
-
"@leafer-ui/decorator": "1.9.
|
|
29
|
-
"@leafer-ui/external": "1.9.
|
|
25
|
+
"@leafer/core": "1.9.9",
|
|
26
|
+
"@leafer-ui/data": "1.9.9",
|
|
27
|
+
"@leafer-ui/display-module": "1.9.9",
|
|
28
|
+
"@leafer-ui/decorator": "1.9.9",
|
|
29
|
+
"@leafer-ui/external": "1.9.9"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.9.
|
|
33
|
-
"@leafer-ui/interface": "1.9.
|
|
32
|
+
"@leafer/interface": "1.9.9",
|
|
33
|
+
"@leafer-ui/interface": "1.9.9"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Box.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaferCanvas, IRenderOptions, IBoolean, INumber, IScrollPointData } from '@leafer/interface'
|
|
1
|
+
import { ILeaferCanvas, IRenderOptions, IBoolean, INumber, IScrollPointData, IFourNumber } from '@leafer/interface'
|
|
2
2
|
import { rewrite, rewriteAble, registerUI, BoundsHelper, dataProcessor, affectRenderBoundsType, dataType, boundsType, DataHelper, getBoundsData } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { IBox, IBoxData, IBoxInputData, IOverflow, IScrollConfig, IScroller } from '@leafer-ui/interface'
|
|
@@ -52,12 +52,12 @@ export class Box<TInputData = IBoxInputData> extends Group<TInputData> implement
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
@rewrite(rect.__updateStrokeSpread)
|
|
55
|
-
public __updateStrokeSpread():
|
|
55
|
+
public __updateStrokeSpread(): IFourNumber { return 0 }
|
|
56
56
|
|
|
57
57
|
@rewrite(rect.__updateRenderSpread)
|
|
58
|
-
public __updateRectRenderSpread():
|
|
58
|
+
public __updateRectRenderSpread(): IFourNumber { return 0 }
|
|
59
59
|
|
|
60
|
-
public __updateRenderSpread():
|
|
60
|
+
public __updateRenderSpread(): IFourNumber { return this.__updateRectRenderSpread() || -1 }
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
@rewrite(rect.__updateBoxBounds)
|
package/src/Text.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaferCanvas, IBoolean, INumber, IString, IBoundsData, IUnitData, IRenderOptions } from '@leafer/interface'
|
|
1
|
+
import { ILeaferCanvas, IBoolean, INumber, IString, IBoundsData, IUnitData, IRenderOptions, IFourNumber } from '@leafer/interface'
|
|
2
2
|
import { BoundsHelper, boundsType, surfaceType, dataProcessor, registerUI, affectStrokeBoundsType, dataType, hitType, MathHelper, DataHelper } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { IFill, IText, IFontWeight, ITextCase, ITextDecoration, ITextData, ITextInputData, ITextAlign, IVerticalAlign, ITextDrawData, ITextOverflow, IStrokeAlign, IHitType, ITextWrap, IWritingMode, IBackgroundBoxStyle } from '@leafer-ui/interface'
|
|
@@ -154,10 +154,10 @@ export class Text<TConstructorData = ITextInputData> extends UI<TConstructorData
|
|
|
154
154
|
else data.__textBoxBounds = b
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
override __updateRenderSpread():
|
|
158
|
-
let
|
|
159
|
-
if (!
|
|
160
|
-
return
|
|
157
|
+
override __updateRenderSpread(): IFourNumber {
|
|
158
|
+
let spread = super.__updateRenderSpread()
|
|
159
|
+
if (!spread) spread = this.isOverflow ? 1 : 0
|
|
160
|
+
return spread
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
override __updateRenderBounds(): void {
|
package/src/UI.ts
CHANGED
|
@@ -148,7 +148,7 @@ export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements I
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
@affectRenderBoundsType(0)
|
|
151
|
-
public renderSpread?:
|
|
151
|
+
public renderSpread?: IFourNumber // 强行扩大渲染边界
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
// path
|
|
@@ -409,7 +409,7 @@ export class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements I
|
|
|
409
409
|
public reset(_data?: IUIInputData): void { }
|
|
410
410
|
|
|
411
411
|
|
|
412
|
-
// @leafer-in/animate will rewrite
|
|
412
|
+
// @leafer-in/animate and @leafer-in/state will rewrite
|
|
413
413
|
|
|
414
414
|
public set(data: IUIInputData, _transition?: ITransition | 'temp'): void {
|
|
415
415
|
if (data) Object.assign(this, data)
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IPathCommandData, IPathCommandObject, IPathString, IWindingRule, IFlowType,
|
|
1
|
+
import { IString, INumber, IBoolean, IMaskType, IEraserType, IAlign, IUnitPointData, IFourNumber, IPathCommandData, 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, IValue, IFindCondition, ILeaferCanvas, IPathDrawer, ILeaferImage, IExportFileType, IJSONOptions, IPickOptions, IPickResult, ILeaferMode, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaferConfig, IAutoBounds, IBounds, IEventListenerId, ITimer, IControl, ILeaferType, IScreenSizeData, IResizeEvent, ICanvasSizeAttr, IZoomType, IZoomOptions, IClientPointData, IRenderOptions, ICanvasContext2DSettings, ICanvasContext2D } from '@leafer/interface';
|
|
2
2
|
import { Leaf, LeafList } from '@leafer/core';
|
|
3
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, 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';
|
|
4
4
|
|
|
@@ -42,7 +42,7 @@ declare class UI<TInputData = IUIInputData> extends Leaf<TInputData> implements
|
|
|
42
42
|
around?: IAlign | IUnitPointData;
|
|
43
43
|
lazy?: IBoolean;
|
|
44
44
|
pixelRatio?: INumber;
|
|
45
|
-
renderSpread?:
|
|
45
|
+
renderSpread?: IFourNumber;
|
|
46
46
|
path?: IPathCommandData | IPathCommandObject[] | IPathString;
|
|
47
47
|
windingRule?: IWindingRule;
|
|
48
48
|
closed?: boolean;
|
|
@@ -290,9 +290,9 @@ declare class Box<TInputData = IBoxInputData> extends Group<TInputData> implemen
|
|
|
290
290
|
scroller?: IScroller;
|
|
291
291
|
hasScroller?: boolean;
|
|
292
292
|
constructor(data?: TInputData);
|
|
293
|
-
__updateStrokeSpread():
|
|
294
|
-
__updateRectRenderSpread():
|
|
295
|
-
__updateRenderSpread():
|
|
293
|
+
__updateStrokeSpread(): IFourNumber;
|
|
294
|
+
__updateRectRenderSpread(): IFourNumber;
|
|
295
|
+
__updateRenderSpread(): IFourNumber;
|
|
296
296
|
__updateRectBoxBounds(): void;
|
|
297
297
|
__updateBoxBounds(_secondLayout?: boolean): void;
|
|
298
298
|
__updateStrokeBounds(): void;
|
|
@@ -423,7 +423,7 @@ declare class Text<TConstructorData = ITextInputData> extends UI<TConstructorDat
|
|
|
423
423
|
get textDrawData(): ITextDrawData;
|
|
424
424
|
__updateTextDrawData(): void;
|
|
425
425
|
__updateBoxBounds(): void;
|
|
426
|
-
__updateRenderSpread():
|
|
426
|
+
__updateRenderSpread(): IFourNumber;
|
|
427
427
|
__updateRenderBounds(): void;
|
|
428
428
|
__updateChange(): void;
|
|
429
429
|
__drawRenderPath(canvas: ILeaferCanvas): void;
|