@leafer/display 1.9.6 → 1.9.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 +12 -12
- package/src/Branch.ts +3 -3
- package/src/Leaf.ts +7 -5
- package/types/index.d.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8",
|
|
4
4
|
"description": "@leafer/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/math": "1.9.
|
|
26
|
-
"@leafer/data": "1.9.
|
|
27
|
-
"@leafer/layout": "1.9.
|
|
28
|
-
"@leafer/display-module": "1.9.
|
|
29
|
-
"@leafer/event": "1.9.
|
|
30
|
-
"@leafer/decorator": "1.9.
|
|
31
|
-
"@leafer/helper": "1.9.
|
|
32
|
-
"@leafer/image": "1.9.
|
|
33
|
-
"@leafer/debug": "1.9.
|
|
34
|
-
"@leafer/platform": "1.9.
|
|
25
|
+
"@leafer/math": "1.9.8",
|
|
26
|
+
"@leafer/data": "1.9.8",
|
|
27
|
+
"@leafer/layout": "1.9.8",
|
|
28
|
+
"@leafer/display-module": "1.9.8",
|
|
29
|
+
"@leafer/event": "1.9.8",
|
|
30
|
+
"@leafer/decorator": "1.9.8",
|
|
31
|
+
"@leafer/helper": "1.9.8",
|
|
32
|
+
"@leafer/image": "1.9.8",
|
|
33
|
+
"@leafer/debug": "1.9.8",
|
|
34
|
+
"@leafer/platform": "1.9.8"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@leafer/interface": "1.9.
|
|
37
|
+
"@leafer/interface": "1.9.8"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/Branch.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBoundsData, ILeaf } from '@leafer/interface'
|
|
1
|
+
import { IBoundsData, IFourNumber, ILeaf } from '@leafer/interface'
|
|
2
2
|
import { ChildEvent } from '@leafer/event'
|
|
3
3
|
import { BoundsHelper } from '@leafer/math'
|
|
4
4
|
import { BranchHelper, LeafBoundsHelper } from '@leafer/helper'
|
|
@@ -21,7 +21,7 @@ export class Branch extends Leaf { // tip: rewrited Group
|
|
|
21
21
|
|
|
22
22
|
// overwrite
|
|
23
23
|
|
|
24
|
-
public __updateStrokeSpread():
|
|
24
|
+
public __updateStrokeSpread(): IFourNumber {
|
|
25
25
|
const { children } = this
|
|
26
26
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
27
27
|
if (children[i].__layout.strokeSpread) return 1
|
|
@@ -29,7 +29,7 @@ export class Branch extends Leaf { // tip: rewrited Group
|
|
|
29
29
|
return 0
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
public __updateRenderSpread():
|
|
32
|
+
public __updateRenderSpread(): IFourNumber {
|
|
33
33
|
const { children } = this
|
|
34
34
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
35
35
|
if (children[i].__layout.renderSpread) return 1
|
package/src/Leaf.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ILeaferBase, ILeaf, ILeafInputData, ILeafData, ILeaferCanvas, IRenderOptions, IBoundsType, ILocationType, IMatrixWithBoundsData, ILayoutBoundsData, IValue, ILeafLayout, InnerId, IHitCanvas, IRadiusPointData, IEventListenerMap, IEventListener, IEventListenerId, IEvent, IObject, IFunction, IPointData, IBoundsData, IBranch, IFindMethod, IMatrixData, IAttrDecorator, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAlign, IJSONOptions, IEventParamsMap, IEventOption, IAxis, IMotionPathData, IUnitData, IRotationPointData, ITransition, IValueFunction, IEventParams, IScaleData, IScaleFixed } from '@leafer/interface'
|
|
1
|
+
import { ILeaferBase, ILeaf, ILeafInputData, ILeafData, ILeaferCanvas, IRenderOptions, IBoundsType, ILocationType, IMatrixWithBoundsData, ILayoutBoundsData, IValue, ILeafLayout, InnerId, IHitCanvas, IRadiusPointData, IEventListenerMap, IEventListener, IEventListenerId, IEvent, IObject, IFunction, IPointData, IBoundsData, IBranch, IFindMethod, IMatrixData, IAttrDecorator, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAlign, IJSONOptions, IEventParamsMap, IEventOption, IAxis, IMotionPathData, IUnitData, IRotationPointData, ITransition, IValueFunction, IEventParams, IScaleData, IScaleFixed, IFourNumber } from '@leafer/interface'
|
|
2
2
|
import { BoundsHelper, IncrementId, MatrixHelper, PointHelper } from '@leafer/math'
|
|
3
|
-
import { LeafData, isUndefined } from '@leafer/data'
|
|
3
|
+
import { LeafData, isUndefined, DataHelper } from '@leafer/data'
|
|
4
4
|
import { LeafLayout } from '@leafer/layout'
|
|
5
5
|
import { LeafDataProxy, LeafMatrix, LeafBounds, LeafEventer, LeafRender } from '@leafer/display-module'
|
|
6
6
|
import { boundsType, useModule, defineDataProcessor } from '@leafer/decorator'
|
|
@@ -12,6 +12,7 @@ import { Plugin } from '@leafer/debug'
|
|
|
12
12
|
|
|
13
13
|
const tempScaleData = {} as IScaleData
|
|
14
14
|
const { LEAF, create } = IncrementId
|
|
15
|
+
const { stintSet } = DataHelper
|
|
15
16
|
const { toInnerPoint, toOuterPoint, multiplyParent } = MatrixHelper
|
|
16
17
|
const { toOuterOf } = BoundsHelper
|
|
17
18
|
const { copy, move } = PointHelper
|
|
@@ -305,9 +306,9 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
|
|
|
305
306
|
public __updateNaturalSize(): void { }
|
|
306
307
|
|
|
307
308
|
|
|
308
|
-
public __updateStrokeSpread():
|
|
309
|
+
public __updateStrokeSpread(): IFourNumber { return 0 }
|
|
309
310
|
|
|
310
|
-
public __updateRenderSpread():
|
|
311
|
+
public __updateRenderSpread(): IFourNumber { return 0 }
|
|
311
312
|
|
|
312
313
|
public __onUpdateSize(): void { }
|
|
313
314
|
|
|
@@ -346,7 +347,8 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
|
|
|
346
347
|
const cameraWorld = this.__cameraWorld, world = this.__world
|
|
347
348
|
multiplyParent(world, options.matrix, cameraWorld, undefined, world)
|
|
348
349
|
toOuterOf(this.__layout.renderBounds, cameraWorld, cameraWorld)
|
|
349
|
-
cameraWorld
|
|
350
|
+
stintSet(cameraWorld, 'half', world.half)
|
|
351
|
+
stintSet(cameraWorld, 'ignorePixelSnap', world.ignorePixelSnap)
|
|
350
352
|
return cameraWorld
|
|
351
353
|
} else {
|
|
352
354
|
return this.__world
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeafInputData, ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventParamsMap, IEventListenerMap, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, IScaleFixed, IScaleData, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, ITransition, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventParams, IEventListener, IEventOption, IEventListenerId, IEvent, IValueFunction, IAttrDecorator } from '@leafer/interface';
|
|
1
|
+
import { ILeafInputData, ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventParamsMap, IEventListenerMap, IFunction, IObject, IValue, IJSONOptions, IFindMethod, IFourNumber, ILeaferCanvas, IRenderOptions, IScaleFixed, IScaleData, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, ITransition, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventParams, IEventListener, IEventOption, IEventListenerId, IEvent, IValueFunction, IAttrDecorator } from '@leafer/interface';
|
|
2
2
|
import { LeafData } from '@leafer/data';
|
|
3
3
|
import { LeafLayout } from '@leafer/layout';
|
|
4
4
|
|
|
@@ -103,8 +103,8 @@ declare class Leaf<TInputData = ILeafInputData> implements ILeaf {
|
|
|
103
103
|
__updateAutoLayout(): void;
|
|
104
104
|
__updateFlowLayout(): void;
|
|
105
105
|
__updateNaturalSize(): void;
|
|
106
|
-
__updateStrokeSpread():
|
|
107
|
-
__updateRenderSpread():
|
|
106
|
+
__updateStrokeSpread(): IFourNumber;
|
|
107
|
+
__updateRenderSpread(): IFourNumber;
|
|
108
108
|
__onUpdateSize(): void;
|
|
109
109
|
__updateEraser(value?: boolean): void;
|
|
110
110
|
__renderEraser(canvas: ILeaferCanvas, options: IRenderOptions): void;
|
|
@@ -195,8 +195,8 @@ declare class Leaf<TInputData = ILeafInputData> implements ILeaf {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
declare class Branch extends Leaf {
|
|
198
|
-
__updateStrokeSpread():
|
|
199
|
-
__updateRenderSpread():
|
|
198
|
+
__updateStrokeSpread(): IFourNumber;
|
|
199
|
+
__updateRenderSpread(): IFourNumber;
|
|
200
200
|
__updateBoxBounds(_secondLayout?: boolean, bounds?: IBoundsData): void;
|
|
201
201
|
__updateStrokeBounds(bounds?: IBoundsData): void;
|
|
202
202
|
__updateRenderBounds(bounds?: IBoundsData): void;
|