|
@@ -21,10 +21,10 @@
|
|
|
var _activated = true;
|
|
|
var _$body = $('body');
|
|
|
var _$container = _$body;
|
|
|
- var _dpi = window.devicePixelRatio;
|
|
|
var _$canvas = $('<canvas id="corpus-map">').appendTo(_$container);
|
|
|
var _canvas = _$canvas[0];
|
|
|
var _ctx = _canvas.getContext('2d');
|
|
|
+ var _dpi = window.devicePixelRatio;
|
|
|
var _canvas_props = {
|
|
|
// 'margin_top':90, // with red border on head
|
|
|
// 'margin_top':75, // without red border on head
|
|
@@ -95,9 +95,11 @@
|
|
|
onResizeCanvas();
|
|
|
};
|
|
|
function onResizeCanvas() {
|
|
|
- // https://medium.com/wdstack/fixing-html5-2d-canvas-blur-8ebe27db07da
|
|
|
+ _canvas.style.width = window.innerWidth;
|
|
|
+ _canvas.style.height = window.innerHeight;
|
|
|
_canvas.width = window.innerWidth*_dpi;
|
|
|
_canvas.height = window.innerHeight*_dpi;
|
|
|
+ _ctx.scale(_dpi, _dpi);
|
|
|
|
|
|
|
|
|
if(_nodes.length){
|