0
0
mirror of https://github.com/Doodle3D/Doodle3D-API synced 2024-11-05 04:33:24 +01:00

use better object indenting

This commit is contained in:
casperlamboo 2016-04-16 18:05:15 +02:00
parent 5584a1f71e
commit f5f406c93d
3 changed files with 5 additions and 22 deletions

View File

@ -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 });
}
}
}

View File

@ -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);
}

View File

@ -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);
}