@leafer-ui/display 1.5.0 → 1.5.2
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 +10 -3
- package/src/Group.ts +9 -2
- package/src/UI.ts +1 -1
- package/types/index.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/display",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
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.5.
|
|
26
|
-
"@leafer-ui/data": "1.5.
|
|
27
|
-
"@leafer-ui/display-module": "1.5.
|
|
28
|
-
"@leafer-ui/decorator": "1.5.
|
|
29
|
-
"@leafer-ui/external": "1.5.
|
|
25
|
+
"@leafer/core": "1.5.2",
|
|
26
|
+
"@leafer-ui/data": "1.5.2",
|
|
27
|
+
"@leafer-ui/display-module": "1.5.2",
|
|
28
|
+
"@leafer-ui/decorator": "1.5.2",
|
|
29
|
+
"@leafer-ui/external": "1.5.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "1.5.
|
|
33
|
-
"@leafer-ui/interface": "1.5.
|
|
32
|
+
"@leafer/interface": "1.5.2",
|
|
33
|
+
"@leafer-ui/interface": "1.5.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/Box.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILeaferCanvas, IRenderOptions, IBoundsData, IBoolean } from '@leafer/interface'
|
|
2
|
-
import { rewrite, rewriteAble, registerUI, BoundsHelper, dataProcessor, affectRenderBoundsType, dataType } from '@leafer/core'
|
|
1
|
+
import { ILeaferCanvas, IRenderOptions, IBoundsData, IBoolean, INumber } from '@leafer/interface'
|
|
2
|
+
import { rewrite, rewriteAble, registerUI, BoundsHelper, dataProcessor, affectRenderBoundsType, dataType, boundsType } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { IBox, IBoxData, IBoxInputData, IOverflow } from '@leafer-ui/interface'
|
|
5
5
|
import { BoxData } from '@leafer-ui/data'
|
|
@@ -23,6 +23,13 @@ export class Box extends Group implements IBox {
|
|
|
23
23
|
@dataProcessor(BoxData)
|
|
24
24
|
declare public __: IBoxData
|
|
25
25
|
|
|
26
|
+
// size
|
|
27
|
+
@boundsType(100)
|
|
28
|
+
declare public width?: INumber
|
|
29
|
+
|
|
30
|
+
@boundsType(100)
|
|
31
|
+
declare public height?: INumber
|
|
32
|
+
|
|
26
33
|
@dataType(false)
|
|
27
34
|
public resizeChildren?: IBoolean
|
|
28
35
|
|
|
@@ -56,7 +63,7 @@ export class Box extends Group implements IBox {
|
|
|
56
63
|
public __updateBoxBounds(_secondLayout?: boolean): void {
|
|
57
64
|
const data = this.__
|
|
58
65
|
|
|
59
|
-
if (this.children.length) {
|
|
66
|
+
if (this.children.length && !this.pathInputed) {
|
|
60
67
|
|
|
61
68
|
if (data.__autoSide) {
|
|
62
69
|
|
package/src/Group.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IJSONOptions, IPickOptions, IPickResult, IPointData, ITransition } from '@leafer/interface'
|
|
2
|
-
import { Branch, useModule, dataProcessor, registerUI } from '@leafer/core'
|
|
1
|
+
import { IJSONOptions, IPickOptions, IPickResult, IPointData, INumber, ITransition } from '@leafer/interface'
|
|
2
|
+
import { Branch, useModule, dataProcessor, registerUI, boundsType } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { IGroup, IGroupData, IGroupInputData, IUI, IUIInputData, IUIJSONData, IFindCondition, IFindUIMethod } from '@leafer-ui/interface'
|
|
5
5
|
import { GroupData } from '@leafer-ui/data'
|
|
@@ -18,6 +18,13 @@ export class Group extends UI implements IGroup { // tip: rewrited Box
|
|
|
18
18
|
@dataProcessor(GroupData)
|
|
19
19
|
declare public __: IGroupData
|
|
20
20
|
|
|
21
|
+
// size
|
|
22
|
+
@boundsType(0)
|
|
23
|
+
declare public width?: INumber
|
|
24
|
+
|
|
25
|
+
@boundsType(0)
|
|
26
|
+
declare public height?: INumber
|
|
27
|
+
|
|
21
28
|
declare public children: IUI[]
|
|
22
29
|
|
|
23
30
|
constructor(data?: IGroupInputData) {
|
package/src/UI.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -150,6 +150,8 @@ declare class Group extends UI implements IGroup {
|
|
|
150
150
|
get __tag(): string;
|
|
151
151
|
get isBranch(): boolean;
|
|
152
152
|
__: IGroupData;
|
|
153
|
+
width?: INumber;
|
|
154
|
+
height?: INumber;
|
|
153
155
|
children: IUI[];
|
|
154
156
|
constructor(data?: IGroupInputData);
|
|
155
157
|
reset(data?: IGroupInputData): void;
|
|
@@ -265,6 +267,8 @@ declare class Box extends Group implements IBox {
|
|
|
265
267
|
get __tag(): string;
|
|
266
268
|
get isBranchLeaf(): boolean;
|
|
267
269
|
__: IBoxData;
|
|
270
|
+
width?: INumber;
|
|
271
|
+
height?: INumber;
|
|
268
272
|
resizeChildren?: IBoolean;
|
|
269
273
|
textBox?: IBoolean;
|
|
270
274
|
overflow?: IOverflow;
|