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

@leafer-ui/render

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-ui/render - npm Package Compare versions

Comparing version
1.7.0
to
1.8.0
+4
-4
package.json
{
"name": "@leafer-ui/render",
"version": "1.7.0",
"version": "1.8.0",
"description": "@leafer-ui/render",

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

"dependencies": {
"@leafer-ui/external": "1.7.0"
"@leafer-ui/external": "1.8.0"
},
"devDependencies": {
"@leafer/interface": "1.7.0",
"@leafer-ui/interface": "1.7.0"
"@leafer/interface": "1.8.0",
"@leafer-ui/interface": "1.8.0"
}
}

@@ -22,7 +22,7 @@ import { ILeaferCanvas, IRenderOptions } from '@leafer/interface'

const { strokeAlign, __strokeWidth } = this.__
if (!__strokeWidth) return
const { strokeAlign, __strokeWidth: strokeWidth } = this.__
if (!strokeWidth) return
canvas.setStroke(stroke, __strokeWidth, this.__)
const half = __strokeWidth / 2
canvas.setStroke(stroke, strokeWidth, this.__)
const half = strokeWidth / 2

@@ -34,3 +34,3 @@ switch (strokeAlign) {

case 'inside':
width -= __strokeWidth, height -= __strokeWidth
width -= strokeWidth, height -= strokeWidth
if (width < 0 || height < 0) {

@@ -44,3 +44,3 @@ canvas.save()

case 'outside':
canvas.strokeRect(x - half, y - half, width + __strokeWidth, height + __strokeWidth)
canvas.strokeRect(x - half, y - half, width + strokeWidth, height + strokeWidth)
break

@@ -47,0 +47,0 @@ }

@@ -22,3 +22,3 @@ import { ILeaferCanvas, IRenderOptions } from '@leafer/interface'

const { shadow, fill, stroke } = data, otherEffect = data.innerShadow || data.blur || data.backgroundBlur || data.filter
stintSet(data, '__isFastShadow', shadow && !otherEffect && shadow.length < 2 && !shadow[0].spread && !(shadow[0].box && data.__isTransparentFill) && fill && !(fill instanceof Array && fill.length > 1) && (this.useFastShadow || !stroke || (stroke && data.strokeAlign === 'inside')))
stintSet(data, '__isFastShadow', shadow && !otherEffect && shadow.length < 2 && !shadow[0].spread && fill && !data.__isTransparentFill && !(fill instanceof Array && fill.length > 1) && (this.useFastShadow || !stroke || (stroke && data.strokeAlign === 'inside'))) // 高性能阴影条件, @leafer-ui/image check.ts 中的 allowDraw 逻辑需与此处关联
data.__useEffect = !!(shadow || otherEffect)

@@ -25,0 +25,0 @@ }