@leafer-ui/app 1.0.0-beta.7 → 1.0.0-beta.8
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 +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/app",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.8",
|
|
4
4
|
"description": "@leafer-ui/app",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/core": "1.0.0-beta.
|
|
23
|
-
"@leafer-ui/display": "1.0.0-beta.
|
|
24
|
-
"@leafer-ui/type": "1.0.0-beta.
|
|
25
|
-
"@leafer-ui/data": "1.0.0-beta.
|
|
22
|
+
"@leafer/core": "1.0.0-beta.8",
|
|
23
|
+
"@leafer-ui/display": "1.0.0-beta.8",
|
|
24
|
+
"@leafer-ui/type": "1.0.0-beta.8",
|
|
25
|
+
"@leafer-ui/data": "1.0.0-beta.8"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@leafer/interface": "1.0.0-beta.
|
|
29
|
-
"@leafer-ui/interface": "1.0.0-beta.
|
|
28
|
+
"@leafer/interface": "1.0.0-beta.8",
|
|
29
|
+
"@leafer-ui/interface": "1.0.0-beta.8"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/Leafer.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IApp, ILeafer, ILeaferCanvas, IRenderer, ILayouter, ISelector, IWatcher, IInteraction, ILeaferConfig, ICanvasManager, IHitCanvasManager, IImageManager, IAutoBounds, IScreenSizeData, IResizeEvent, ILeaf, IEventListenerId, ITransformEventData, ITimer, __Value, IObject, IControl } from '@leafer/interface'
|
|
2
|
-
import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, HitCanvasManager, ImageManager, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, Platform } from '@leafer/core'
|
|
2
|
+
import { AutoBounds, LayoutEvent, ResizeEvent, LeaferEvent, CanvasManager, HitCanvasManager, ImageManager, DataHelper, Creator, Run, Debug, RenderEvent, registerUI, boundsType, canvasSizeAttrs, dataProcessor, Platform, PluginManager } from '@leafer/core'
|
|
3
3
|
|
|
4
4
|
import { ILeaferInputData, ILeaferData, IFunction } from '@leafer-ui/interface'
|
|
5
5
|
import { LeaferTypeCreator } from '@leafer-ui/type'
|
|
@@ -56,6 +56,7 @@ export class Leafer extends Group implements ILeafer {
|
|
|
56
56
|
type: 'design',
|
|
57
57
|
start: true,
|
|
58
58
|
hittable: true,
|
|
59
|
+
smooth: true,
|
|
59
60
|
zoom: {
|
|
60
61
|
min: 0.02,
|
|
61
62
|
max: 256
|
|
@@ -122,6 +123,8 @@ export class Leafer extends Group implements ILeafer {
|
|
|
122
123
|
this.__listenEvents()
|
|
123
124
|
|
|
124
125
|
if (start) this.__startTimer = setTimeout(this.start.bind(this))
|
|
126
|
+
|
|
127
|
+
PluginManager.onLeafer(this)
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
public start(): void {
|
|
@@ -205,6 +208,10 @@ export class Leafer extends Group implements ILeafer {
|
|
|
205
208
|
if (!this.viewLoaded) id = this.on_('render.after', check)
|
|
206
209
|
}
|
|
207
210
|
|
|
211
|
+
public receiveEvent(event: IObject): void {
|
|
212
|
+
if (this.interaction) this.interaction.receive(event)
|
|
213
|
+
}
|
|
214
|
+
|
|
208
215
|
protected __checkAutoLayout(config: ILeaferConfig): void {
|
|
209
216
|
if (!config.width || !config.height) {
|
|
210
217
|
this.autoLayout = new AutoBounds(config)
|