@gush/candybar
Advanced tools
Comparing version 0.0.0-alpha5 to 0.0.0-alpha6
@@ -340,2 +340,3 @@ 'use strict'; | ||
var canvas = _ref.canvas, | ||
container = _ref.container, | ||
_ref$entities = _ref.entities, | ||
@@ -351,2 +352,8 @@ entities = _ref$entities === undefined ? [] : _ref$entities, | ||
if (_this.container) { | ||
w = _this.container.clientWidth; | ||
h = _this.container.clientHeight; | ||
} | ||
var w2 = w * _this.dpr; | ||
@@ -358,2 +365,5 @@ var h2 = h * _this.dpr; | ||
_this.canvas.style.height = h + 'px'; | ||
_this.canvas.style.position = 'absolute'; | ||
_this.canvas.style.top = 0; | ||
_this.canvas.style.left = 0; | ||
_this.bounds = new Bounds(0, 0, w2, h2); | ||
@@ -388,2 +398,4 @@ }; | ||
this.canvas = canvas; | ||
this.container = container; | ||
this.dpr = window.devicePixelRatio || 1; | ||
@@ -390,0 +402,0 @@ this.ctx = canvas.getContext('2d'); |
{ | ||
"name": "@gush/candybar", | ||
"version": "0.0.0-alpha5", | ||
"version": "0.0.0-alpha6", | ||
"description": "๐ซ", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
50908
510