@leafer-ui/app 1.0.0-rc.4 → 1.0.0-rc.6
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 -7
- package/src/Leafer.ts +5 -5
- package/types/index.d.ts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/app",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.6",
|
|
4
4
|
"description": "@leafer-ui/app",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.0.0-rc.
|
|
26
|
-
"@leafer-ui/display": "1.0.0-rc.
|
|
27
|
-
"@leafer-ui/type": "1.0.0-rc.
|
|
28
|
-
"@leafer-ui/data": "1.0.0-rc.
|
|
25
|
+
"@leafer/core": "1.0.0-rc.6",
|
|
26
|
+
"@leafer-ui/display": "1.0.0-rc.6",
|
|
27
|
+
"@leafer-ui/type": "1.0.0-rc.6",
|
|
28
|
+
"@leafer-ui/data": "1.0.0-rc.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@leafer/interface": "1.0.0-rc.
|
|
32
|
-
"@leafer-ui/interface": "1.0.0-rc.
|
|
31
|
+
"@leafer/interface": "1.0.0-rc.6",
|
|
32
|
+
"@leafer-ui/interface": "1.0.0-rc.6"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/Leafer.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApp, ILeafer, ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, ILeaf, IEventListenerId,
|
|
1
|
+
import { IApp, ILeafer, ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IAutoBounds, IScreenSizeData, IResizeEvent, ILeaf, IEventListenerId, ITimer, __Value, IObject, IControl, IPointData } from '@leafer/interface'
|
|
2
2
|
import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, HitCanvasManager, ImageManager, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, PluginManager, WaitHelper, WatchEvent } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { ILeaferInputData, ILeaferData, IFunction, IUIInputData } from '@leafer-ui/interface'
|
|
@@ -49,8 +49,6 @@ export class Leafer extends Group implements ILeafer {
|
|
|
49
49
|
public hitCanvasManager?: IHitCanvasManager
|
|
50
50
|
|
|
51
51
|
public zoomLayer: ILeaf = this
|
|
52
|
-
public moveLayer: ILeaf = this
|
|
53
|
-
public transformData?: ITransformEventData
|
|
54
52
|
|
|
55
53
|
public userConfig: ILeaferConfig
|
|
56
54
|
public config: ILeaferConfig = {
|
|
@@ -71,6 +69,9 @@ export class Leafer extends Group implements ILeafer {
|
|
|
71
69
|
|
|
72
70
|
public autoLayout?: IAutoBounds
|
|
73
71
|
|
|
72
|
+
public get cursorPoint(): IPointData { return (this.interaction && this.interaction.hoverData) || { x: this.width / 2, y: this.height / 2 } }
|
|
73
|
+
public leafs = 0
|
|
74
|
+
|
|
74
75
|
public __eventIds: IEventListenerId[] = []
|
|
75
76
|
protected __startTimer: ITimer
|
|
76
77
|
protected __controllers: IControl[] = []
|
|
@@ -209,9 +210,8 @@ export class Leafer extends Group implements ILeafer {
|
|
|
209
210
|
this.__level = 1
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
public setZoomLayer(zoomLayer: ILeaf
|
|
213
|
+
public setZoomLayer(zoomLayer: ILeaf): void {
|
|
213
214
|
this.zoomLayer = zoomLayer
|
|
214
|
-
this.moveLayer = moveLayer || zoomLayer
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
protected __checkAutoLayout(config: ILeaferConfig): void {
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApp, ILeaferConfig, ILeaferCanvas, IRenderOptions, IResizeEvent, ILeafer, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaf,
|
|
1
|
+
import { IApp, ILeaferConfig, ILeaferCanvas, IRenderOptions, IResizeEvent, ILeafer, IRenderer, IWatcher, ILayouter, ISelector, IInteraction, ICanvasManager, IHitCanvasManager, ILeaf, IAutoBounds, IPointData, IEventListenerId, ITimer, IControl, IScreenSizeData, __Value } from '@leafer/interface';
|
|
2
2
|
import { RenderEvent } from '@leafer/core';
|
|
3
3
|
import { ILeaferData, IFunction, ILeaferInputData, IUIInputData } from '@leafer-ui/interface';
|
|
4
4
|
import { Group } from '@leafer-ui/display';
|
|
@@ -48,11 +48,11 @@ declare class Leafer extends Group implements ILeafer {
|
|
|
48
48
|
canvasManager: ICanvasManager;
|
|
49
49
|
hitCanvasManager?: IHitCanvasManager;
|
|
50
50
|
zoomLayer: ILeaf;
|
|
51
|
-
moveLayer: ILeaf;
|
|
52
|
-
transformData?: ITransformEventData;
|
|
53
51
|
userConfig: ILeaferConfig;
|
|
54
52
|
config: ILeaferConfig;
|
|
55
53
|
autoLayout?: IAutoBounds;
|
|
54
|
+
get cursorPoint(): IPointData;
|
|
55
|
+
leafs: number;
|
|
56
56
|
__eventIds: IEventListenerId[];
|
|
57
57
|
protected __startTimer: ITimer;
|
|
58
58
|
protected __controllers: IControl[];
|
|
@@ -74,7 +74,7 @@ declare class Leafer extends Group implements ILeafer {
|
|
|
74
74
|
protected __setApp(): void;
|
|
75
75
|
protected __bindApp(app: IApp): void;
|
|
76
76
|
__setLeafer(leafer: ILeafer): void;
|
|
77
|
-
setZoomLayer(zoomLayer: ILeaf
|
|
77
|
+
setZoomLayer(zoomLayer: ILeaf): void;
|
|
78
78
|
protected __checkAutoLayout(config: ILeaferConfig): void;
|
|
79
79
|
__setAttr(attrName: string, newValue: __Value): void;
|
|
80
80
|
__getAttr(attrName: string): __Value;
|