From f5f406c93d55db574ebf919cc375efc7f8542aec Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Sat, 16 Apr 2016 18:05:15 +0200 Subject: [PATCH] use better object indenting --- src/doodle3dmanager.js | 10 ++-------- src/networkapi.js | 6 +----- src/printerapi.js | 11 ++--------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/src/doodle3dmanager.js b/src/doodle3dmanager.js index 7790917..527375d 100644 --- a/src/doodle3dmanager.js +++ b/src/doodle3dmanager.js @@ -102,20 +102,14 @@ export default class Doodle3DManager extends EventDispatcher { _addBox (box) { this.boxes.push(box); - this.dispatchEvent({ - type: 'boxappeared', - box - }); + this.dispatchEvent({ type: 'boxappeared', box }); } _removeBox (box) { let index = this.boxes.indexOf(box); if (index !== -1) { this.boxes.splice(index, 1); - this.dispatchEvent({ - type: 'boxdisappeared', - box - }); + this.dispatchEvent({ type: 'boxdisappeared', box }); } } } diff --git a/src/networkapi.js b/src/networkapi.js index 222308d..f21ea75 100644 --- a/src/networkapi.js +++ b/src/networkapi.js @@ -18,11 +18,7 @@ export default class { } assosiate (ssid, phrase, recreate = false) { - var data = { - ssid, - recreate, - phrase - }; + const data = { ssid, recreate, phrase }; return rest.post(`${this.api}network/associate`, data); } diff --git a/src/printerapi.js b/src/printerapi.js index 4fb8cca..6736fc4 100644 --- a/src/printerapi.js +++ b/src/printerapi.js @@ -26,20 +26,13 @@ export default class { } print (gcode = '', first = false, start = false, last) { - let data = { - gcode, - first, - start, - last - }; + const data = { gcode, first, start, last }; return rest.post(`${this.api}printer/print`, data); } stop (gcode = '') { - let data = { - gcode - }; + const data = { gcode }; return rest.post(`${this.api}printer/stop`, data); }