Skip to content

Commit 7462205

Browse files
committed
Merge branch 'logo-rendering' into 'master'
Fix crash when using community license. See merge request arction/lcjs/lcjs-headless!2
2 parents 04bc782 + b3dcb05 commit 7462205

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// provides a virtual dom for lcjs to use
22
import { JSDOM } from 'jsdom'
33
// font support
4-
import { registerFont } from 'canvas'
4+
import { createCanvas, registerFont, Image } from 'canvas'
55
// headless-gl that implements WebGL in Node
66
import createContext from 'gl'
77
import { polyfill as rafPolyfill } from 'raf'
@@ -80,6 +80,10 @@ dom.window.fetch = function () {
8080
// suppress alert
8181
dom.window.alert = function () { }
8282

83+
dom.window.Image = Image
84+
85+
dom.window.lcjs_setup = createCanvas
86+
8387
/**
8488
* Monkey patch a function from LightningChart interface.
8589
* Inserts the default parameters that are different from browser environment.

0 commit comments

Comments
 (0)