@leafer/display-module
Advanced tools
+7
-7
| { | ||
| "name": "@leafer/display-module", | ||
| "version": "1.9.1", | ||
| "version": "1.9.2", | ||
| "description": "@leafer/display-module", | ||
@@ -25,11 +25,11 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/helper": "1.9.1", | ||
| "@leafer/event": "1.9.1", | ||
| "@leafer/math": "1.9.1", | ||
| "@leafer/data": "1.9.1", | ||
| "@leafer/debug": "1.9.1" | ||
| "@leafer/helper": "1.9.2", | ||
| "@leafer/event": "1.9.2", | ||
| "@leafer/math": "1.9.2", | ||
| "@leafer/data": "1.9.2", | ||
| "@leafer/debug": "1.9.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.9.1" | ||
| "@leafer/interface": "1.9.2" | ||
| } | ||
| } |
@@ -1,2 +0,2 @@ | ||
| import { ILeafBoundsModule } from '@leafer/interface' | ||
| import { ILeafBoundsModule, IBoundsData } from '@leafer/interface' | ||
| import { BoundsHelper } from '@leafer/math' | ||
@@ -122,3 +122,3 @@ import { PathBounds } from '@leafer/path' | ||
| __updateBoxBounds(): void { | ||
| __updateBoxBounds(_secondLayout?: boolean, _bounds?: IBoundsData): void { | ||
| const b = this.__layout.boxBounds | ||
@@ -170,3 +170,3 @@ const data = this.__ | ||
| __updateStrokeBounds(): void { | ||
| __updateStrokeBounds(_bounds?: IBoundsData): void { | ||
| const layout = this.__layout | ||
@@ -176,3 +176,3 @@ copyAndSpread(layout.strokeBounds, layout.boxBounds, layout.strokeBoxSpread) | ||
| __updateRenderBounds(): void { | ||
| __updateRenderBounds(_bounds?: IBoundsData): void { | ||
| const layout = this.__layout | ||
@@ -179,0 +179,0 @@ layout.renderSpread > 0 ? copyAndSpread(layout.renderBounds, layout.boxBounds, layout.renderSpread) : copy(layout.renderBounds, layout.strokeBounds) // Box use -1 |
+12
-7
| import { ILeafDataProxyModule, IObject, IValue } from '@leafer/interface' | ||
| import { PropertyEvent, LeaferEvent, leaferTransformAttrMap } from '@leafer/event' | ||
| import { PropertyEvent, extraPropertyEventMap, LeaferEvent, leaferTransformAttrMap } from '@leafer/event' | ||
| import { isObject, isFinite, isUndefined } from '@leafer/data' | ||
@@ -25,7 +25,5 @@ import { Debug } from '@leafer/debug' | ||
| const { CHANGE } = PropertyEvent | ||
| const event = new PropertyEvent(CHANGE, this, name, oldValue, newValue) | ||
| if (this.isLeafer) { | ||
| this.emitEvent(new PropertyEvent(PropertyEvent.LEAFER_CHANGE, this, name, oldValue, newValue)) | ||
| const transformEventName = leaferTransformAttrMap[name] | ||
@@ -36,8 +34,9 @@ if (transformEventName) { | ||
| } | ||
| } else { | ||
| if (this.hasEvent(CHANGE)) this.emitEvent(event) | ||
| } | ||
| this.leafer.emitEvent(event) | ||
| this.emitPropertyEvent(PropertyEvent.CHANGE, name, oldValue, newValue) | ||
| const extraPropertyEvent = extraPropertyEventMap[name] | ||
| if (extraPropertyEvent) this.emitPropertyEvent(extraPropertyEvent, name, oldValue, newValue) | ||
| return true | ||
@@ -57,2 +56,8 @@ } else { | ||
| emitPropertyEvent(type: string, name: string, oldValue: unknown, newValue: unknown): void { | ||
| const event = new PropertyEvent(type, this, name, oldValue, newValue) | ||
| this.isLeafer || (this.hasEvent(type) && this.emitEvent(event)) | ||
| this.leafer.emitEvent(event) | ||
| }, | ||
| __realSetAttr(name: string, newValue: IValue): void { | ||
@@ -59,0 +64,0 @@ const data = this.__ as IObject |
@@ -1,2 +0,2 @@ | ||
| import { ILeafMatrixModule, ILayoutData, IScrollPointData } from '@leafer/interface' | ||
| import { ILeafMatrixModule, ILayoutData } from '@leafer/interface' | ||
| import { AroundHelper, MatrixHelper } from '@leafer/math' | ||
@@ -12,5 +12,6 @@ | ||
| const { parent, __layout } = this | ||
| multiplyParent(this.__local || __layout, parent ? parent.__world : defaultWorld, this.__world, !!__layout.affectScaleOrRotation, this.__ as ILayoutData, parent && (parent.scrollY || parent.scrollX) && parent.__ as IScrollPointData) | ||
| const { parent, __layout, __world, __scrollWorld, __ } = this | ||
| multiplyParent(this.__local || __layout, parent ? (parent.__scrollWorld || parent.__world) : defaultWorld, __world, !!__layout.affectScaleOrRotation, __ as ILayoutData) | ||
| if (__scrollWorld) translateInner(Object.assign(__scrollWorld, __world), __.scrollX, __.scrollY) | ||
| }, | ||
@@ -17,0 +18,0 @@ |
16852
2.8%301
1.35%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated