🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@leafer-ui/gradient

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer-ui/gradient - npm Package Compare versions

Comparing version
1.8.0
to
1.9.0
+5
-5
package.json
{
"name": "@leafer-ui/gradient",
"version": "1.8.0",
"version": "1.9.0",
"description": "@leafer-ui/gradient",

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

"dependencies": {
"@leafer/core": "1.8.0",
"@leafer-ui/draw": "1.8.0"
"@leafer/core": "1.9.0",
"@leafer-ui/draw": "1.9.0"
},
"devDependencies": {
"@leafer/interface": "1.8.0",
"@leafer-ui/interface": "1.8.0"
"@leafer/interface": "1.9.0",
"@leafer-ui/interface": "1.9.0"
}
}
import { IObject, IBoundsData, IPointData } from '@leafer/interface'
import { AroundHelper, Platform } from '@leafer/core'
import { AroundHelper, Platform, isString } from '@leafer/core'

@@ -33,3 +33,3 @@ import { IGradientPaint, ILeafPaint, IColorStop, IColorString } from '@leafer-ui/interface'

stop = stops[i]
if (typeof stop === 'string') offset = i / (len - 1), color = ColorConvert.string(stop, opacity)
if (isString(stop)) offset = i / (len - 1), color = ColorConvert.string(stop, opacity)
else offset = stop.offset, color = ColorConvert.string(stop.color, opacity)

@@ -36,0 +36,0 @@ gradient.addColorStop(offset, color)