Skip to content

Commit e18e95e

Browse files
authored
Merge pull request #762 from jonobr1/761-skia-canvas
Fix constructor to match Skia Canvas spec
2 parents b295cde + 9153f14 commit e18e95e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/two.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ export default class Two {
250250
_.extend(this.renderer.domElement.style, {
251251
display: 'block',
252252
});
253-
} else if (!_.isElement(params.domElement)) {
253+
} else if (
254+
typeof params.width === 'number' &&
255+
typeof params.height === 'number'
256+
) {
254257
this.renderer.setSize(params.width, params.height, this.ratio);
255258
this.width = params.width;
256259
this.height = params.height;

0 commit comments

Comments
 (0)