Commit 5b256525 authored by Big Bad Waffle's avatar Big Bad Waffle

fixed the passive tree not always working #337

parent aabf44a7
......@@ -77,7 +77,7 @@ define([
events.on('onGetMap', this.onGetMap.bind(this));
events.on('onToggleFullscreen', this.toggleScreen.bind(this));
let zoom = window.devicePixelRatio;
let zoom = window.devicePixelRatio;
this.width = $('body').width() * zoom;
this.height = $('body').height() * zoom;
......
......@@ -69,9 +69,11 @@ define([
display: 'block'
});
let zoom = window.devicePixelRatio;
this.canvas = this.find('.canvas')[0];
this.size.w = this.canvas.width = this.find('.bottom').width();
this.size.h = this.canvas.height = this.find('.bottom').height();
this.size.w = this.canvas.width = this.find('.bottom').width() * zoom;
this.size.h = this.canvas.height = this.find('.bottom').height() * zoom;
this.ctx = this.canvas.getContext('2d');
//Reset styles after determining size
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment