Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Commit 802a205

Browse files
author
Tony Dalbrekt
committed
Upgraded canvas to 2.4.1 and ejs to 1.0.0
1 parent 4a6ea9b commit 802a205

3 files changed

Lines changed: 595 additions & 9 deletions

File tree

‎lib/image.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var filters = {
4949

5050
function getBoundingBox(diagram) {
5151
var Canvas = require('canvas'),
52-
_canvas = new Canvas(1, 1),
52+
_canvas = Canvas.createCanvas(1, 1),
5353
ctx = _canvas.getContext('2d'),
5454
canvas = new mdjson.Graphics.Canvas(ctx);
5555
var boundingBox = diagram.getBoundingBox(canvas);
@@ -63,7 +63,7 @@ function getImageData(diagram, type) {
6363
boundingBox.expand(rectExpand);
6464

6565
var Canvas = require('canvas'),
66-
_canvas = new Canvas(boundingBox.getWidth(), boundingBox.getHeight(), type),
66+
_canvas = Canvas.createCanvas(boundingBox.getWidth(), boundingBox.getHeight(), type),
6767
ctx = _canvas.getContext('2d'),
6868
canvas = new mdjson.Graphics.Canvas(ctx);
6969

0 commit comments

Comments
 (0)