You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/display-module

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/display-module - npm Package Compare versions

Comparing version
1.0.0-rc.19
to
1.0.0-rc.20
+6
-5
package.json
{
"name": "@leafer/display-module",
"version": "1.0.0-rc.19",
"version": "1.0.0-rc.20",
"description": "@leafer/display-module",

@@ -25,9 +25,10 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/helper": "1.0.0-rc.19",
"@leafer/event": "1.0.0-rc.19",
"@leafer/math": "1.0.0-rc.19"
"@leafer/helper": "1.0.0-rc.20",
"@leafer/event": "1.0.0-rc.20",
"@leafer/math": "1.0.0-rc.20",
"@leafer/debug": "1.0.0-rc.20"
},
"devDependencies": {
"@leafer/interface": "1.0.0-rc.19"
"@leafer/interface": "1.0.0-rc.20"
}
}

@@ -9,3 +9,3 @@ import { ILeafBoundsModule } from '@leafer/interface'

const { updateBounds } = BranchHelper
const { toOuterOf, copyAndSpread } = BoundsHelper
const { toOuterOf, copyAndSpread, copy } = BoundsHelper
const { toBounds } = PathBounds

@@ -157,5 +157,6 @@

__updateRenderBounds(): void {
copyAndSpread(this.__layout.renderBounds, this.__layout.strokeBounds, this.__layout.renderSpread)
const { renderSpread, strokeBounds, renderBounds } = this.__layout
renderSpread > 0 ? copyAndSpread(renderBounds, strokeBounds, renderSpread) : copy(renderBounds, strokeBounds) // Box use -1
},
}
import { ILeafDataProxyModule, IObject, IValue } from '@leafer/interface'
import { PropertyEvent } from '@leafer/event'
import { Debug } from '@leafer/debug'
const { isFinite } = Number
const debug = Debug.get('setAttr')
export const LeafDataProxy: ILeafDataProxyModule = {
__setAttr(name: string, newValue: IValue): void {
__setAttr(name: string, newValue: IValue, checkFiniteNumber?: boolean): boolean {
if (this.leafer && this.leafer.created) {
const oldValue = this.__.__getInput(name)
if (checkFiniteNumber && !isFinite(newValue) && newValue !== undefined) { // 警告 NaN、Infinity、-Infinity、null、非有效数字
debug.warn(this.innerName, name, newValue)
newValue = undefined // must
}
if (typeof newValue === 'object' || oldValue !== newValue) {

@@ -24,6 +34,11 @@ (this.__ as IObject)[name] = newValue

this.leafer.emitEvent(event)
return true
} else {
return false
}
} else {
(this.__ as IObject)[name] = newValue
if (this.__proxyData) this.setProxyAttr(name, newValue)
return true
}

@@ -30,0 +45,0 @@ },