@leafer/math
Advanced tools
+3
-3
| { | ||
| "name": "@leafer/math", | ||
| "version": "1.9.1", | ||
| "version": "1.9.2", | ||
| "description": "@leafer/math", | ||
@@ -25,5 +25,5 @@ "author": "Chao (Leafer) Wan", | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.9.1", | ||
| "@leafer/data": "1.9.1" | ||
| "@leafer/interface": "1.9.2", | ||
| "@leafer/data": "1.9.2" | ||
| } | ||
| } |
@@ -1,2 +0,2 @@ | ||
| import { IPointData, IBoundsData, IMatrixData, IFourNumber, IBoundsDataFn, IObject, IMatrix, IOffsetBoundsData, IRadiusPointData, IMatrixWithScaleData, ISide, IAlign, ISizeData } from '@leafer/interface' | ||
| import { IPointData, IBoundsData, IMatrixData, IFourNumber, IBoundsDataFn, IObject, IMatrix, IOffsetBoundsData, IRadiusPointData, IMatrixWithScaleData, ISide, IAlign, ISizeData, IScrollPointData } from '@leafer/interface' | ||
| import { isArray, isString } from '@leafer/data' | ||
@@ -73,2 +73,9 @@ | ||
| scroll(t: IBoundsData, data: IScrollPointData): void { | ||
| if (data.scrollY || data.scrollX) { | ||
| t.x += data.scrollX | ||
| t.y += data.scrollY | ||
| } | ||
| }, | ||
| getByMove(t: IBoundsData, x: number, y: number): IBoundsData { | ||
@@ -75,0 +82,0 @@ t = { ...t } |
@@ -1,2 +0,2 @@ | ||
| import { IMatrixData, IPointData, ILayoutData, IMatrixWithLayoutData, IMatrixWithOptionScaleData, IScaleData, IMatrixWithScaleData, IScrollPointData } from '@leafer/interface' | ||
| import { IMatrixData, IPointData, ILayoutData, IMatrixWithLayoutData, IMatrixWithOptionScaleData, IScaleData, IMatrixWithScaleData } from '@leafer/interface' | ||
| import { isUndefined } from '@leafer/data' | ||
@@ -139,5 +139,4 @@ | ||
| multiplyParent(t: IMatrixWithOptionScaleData, parent: IMatrixWithOptionScaleData, to?: IMatrixWithOptionScaleData, abcdChanged?: boolean | number, childScaleData?: IScaleData, scrollData?: IScrollPointData): void { // = transform | ||
| let { e, f } = t | ||
| if (scrollData) e += scrollData.scrollX, f += scrollData.scrollY | ||
| multiplyParent(t: IMatrixWithOptionScaleData, parent: IMatrixWithOptionScaleData, to?: IMatrixWithOptionScaleData, abcdChanged?: boolean | number, childScaleData?: IScaleData): void { // = transform | ||
| const { e, f } = t | ||
@@ -144,0 +143,0 @@ to || (to = t) |
+3
-2
@@ -1,2 +0,2 @@ | ||
| import { INumberMap, IPoint, IPointData, IMatrixData, IBounds, IBoundsData, IMatrix, IAlign, IFourNumber, ISide, IObject, IBoundsDataFn, IRadiusPointData, IMatrixWithLayoutData, IAutoBounds, IAutoBoundsData, ISizeData, IMatrixWithScaleData, ILayoutData, IUnitPointData, IAround, IOffsetBoundsData, ITwoPointBoundsData, IRangeSize, IOptionSizeData, IScaleData, IMatrixWithOptionScaleData, IScrollPointData } from '@leafer/interface'; | ||
| import { INumberMap, IPoint, IPointData, IMatrixData, IBounds, IBoundsData, IMatrix, IAlign, IFourNumber, ISide, IObject, IBoundsDataFn, IRadiusPointData, IMatrixWithLayoutData, IAutoBounds, IAutoBoundsData, ISizeData, IMatrixWithScaleData, ILayoutData, IUnitPointData, IAround, IScrollPointData, IOffsetBoundsData, ITwoPointBoundsData, IRangeSize, IOptionSizeData, IScaleData, IMatrixWithOptionScaleData } from '@leafer/interface'; | ||
@@ -194,2 +194,3 @@ declare const IncrementId: { | ||
| move(t: IBoundsData, x: number, y: number): void; | ||
| scroll(t: IBoundsData, data: IScrollPointData): void; | ||
| getByMove(t: IBoundsData, x: number, y: number): IBoundsData; | ||
@@ -282,3 +283,3 @@ toOffsetOutBounds(t: IBoundsData, to?: IOffsetBoundsData, parent?: IBoundsData): void; | ||
| multiply(t: IMatrixData, child: IMatrixData): void; | ||
| multiplyParent(t: IMatrixWithOptionScaleData, parent: IMatrixWithOptionScaleData, to?: IMatrixWithOptionScaleData, abcdChanged?: boolean | number, childScaleData?: IScaleData, scrollData?: IScrollPointData): void; | ||
| multiplyParent(t: IMatrixWithOptionScaleData, parent: IMatrixWithOptionScaleData, to?: IMatrixWithOptionScaleData, abcdChanged?: boolean | number, childScaleData?: IScaleData): void; | ||
| divide(t: IMatrixData, child: IMatrixData): void; | ||
@@ -285,0 +286,0 @@ divideParent(t: IMatrixData, parent: IMatrixData): void; |
68559
0.16%1620
0.37%