mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2025-03-01 06:45:34 +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) {
|
_addBox (box) {
|
||||||
this.boxes.push(box);
|
this.boxes.push(box);
|
||||||
|
|
||||||
this.dispatchEvent({
|
this.dispatchEvent({ type: 'boxappeared', box });
|
||||||
type: 'boxappeared',
|
|
||||||
box
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeBox (box) {
|
_removeBox (box) {
|
||||||
let index = this.boxes.indexOf(box);
|
let index = this.boxes.indexOf(box);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.boxes.splice(index, 1);
|
this.boxes.splice(index, 1);
|
||||||
this.dispatchEvent({
|
this.dispatchEvent({ type: 'boxdisappeared', box });
|
||||||
type: 'boxdisappeared',
|
|
||||||
box
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,7 @@ export default class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assosiate (ssid, phrase, recreate = false) {
|
assosiate (ssid, phrase, recreate = false) {
|
||||||
var data = {
|
const data = { ssid, recreate, phrase };
|
||||||
ssid,
|
|
||||||
recreate,
|
|
||||||
phrase
|
|
||||||
};
|
|
||||||
|
|
||||||
return rest.post(`${this.api}network/associate`, data);
|
return rest.post(`${this.api}network/associate`, data);
|
||||||
}
|
}
|
||||||
|
@ -26,20 +26,13 @@ export default class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print (gcode = '', first = false, start = false, last) {
|
print (gcode = '', first = false, start = false, last) {
|
||||||
let data = {
|
const data = { gcode, first, start, last };
|
||||||
gcode,
|
|
||||||
first,
|
|
||||||
start,
|
|
||||||
last
|
|
||||||
};
|
|
||||||
|
|
||||||
return rest.post(`${this.api}printer/print`, data);
|
return rest.post(`${this.api}printer/print`, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
stop (gcode = '') {
|
stop (gcode = '') {
|
||||||
let data = {
|
const data = { gcode };
|
||||||
gcode
|
|
||||||
};
|
|
||||||
|
|
||||||
return rest.post(`${this.api}printer/stop`, data);
|
return rest.post(`${this.api}printer/stop`, data);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user