From d1e1bce3e97bfc72b40be870a68949426209d950 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 28 Aug 2018 16:34:17 +1200 Subject: [PATCH] 'use strict'; --- desktop/sources/scripts/cursor.js | 2 ++ desktop/sources/scripts/dotgrid.js | 6 ++++-- desktop/sources/scripts/generator.js | 2 ++ desktop/sources/scripts/guide.js | 2 ++ desktop/sources/scripts/interface.js | 2 ++ desktop/sources/scripts/lib/controller.js | 2 ++ desktop/sources/scripts/lib/history.js | 2 ++ desktop/sources/scripts/lib/theme.js | 2 ++ desktop/sources/scripts/picker.js | 2 ++ desktop/sources/scripts/renderer.js | 2 ++ desktop/sources/scripts/tool.js | 2 ++ web/events.js | 2 ++ 12 files changed, 26 insertions(+), 2 deletions(-) diff --git a/desktop/sources/scripts/cursor.js b/desktop/sources/scripts/cursor.js index 47d1b4f..bda6e01 100644 --- a/desktop/sources/scripts/cursor.js +++ b/desktop/sources/scripts/cursor.js @@ -1,3 +1,5 @@ +'use strict'; + function Cursor() { this.pos = {x:0,y:0}; diff --git a/desktop/sources/scripts/dotgrid.js b/desktop/sources/scripts/dotgrid.js index a901fe6..4cff8f7 100644 --- a/desktop/sources/scripts/dotgrid.js +++ b/desktop/sources/scripts/dotgrid.js @@ -1,3 +1,5 @@ +'use strict'; + function Dotgrid(width,height,grid_x,grid_y,block_x,block_y) { this.controller = null; @@ -126,7 +128,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y) // Basics - this.set_size = function(size = {width:300,height:300},interface = true,scale = 1) + this.set_size = function(size = {width:300,height:300},ui = true,scale = 1) { size = { width:clamp(step(size.width,15),105,1080),height:clamp(step(size.height,15),120,1080)} @@ -135,7 +137,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y) try{ let win = require('electron').remote.getCurrentWindow(); - win.setSize((size.width+100)*scale,(size.height+100+(interface ? 10 : 0))*scale,true); + win.setSize((size.width+100)*scale,(size.height+100+(ui ? 10 : 0))*scale,true); } catch(err){ console.log("No window") diff --git a/desktop/sources/scripts/generator.js b/desktop/sources/scripts/generator.js index 71c8f52..0494092 100644 --- a/desktop/sources/scripts/generator.js +++ b/desktop/sources/scripts/generator.js @@ -1,3 +1,5 @@ +'use strict'; + function Generator(layer,style) { this.layer = layer; diff --git a/desktop/sources/scripts/guide.js b/desktop/sources/scripts/guide.js index d0a12be..2202b9c 100644 --- a/desktop/sources/scripts/guide.js +++ b/desktop/sources/scripts/guide.js @@ -1,3 +1,5 @@ +'use strict'; + function Guide() { this.el = document.createElement("canvas"); diff --git a/desktop/sources/scripts/interface.js b/desktop/sources/scripts/interface.js index 8884049..0834901 100644 --- a/desktop/sources/scripts/interface.js +++ b/desktop/sources/scripts/interface.js @@ -1,3 +1,5 @@ +'use strict'; + function Interface() { this.el = document.createElement("div"); diff --git a/desktop/sources/scripts/lib/controller.js b/desktop/sources/scripts/lib/controller.js index e2ee467..cb2f47a 100644 --- a/desktop/sources/scripts/lib/controller.js +++ b/desktop/sources/scripts/lib/controller.js @@ -1,3 +1,5 @@ +'use strict'; + function Controller() { this.menu = {default:{}}; diff --git a/desktop/sources/scripts/lib/history.js b/desktop/sources/scripts/lib/history.js index a3578cb..75c110b 100644 --- a/desktop/sources/scripts/lib/history.js +++ b/desktop/sources/scripts/lib/history.js @@ -1,3 +1,5 @@ +'use strict'; + function History() { this.index = 0; diff --git a/desktop/sources/scripts/lib/theme.js b/desktop/sources/scripts/lib/theme.js index a6dbbf9..d7d6104 100644 --- a/desktop/sources/scripts/lib/theme.js +++ b/desktop/sources/scripts/lib/theme.js @@ -1,3 +1,5 @@ +'use strict'; + function Theme() { let app = this; diff --git a/desktop/sources/scripts/picker.js b/desktop/sources/scripts/picker.js index 04cdfe4..eab4409 100644 --- a/desktop/sources/scripts/picker.js +++ b/desktop/sources/scripts/picker.js @@ -1,3 +1,5 @@ +'use strict'; + function Picker() { this.memory = ""; diff --git a/desktop/sources/scripts/renderer.js b/desktop/sources/scripts/renderer.js index c801ca1..0195531 100644 --- a/desktop/sources/scripts/renderer.js +++ b/desktop/sources/scripts/renderer.js @@ -1,3 +1,5 @@ +'use strict'; + function Renderer() { // Create SVG parts diff --git a/desktop/sources/scripts/tool.js b/desktop/sources/scripts/tool.js index ba76359..19dabb8 100644 --- a/desktop/sources/scripts/tool.js +++ b/desktop/sources/scripts/tool.js @@ -1,3 +1,5 @@ +'use strict'; + function Tool() { this.index = 0; diff --git a/web/events.js b/web/events.js index fc032ab..079e078 100644 --- a/web/events.js +++ b/web/events.js @@ -1,3 +1,5 @@ +'use strict'; + document.onkeyup = (e) => { let ch = e.key.toLowerCase();