@leafer/display-module 1.9.7 → 1.9.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/display-module",
3
- "version": "1.9.7",
3
+ "version": "1.9.9",
4
4
  "description": "@leafer/display-module",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,13 +22,13 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/helper": "1.9.7",
26
- "@leafer/event": "1.9.7",
27
- "@leafer/math": "1.9.7",
28
- "@leafer/data": "1.9.7",
29
- "@leafer/debug": "1.9.7"
25
+ "@leafer/helper": "1.9.9",
26
+ "@leafer/event": "1.9.9",
27
+ "@leafer/math": "1.9.9",
28
+ "@leafer/data": "1.9.9",
29
+ "@leafer/debug": "1.9.9"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.9.7"
32
+ "@leafer/interface": "1.9.9"
33
33
  }
34
34
  }
package/src/LeafBounds.ts CHANGED
@@ -3,6 +3,7 @@ import { BoundsHelper } from '@leafer/math'
3
3
  import { PathBounds } from '@leafer/path'
4
4
  import { BranchHelper, LeafHelper } from '@leafer/helper'
5
5
  import { BoundsEvent } from '@leafer/event'
6
+ import { isNumber } from '@leafer/data'
6
7
 
7
8
 
8
9
  const { updateMatrix, updateAllMatrix } = LeafHelper
@@ -172,8 +173,8 @@ export const LeafBounds: ILeafBoundsModule = {
172
173
  },
173
174
 
174
175
  __updateRenderBounds(_bounds?: IBoundsData): void {
175
- const layout = this.__layout
176
- layout.renderSpread > 0 ? copyAndSpread(layout.renderBounds, layout.boxBounds, layout.renderSpread) : copy(layout.renderBounds, layout.strokeBounds) // Box use -1
176
+ const layout = this.__layout, { renderSpread } = layout
177
+ isNumber(renderSpread) && renderSpread <= 0 ? copy(layout.renderBounds, layout.strokeBounds) : copyAndSpread(layout.renderBounds, layout.boxBounds, renderSpread) // Box use -1
177
178
  }
178
179
 
179
180
  }