Fixed cropping issues

This commit is contained in:
Devine Lu Linvega 2019-01-09 16:51:10 +12:00
parent ac753cd9ce
commit 44eb30cad5
2 changed files with 5 additions and 5 deletions

View File

@ -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()

View File

@ -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) }