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:
parent
5584a1f71e
commit
f5f406c93d
@ -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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user