web app added node position updates

This commit is contained in:
Blake J. Harnden 2018-05-09 17:12:01 -07:00
parent 0ee3fca97c
commit 10486dfe1a
3 changed files with 64 additions and 0 deletions

View file

@ -69,6 +69,14 @@ class CoreRest {
return await postJson(`/sessions/${this.currentSession}/nodes`, node);
}
async editNode(node) {
return await putJson(`/sessions/${this.currentSession}/nodes/${node.id}`, {
id: node.id,
x: node.x,
y: node.y
});
}
async createLink(link) {
return await postJson(`/sessions/${this.currentSession}/links`, link);
}
@ -102,4 +110,9 @@ class CoreRest {
return session;
}
async isRunning() {
const session = await this.getSession();
return session.state === SessionStates.runtime;
}
}