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

@leafer/canvas

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

Comparing version
1.2.1
to
1.2.2
+9
-9
package.json
{
"name": "@leafer/canvas",
"version": "1.2.1",
"version": "1.2.2",
"description": "@leafer/canvas",

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

"dependencies": {
"@leafer/file": "1.2.1",
"@leafer/list": "1.2.1",
"@leafer/math": "1.2.1",
"@leafer/data": "1.2.1",
"@leafer/path": "1.2.1",
"@leafer/debug": "1.2.1",
"@leafer/platform": "1.2.1"
"@leafer/file": "1.2.2",
"@leafer/list": "1.2.2",
"@leafer/math": "1.2.2",
"@leafer/data": "1.2.2",
"@leafer/path": "1.2.2",
"@leafer/debug": "1.2.2",
"@leafer/platform": "1.2.2"
},
"devDependencies": {
"@leafer/interface": "1.2.1"
"@leafer/interface": "1.2.2"
}
}

@@ -89,7 +89,7 @@ import { IBounds, ILeaferCanvas, ICanvasStrokeOptions, ILeaferCanvasConfig, IExportOptions, IMatrixData, IBoundsData, IAutoBounds, IScreenSizeData, IResizeEventListener, IMatrixWithBoundsData, IPointData, InnerId, ICanvasManager, IWindingRule, IBlendMode, IExportImageType, IExportFileType, IBlob, ICursorType, ILeaferCanvasView, IRadiusPointData, IObject } from '@leafer/interface'

public resize(size: IScreenSizeData): void {
public resize(size: IScreenSizeData, safeResize = true): void {
if (this.isSameSize(size)) return
let takeCanvas: ILeaferCanvas
if (this.context && !this.unreal && this.width) {
if (this.context && !this.unreal && safeResize && this.width) {
takeCanvas = this.getSameCanvas()

@@ -96,0 +96,0 @@ takeCanvas.copyWorld(this)

@@ -112,3 +112,3 @@ import { ICanvasManager, ILeaferCanvas, IScreenSizeData, ICanvasAttr, InnerId, ICanvasContext2D, IBlendMode, IMatrixData, IPath2D, IWindingRule, ITextMetrics, IBounds, IBoundsData, ILeaferCanvasConfig, ILeaferCanvasView, IExportFileType, IExportOptions, IBlob, IExportImageType, IAutoBounds, IResizeEventListener, ICursorType, ICanvasStrokeOptions, IPointData, IRadiusPointData, IMatrixWithBoundsData, IPathDrawer } from '@leafer/interface';

saveAs(_filename: string, _quality?: number): Promise<boolean>;
resize(size: IScreenSizeData): void;
resize(size: IScreenSizeData, safeResize?: boolean): void;
updateViewSize(): void;

@@ -115,0 +115,0 @@ updateClientBounds(): void;