Fixed issue with interface
This commit is contained in:
@@ -51,10 +51,10 @@ function Interface (dotgrid) {
|
|||||||
<svg
|
<svg
|
||||||
id="option_${name}"
|
id="option_${name}"
|
||||||
title="${name.capitalize()}"
|
title="${name.capitalize()}"
|
||||||
onmouseout="dotgrid.interface.out('${type}','${name}')"
|
onmouseout="DOTGRID.interface.out('${type}','${name}')"
|
||||||
onmouseup="dotgrid.interface.up('${type}','${name}')"
|
onmouseup="DOTGRID.interface.up('${type}','${name}')"
|
||||||
onmousedown="dotgrid.interface.down('${type}','${name}')"
|
onmousedown="DOTGRID.interface.down('${type}','${name}')"
|
||||||
onmouseover="dotgrid.interface.over('${type}','${name}')"
|
onmouseover="DOTGRID.interface.over('${type}','${name}')"
|
||||||
viewBox="0 0 300 300"
|
viewBox="0 0 300 300"
|
||||||
class="icon ${type}">
|
class="icon ${type}">
|
||||||
<path id="${name}_path" class="icon_path" d="${tool.icon}"/>${name == 'depth' ? `<path class="icon_path inactive" d=""/>` : ''}
|
<path id="${name}_path" class="icon_path" d="${tool.icon}"/>${name == 'depth' ? `<path class="icon_path inactive" d=""/>` : ''}
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ function Renderer (dotgrid) {
|
|||||||
this.drawTranslation()
|
this.drawTranslation()
|
||||||
this.drawCursor()
|
this.drawCursor()
|
||||||
this.drawPreview()
|
this.drawPreview()
|
||||||
this.drawDebug()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.clear = function () {
|
this.clear = function () {
|
||||||
@@ -258,12 +257,6 @@ function Renderer (dotgrid) {
|
|||||||
this.context.drawImage(img, 0, 0, this.el.width - 30, this.el.height - 30)
|
this.context.drawImage(img, 0, 0, this.el.width - 30, this.el.height - 30)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drawDebug = function () {
|
|
||||||
this.context.strokeRect(0, 0, this.el.width, this.el.height)
|
|
||||||
this.context.strokeRect((this.el.width / 2) + 15, 0, this.el.width, this.el.height)
|
|
||||||
this.context.strokeRect(0, (this.el.height / 2) + 15, 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) }
|
function isEqual (a, b) { return a && b && Math.abs(a.x) == Math.abs(b.x) && Math.abs(a.y) == Math.abs(b.y) }
|
||||||
function clamp (v, min, max) { return v < min ? min : v > max ? max : v }
|
function clamp (v, min, max) { return v < min ? min : v > max ? max : v }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user