Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@leafer/platform

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/platform - npm Package Compare versions

Comparing version
1.12.3
to
1.12.4
+4
-4
package.json
{
"name": "@leafer/platform",
"version": "1.12.3",
"version": "1.12.4",
"description": "@leafer/platform",

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

"dependencies": {
"@leafer/data": "1.12.3",
"@leafer/debug": "1.12.3"
"@leafer/data": "1.12.4",
"@leafer/debug": "1.12.4"
},
"devDependencies": {
"@leafer/interface": "1.12.3"
"@leafer/interface": "1.12.4"
}
}

@@ -36,7 +36,9 @@ import { IPlatform, IObject, IBoundsData, ICanvasPattern, IMatrixData, ILeaferImagePatternPaint, ISizeData, ICanvasContext2D } from '@leafer/interface'

ctx.imageSmoothingEnabled = smooth === false ? false : true // 平滑绘制
if (clip) {
const scaleX = width / clip.width, scaleY = height / clip.height
ctx.setTransform(scaleX, 0, 0, scaleY, -clip.x * scaleX, -clip.y * scaleY)
ctx.drawImage(image, 0, 0, image.width, image.height)
} else ctx.drawImage(image, 0, 0, width, height)
if (image) {
if (clip) {
const scaleX = width / clip.width, scaleY = height / clip.height
ctx.setTransform(scaleX, 0, 0, scaleY, -clip.x * scaleX, -clip.y * scaleY)
ctx.drawImage(image, 0, 0, image.width, image.height)
} else ctx.drawImage(image, 0, 0, width, height)
}
return canvas

@@ -43,0 +45,0 @@ },