Added crest mode

This commit is contained in:
Devine Lu Linvega
2019-01-10 10:43:17 +12:00
parent 8c6d338b1a
commit 29b5b0fa66
4 changed files with 29 additions and 18 deletions

View File

@@ -144,18 +144,6 @@ function Dotgrid (width, height) {
this.renderer.update()
}
this.setZoom = function (scale) {
this.setSize({ width: this.tool.settings.size.width, height: this.tool.settings.size.height }, true, scale)
try {
webFrame.setZoomFactor(scale)
} catch (err) {
console.log('Cannot zoom')
}
}
// Draw
this.resize = function () {
const size = { width: step(window.innerWidth - 90, 15), height: step(window.innerHeight - 120, 15) }
@@ -173,6 +161,16 @@ function Dotgrid (width, height) {
document.title = `Dotgrid — ${size.width}x${size.height}`
}
this.setZoom = function (scale) {
this.setSize({ width: this.tool.settings.size.width, height: this.tool.settings.size.height }, true, scale)
try {
webFrame.setZoomFactor(scale)
} catch (err) {
console.log('Cannot zoom')
}
}
// Events
this.drag = function (e) {