From ea75100ef9a1909e149c3a452bba0bcbca7e0a76 Mon Sep 17 00:00:00 2001 From: Adam Procter <adamprocter@researchnot.es> Date: Mon, 24 Aug 2020 20:44:42 +0100 Subject: [PATCH] edits --- app/src/components/ConnectionsLayer.vue | 2 +- app/src/store/index.js | 39 ++++++++++++------------- app/src/views/Home.vue | 1 + 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/src/components/ConnectionsLayer.vue b/app/src/components/ConnectionsLayer.vue index 3efed3f..1dbbdd3 100644 --- a/app/src/components/ConnectionsLayer.vue +++ b/app/src/components/ConnectionsLayer.vue @@ -67,7 +67,7 @@ export default { this.drawPixi() }, } - +// TODO: This is a sample of drawing lines with mouse with PIXI // Opt-in to interactivity // graphics.interactive = true diff --git a/app/src/store/index.js b/app/src/store/index.js index 627a555..9945011 100644 --- a/app/src/store/index.js +++ b/app/src/store/index.js @@ -169,25 +169,24 @@ const store = new Vuex.Store({ }) .catch(function (err) { if (err.status == 404) { - var uniqueid = - Math.random().toString(36).substring(2, 15) + - Math.random().toString(36).substring(2, 15) + // var uniqueid = + // Math.random().toString(36).substring(2, 15) + + // Math.random().toString(36).substring(2, 15) return pouchdb.put({ _id: state.myclient, _attachments: {}, nodes: [ - { - // FIXME: these values are here as GET_ALL_NODES cant hunt a blank - // this shouldnt need to be here though - - node_id: uniqueid, - node_text: 'Ignore this node ' + state.myclient, - node_owner: state.myclient, - content_type: 'sheet', - // NOTE: first node is hidden due to no position - deleted: true, - attachment_name: '', - }, + // { + // // FIXME: these values are here as GET_ALL_NODES cant hunt a blank + // // this shouldnt need to be here though + // node_id: uniqueid, + // node_text: 'Ignore this node ' + state.myclient, + // node_owner: state.myclient, + // content_type: 'sheet', + // // NOTE: the first node is hidden due to a position not being created + // deleted: true, + // attachment_name: '', + // }, ], }) } @@ -237,14 +236,13 @@ const store = new Vuex.Store({ connect_id: connectid, start_id: e.fromnode, end_id: e.tonode, - path: e.path, - color: e.color, - line_dash: e.linedash, - line_width: e.linewidth, + x_pos_start: e.xposstart, + y_pos_start: e.yposstart, + x_pos_end: e.xposend, + y_pos_end: e.yposend, }) // from db | in app - // connect_id | connectID // start_id | startID @@ -513,6 +511,7 @@ const store = new Vuex.Store({ .catch(function (err) { console.log(err) if (err.status == 404) { + console.log('ok') return pouchdb.put({ _id: state.global_emoji_name, emojis: [], diff --git a/app/src/views/Home.vue b/app/src/views/Home.vue index 647071b..ec87b79 100644 --- a/app/src/views/Home.vue +++ b/app/src/views/Home.vue @@ -69,6 +69,7 @@ @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" /> + <ConnectionsLayer /> </div> <ScribbleLayer v-bind:drawready="drawready"></ScribbleLayer> </PanZoomContainer> -- GitLab