From 44eb30cad588a5f51b26bb5f44e055279346420a Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 9 Jan 2019 16:51:10 +1200 Subject: [PATCH] Fixed cropping issues --- desktop/sources/scripts/manager.js | 8 ++++---- desktop/sources/scripts/renderer.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/sources/scripts/manager.js b/desktop/sources/scripts/manager.js index b31d45f..01860f9 100644 --- a/desktop/sources/scripts/manager.js +++ b/desktop/sources/scripts/manager.js @@ -19,10 +19,10 @@ function Manager (dotgrid) { } this.update = function () { - this.el.setAttribute('width', (DOTGRID.tool.settings.size.width) + 'px') - this.el.setAttribute('height', (DOTGRID.tool.settings.size.height) + 'px') - this.el.style.width = (DOTGRID.tool.settings.size.width) - this.el.style.height = DOTGRID.tool.settings.size.height + this.el.setAttribute('width', (DOTGRID.tool.settings.size.width + 15) + 'px') + this.el.setAttribute('height', (DOTGRID.tool.settings.size.height + 15) + 'px') + this.el.style.width = (DOTGRID.tool.settings.size.width + 15) + this.el.style.height = DOTGRID.tool.settings.size.height + 15 const styles = DOTGRID.tool.styles const paths = DOTGRID.tool.paths() diff --git a/desktop/sources/scripts/renderer.js b/desktop/sources/scripts/renderer.js index e71bb11..f7ed476 100644 --- a/desktop/sources/scripts/renderer.js +++ b/desktop/sources/scripts/renderer.js @@ -254,7 +254,7 @@ function Renderer (dotgrid) { this.drawRender = function () { let img = new Image() img.src = dotgrid.manager.svg64() - this.context.drawImage(img, 0, 0, this.el.width - 30, this.el.height - 30) + this.context.drawImage(img, 0, 0, this.el.width, this.el.height) } function isEqual (a, b) { return a && b && Math.abs(a.x) == Math.abs(b.x) && Math.abs(a.y) == Math.abs(b.y) }