diff --git a/resources/docs/docs/client-options.md b/resources/docs/docs/client-options.md index 815d795e..bebd020c 100644 --- a/resources/docs/docs/client-options.md +++ b/resources/docs/docs/client-options.md @@ -5,7 +5,7 @@ Client options can be set either with the server's `--client-options` option, or |----|----|----|----| | hdpi | 1 / 0 | 0 | enable high resolution canvas | | forceHdpi | number | 0 | force canvas scaling (ignore `hdpi`) | -| doubletab | number | 375 | sets the double tap/click time threshold in milliseconds | +| doubleTap | number | 375 | sets the double tap/click time threshold in milliseconds | | zoom | number | 1 | sets the initial zoom | | framerate | number | 60 | limit canvas drawing framerate | | desyncCanvas | number | 0 | set to 1 to enable desynchronized canvas (may improve rendering performances) | @@ -13,7 +13,7 @@ Client options can be set either with the server's `--client-options` option, or | consoleLength | number | 300 | sets the maximum number of log messages in the client's console | | id | string | *random_id* | client's unique id (use with caution: two clients should never have the same id) | | usePercents | 1 / 0 | 0 | sets the editor's "relative units" option | -| nofocus | 1 / 0 | 0 | (built-in client only) prevent the client window from taking focus unless a text input or a dropdown is clicked | +| noFocus | 1 / 0 | 0 | (built-in client only) prevent the client window from taking focus unless a text input or a dropdown is clicked | Example: diff --git a/src/client/editor/index.js b/src/client/editor/index.js index b2246c39..ebe5a4fc 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -155,7 +155,7 @@ class Editor { this.idClipboard = data.idClipboard }) - this.usePercents = !!ENV.usePercents + this.usePercents = !!ENV.usepercents this.enabled = false this.grid = true diff --git a/src/client/globals.js b/src/client/globals.js index cac19a55..92e1cfd8 100644 --- a/src/client/globals.js +++ b/src/client/globals.js @@ -1,7 +1,7 @@ window.IP = window.IP || '' window.ENV = window.ENV || {} location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, (s,k,v)=>{ - ENV[k]=v + ENV[k]=v.toLowerCase() }) window.LANG = ENV.lang === 'debug' ? 'debug' : (ENV.lang || navigator.language || '').substr(0, 2).toLowerCase() @@ -18,7 +18,7 @@ window.GRIDWIDTH = GRIDWIDTH_CSS window.ELECTRON_NOGPU = false window.CANVAS_FRAMERATE = parseFloat(ENV.framerate || 60) -window.CANVAS_SCALING = parseFloat(ENV.forceHdpi) || ( ENV.hdpi ? window.devicePixelRatio : 1 ) +window.CANVAS_SCALING = parseFloat(ENV.forcehdpi) || ( ENV.hdpi ? window.devicePixelRatio : 1 ) window.INITIALZOOM = ENV.zoom ? parseFloat(ENV.zoom) : 1 window.PXSCALE = INITIALZOOM document.documentElement.style.setProperty('font-size', PXSCALE + 'px') diff --git a/src/client/ui/ui-console.js b/src/client/ui/ui-console.js index 8892cd63..44f0bc57 100644 --- a/src/client/ui/ui-console.js +++ b/src/client/ui/ui-console.js @@ -27,7 +27,7 @@ class UiConsole extends UiSidePanel { }) this.length = 0 - this.maxLength = ENV.consoleLength || 300 + this.maxLength = ENV.consolelength || 300 this.history = [''] this.cursor = 0 diff --git a/src/client/widgets/common/canvas.js b/src/client/widgets/common/canvas.js index 09a1e1ee..c3517bc6 100644 --- a/src/client/widgets/common/canvas.js +++ b/src/client/widgets/common/canvas.js @@ -12,7 +12,7 @@ class Canvas extends Widget { this.canvas = DOM.get(this.container, 'canvas')[0] this.ctx = this.canvas.getContext('2d',{ - desynchronized: !ELECTRON_NOGPU && ENV.desyncCanvas ? true : false, + desynchronized: !ELECTRON_NOGPU && ENV.desynccanvas ? true : false, alpha: true })