@leafer/layouter 1.0.0-beta.8 → 1.0.0-rc.1
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 +7 -9
- package/src/LayoutBlockData.ts +1 -3
- package/src/Layouter.ts +1 -5
- package/src/LayouterHelper.ts +1 -1
- package/types/index.d.ts +36 -0
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/layouter",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "@leafer/canvas",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
|
+
"types": "types/index.d.ts",
|
|
8
9
|
"files": [
|
|
9
|
-
"src"
|
|
10
|
+
"src",
|
|
11
|
+
"types",
|
|
12
|
+
"dist"
|
|
10
13
|
],
|
|
11
14
|
"repository": {
|
|
12
15
|
"type": "git",
|
|
@@ -19,14 +22,9 @@
|
|
|
19
22
|
"leaferjs"
|
|
20
23
|
],
|
|
21
24
|
"dependencies": {
|
|
22
|
-
"@leafer/
|
|
23
|
-
"@leafer/math": "1.0.0-beta.8",
|
|
24
|
-
"@leafer/list": "1.0.0-beta.8",
|
|
25
|
-
"@leafer/data": "1.0.0-beta.8",
|
|
26
|
-
"@leafer/helper": "1.0.0-beta.8",
|
|
27
|
-
"@leafer/debug": "1.0.0-beta.8"
|
|
25
|
+
"@leafer/core": "1.0.0-rc.1"
|
|
28
26
|
},
|
|
29
27
|
"devDependencies": {
|
|
30
|
-
"@leafer/interface": "1.0.0-
|
|
28
|
+
"@leafer/interface": "1.0.0-rc.1"
|
|
31
29
|
}
|
|
32
30
|
}
|
package/src/LayoutBlockData.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IBounds, ILayoutBlockData, ILeafList, ILeaf } from '@leafer/interface'
|
|
2
|
-
import { Bounds, BoundsHelper } from '@leafer/
|
|
3
|
-
import { LeafBoundsHelper } from '@leafer/helper'
|
|
4
|
-
import { LeafList } from '@leafer/list'
|
|
2
|
+
import { Bounds, BoundsHelper, LeafBoundsHelper, LeafList } from '@leafer/core'
|
|
5
3
|
|
|
6
4
|
|
|
7
5
|
const { worldBounds } = LeafBoundsHelper
|
package/src/Layouter.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { ILayouter, ILeaf, ILayoutBlockData, IEventListenerId, ILayouterConfig, ILeafList } from '@leafer/interface'
|
|
2
|
-
import { LayoutEvent, WatchEvent } from '@leafer/
|
|
3
|
-
import { LeafLevelList, LeafList } from '@leafer/list'
|
|
4
|
-
import { BranchHelper, LeafHelper } from '@leafer/helper'
|
|
5
|
-
import { DataHelper } from '@leafer/data'
|
|
6
|
-
import { Run, Debug } from '@leafer/debug'
|
|
2
|
+
import { LayoutEvent, WatchEvent, LeafLevelList, LeafList, BranchHelper, LeafHelper, DataHelper, Run, Debug } from '@leafer/core'
|
|
7
3
|
|
|
8
4
|
import { updateBounds, updateMatrix, updateChange } from './LayouterHelper'
|
|
9
5
|
import { LayoutBlockData } from './LayoutBlockData'
|
package/src/LayouterHelper.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILeaf, ILeafLayout, ILeafLevelList, ILeafList } from '@leafer/interface'
|
|
2
|
-
import { BranchHelper, LeafHelper } from '@leafer/
|
|
2
|
+
import { BranchHelper, LeafHelper } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
const { updateAllWorldMatrix, updateAllWorldOpacity } = LeafHelper
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ILayouter, ILeaf, ILayoutBlockData, ILayouterConfig, ILeafList, IEventListenerId } from '@leafer/interface';
|
|
2
|
+
import { LeafLevelList, WatchEvent } from '@leafer/core';
|
|
3
|
+
|
|
4
|
+
declare class Layouter implements ILayouter {
|
|
5
|
+
target: ILeaf;
|
|
6
|
+
layoutedBlocks: ILayoutBlockData[];
|
|
7
|
+
totalTimes: number;
|
|
8
|
+
times: number;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
running: boolean;
|
|
11
|
+
layouting: boolean;
|
|
12
|
+
waitAgain: boolean;
|
|
13
|
+
config: ILayouterConfig;
|
|
14
|
+
protected __updatedList: ILeafList;
|
|
15
|
+
protected __levelList: LeafLevelList;
|
|
16
|
+
protected __eventIds: IEventListenerId[];
|
|
17
|
+
constructor(target: ILeaf, userConfig?: ILayouterConfig);
|
|
18
|
+
start(): void;
|
|
19
|
+
stop(): void;
|
|
20
|
+
disable(): void;
|
|
21
|
+
layout(): void;
|
|
22
|
+
layoutAgain(): void;
|
|
23
|
+
layoutOnce(): void;
|
|
24
|
+
partLayout(): void;
|
|
25
|
+
fullLayout(): void;
|
|
26
|
+
static fullLayout(target: ILeaf): void;
|
|
27
|
+
createBlock(data: ILeafList | ILeaf[]): ILayoutBlockData;
|
|
28
|
+
getBlocks(list: ILeafList): ILayoutBlockData[];
|
|
29
|
+
addBlocks(current: ILayoutBlockData[]): void;
|
|
30
|
+
protected __onReceiveWatchData(event: WatchEvent): void;
|
|
31
|
+
protected __listenEvents(): void;
|
|
32
|
+
protected __removeListenEvents(): void;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Layouter };
|