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

@leafer-ui/export

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer-ui/export - npm Package Compare versions

Comparing version
1.0.0-rc.17
to
1.0.0-rc.18
+4
-4
package.json
{
"name": "@leafer-ui/export",
"version": "1.0.0-rc.17",
"version": "1.0.0-rc.18",
"description": "@leafer-ui/export",

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

"dependencies": {
"@leafer/core": "1.0.0-rc.17"
"@leafer/core": "1.0.0-rc.18"
},
"devDependencies": {
"@leafer/interface": "1.0.0-rc.17",
"@leafer-ui/interface": "1.0.0-rc.17"
"@leafer/interface": "1.0.0-rc.18",
"@leafer-ui/interface": "1.0.0-rc.18"
}
}

@@ -1,2 +0,2 @@

import { IExportFileType, IFunction, IRenderOptions, IBoundsData, IBounds, ILocationType } from '@leafer/interface'
import { IExportFileType, IFunction, IRenderOptions, IBoundsData, IBounds, ILocationType, ILeaf } from '@leafer/interface'
import { Creator, Matrix, TaskProcessor, FileHelper, Bounds } from '@leafer/core'

@@ -42,3 +42,3 @@

} else {
const location: ILocationType = options.location || ((isLeafer || isFrame) ? 'inner' : 'local')
let relative: ILocationType | ILeaf = options.relative || (isLeafer ? 'inner' : 'local')

@@ -48,3 +48,3 @@ scaleX = worldTransform.scaleX

switch (location) {
switch (relative) {
case 'inner':

@@ -62,10 +62,17 @@ matrix.set(worldTransform).invert()

break
case 'page':
relative = leaf.leafer
default:
matrix.set(worldTransform).divide(leaf.getTransform(relative)).invert()
const l = relative.worldTransform
scaleX /= scaleX / l.scaleX
scaleY /= scaleY / l.scaleY
}
renderBounds = leaf.getBounds('render', location)
renderBounds = leaf.getBounds('render', relative)
}
const { x, y, width, height } = new Bounds(renderBounds).scale(scale).ceil()
const { x, y, width, height } = new Bounds(renderBounds).scale(scale)
let canvas = Creator.canvas({ width, height, pixelRatio })
let canvas = Creator.canvas({ width: Math.round(width), height: Math.round(height), pixelRatio })
const renderOptions: IRenderOptions = { matrix: matrix.scale(scale).translate(-x, -y).withScale(1 / scaleX * scale, 1 / scaleY * scale) }

@@ -72,0 +79,0 @@