mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 08:46:44 +08:00
ts-ignore
This commit is contained in:
@@ -7,6 +7,7 @@ const canvas = Canvas['default'] || Canvas;
|
||||
// @ts-ignore
|
||||
global.DOMMatrix = canvas.DOMMatrix;
|
||||
|
||||
// @ts-ignore
|
||||
(global as any).Path2D ??= class Path2D {
|
||||
constructor(path: any) {
|
||||
(this as any).path = path;
|
||||
|
||||
@@ -2,8 +2,10 @@ import { Konva } from './_CoreInternals.ts';
|
||||
// @ts-ignore
|
||||
import { Canvas, DOMMatrix, Image, Path2D } from 'skia-canvas';
|
||||
|
||||
// @ts-ignore
|
||||
global.DOMMatrix = DOMMatrix as any;
|
||||
|
||||
// @ts-ignore
|
||||
global.Path2D = Path2D as any;
|
||||
Path2D.prototype.toString = () => '[object Path2D]';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user