From 0edc7d8ab2bab375ba7c8fac51d2a25cb10d5d62 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 16:33:22 +0100 Subject: [PATCH 001/311] debug --- js/containers/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/containers/app.js b/js/containers/app.js index a0df1b29d..2f9a40e3a 100644 --- a/js/containers/app.js +++ b/js/containers/app.js @@ -30,7 +30,7 @@ class App extends Component { render() { return (
- START HERE + BEGIN HERE
From 8128ee85c8a0a1f9ce210b18778e6e40a4ce16be Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 17:52:16 +0100 Subject: [PATCH 002/311] debug --- js/actions/actonTypes.js | 3 ++- js/actions/selectionActions.js | 9 ++++++++- js/components/summaryView.js | 6 +++++- js/reducers/selectionReducers.js | 7 +++++++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/js/actions/actonTypes.js b/js/actions/actonTypes.js index 70ebcc8a9..9bbddcf85 100644 --- a/js/actions/actonTypes.js +++ b/js/actions/actonTypes.js @@ -52,4 +52,5 @@ export const GOT_FULL_GRAPH = 'GOT_FULL_GRAPH'; export const SELECT_VECTOR = 'SELECT_VECTOR'; export const SET_MOL = 'SET_MOL'; export const SET_VECTOR_LIST = 'SET_VECTOR_LIST'; -export const SET_ORIENTATION = 'SET_ORIENTATION' \ No newline at end of file +export const SET_ORIENTATION = 'SET_ORIENTATION'; +export const COUNTER = 'COUNTER'; diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index c3ccbbace..5b157b5f3 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -2,7 +2,7 @@ * Created by abradley on 15/03/2018. */ -import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL} from './actonTypes' +import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL, COUNTER} from './actonTypes' export const setToBuyList = function (to_buy_list){ console.log("ACTIONS: "+ to_buy_list) @@ -12,6 +12,13 @@ export const setToBuyList = function (to_buy_list){ } } +export const counter = function (){ + console.log("ACTIONS: counter") + return { + type: COUNTER, + } +} + export const appendToBuyList = function (item){ console.log("ACTIONS: "+ item) return { diff --git a/js/components/summaryView.js b/js/components/summaryView.js index a449bdd85..472946303 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,6 +152,8 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

+

Times clicked: {this.state.counter}

+ @@ -174,7 +176,8 @@ function mapStateToProps(state) { this_vector_list: state.selectionReducers.this_vector_list, vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, - to_query: state.selectionReducers.to_query + to_query: state.selectionReducers.to_query, + counter: state.selectionReducers.counter } } @@ -184,6 +187,7 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject + counter: selectionActions.counter } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index fba058123..0914c3dd1 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -10,6 +10,7 @@ const INITIALSTATE = { this_vector_list: {}, querying: false, to_query: undefined + counter: 0 } export default function selectionReducers(state = INITIALSTATE, action) { @@ -89,6 +90,12 @@ export default function selectionReducers(state = INITIALSTATE, action) { this_vector_list: this_vector_list }); + case actions.COUNTER: + return Object.assign({}, state, { + counter += 1, + }); + + // Cases like: @@redux/INIT default: return state; From 1d61148072cde198dbef7f362358fb67587cccee Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 17:55:12 +0100 Subject: [PATCH 003/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 0914c3dd1..185647627 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -9,7 +9,7 @@ const INITIALSTATE = { vector_list: [], this_vector_list: {}, querying: false, - to_query: undefined + to_query: undefined, counter: 0 } From e641ee470befad4a3a7f814a58145f7e005616cb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 17:57:25 +0100 Subject: [PATCH 004/311] debug --- js/components/summaryView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 472946303..78e3a293b 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -186,7 +186,7 @@ function mapStateToProps(state) { const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, - loadObject: nglLoadActions.loadObject + loadObject: nglLoadActions.loadObject, counter: selectionActions.counter } From 1c1a99d77f1c2392b2a9140b839b91c6d6c723f5 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 17:57:53 +0100 Subject: [PATCH 005/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 185647627..e0da9221a 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -92,7 +92,7 @@ export default function selectionReducers(state = INITIALSTATE, action) { case actions.COUNTER: return Object.assign({}, state, { - counter += 1, + counter += 1 }); From 0a803916f9a69933562d17effe423cb9cc02072e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 17:58:33 +0100 Subject: [PATCH 006/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index e0da9221a..7d43f90ee 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -92,7 +92,7 @@ export default function selectionReducers(state = INITIALSTATE, action) { case actions.COUNTER: return Object.assign({}, state, { - counter += 1 + counter =+ 1 }); From 50919e118748f4d321ace39fb3a21c2a7aeda1f8 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:00:00 +0100 Subject: [PATCH 007/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 7d43f90ee..e0da9221a 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -92,7 +92,7 @@ export default function selectionReducers(state = INITIALSTATE, action) { case actions.COUNTER: return Object.assign({}, state, { - counter =+ 1 + counter += 1 }); From bea6317759ae5cc42cfffbc27f7ec0d05056bcb2 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:02:30 +0100 Subject: [PATCH 008/311] debug --- js/reducers/selectionReducers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index e0da9221a..65a670afd 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -91,6 +91,7 @@ export default function selectionReducers(state = INITIALSTATE, action) { }); case actions.COUNTER: + var counter = state.counter return Object.assign({}, state, { counter += 1 }); From 97d0a6635441b36505e3dcb72672b3b02b92611f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:03:46 +0100 Subject: [PATCH 009/311] debug --- js/reducers/selectionReducers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 65a670afd..f15d274f1 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -92,8 +92,9 @@ export default function selectionReducers(state = INITIALSTATE, action) { case actions.COUNTER: var counter = state.counter + counter += 1 return Object.assign({}, state, { - counter += 1 + counter: counter }); From d44b594e4f628525ea182daa527d6b561d26feaa Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:06:22 +0100 Subject: [PATCH 010/311] debug --- js/reducers/selectionReducers.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index f15d274f1..92b5bf9c3 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -103,5 +103,3 @@ export default function selectionReducers(state = INITIALSTATE, action) { return state; } } - - From 892906d47b86f8c7b1464339809413dd55764ae7 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:08:17 +0100 Subject: [PATCH 011/311] debug --- js/actions/selectionActions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index 5b157b5f3..e18a588ba 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -15,7 +15,7 @@ export const setToBuyList = function (to_buy_list){ export const counter = function (){ console.log("ACTIONS: counter") return { - type: COUNTER, + type: COUNTER } } From 6786f12465444c080a3de798cdf84a7d83055fb4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:11:03 +0100 Subject: [PATCH 012/311] debug --- js/components/summaryView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 78e3a293b..8a7c536bf 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -153,7 +153,7 @@ class SummaryView extends React.Component{

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

Times clicked: {this.state.counter}

- + From 1f4699df7a44f171c029d3677fc5d3b3e1ddc592 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:17:10 +0100 Subject: [PATCH 013/311] debug --- js/actions/actonTypes.js | 2 +- js/actions/selectionActions.js | 6 +++--- js/components/summaryView.js | 8 ++++---- js/reducers/selectionReducers.js | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/actions/actonTypes.js b/js/actions/actonTypes.js index 9bbddcf85..9260b427e 100644 --- a/js/actions/actonTypes.js +++ b/js/actions/actonTypes.js @@ -53,4 +53,4 @@ export const SELECT_VECTOR = 'SELECT_VECTOR'; export const SET_MOL = 'SET_MOL'; export const SET_VECTOR_LIST = 'SET_VECTOR_LIST'; export const SET_ORIENTATION = 'SET_ORIENTATION'; -export const COUNTER = 'COUNTER'; +export const HOT_COUNTER = 'HOT_COUNTER'; diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index e18a588ba..c269012d8 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -2,7 +2,7 @@ * Created by abradley on 15/03/2018. */ -import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL, COUNTER} from './actonTypes' +import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL, HOT_COUNTER} from './actonTypes' export const setToBuyList = function (to_buy_list){ console.log("ACTIONS: "+ to_buy_list) @@ -12,10 +12,10 @@ export const setToBuyList = function (to_buy_list){ } } -export const counter = function (){ +export const hotCounter = function (){ console.log("ACTIONS: counter") return { - type: COUNTER + type: HOT_COUNTER } } diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 8a7c536bf..2cd0dc982 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,8 +152,8 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

-

Times clicked: {this.state.counter}

- +

Times clicked: {this.state.hotCounter}

+ @@ -177,7 +177,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - counter: state.selectionReducers.counter + counter: state.selectionReducers.hotCounter } } @@ -187,7 +187,7 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - counter: selectionActions.counter + counter: selectionActions.hot_Counter } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 92b5bf9c3..6c05922a8 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -90,11 +90,11 @@ export default function selectionReducers(state = INITIALSTATE, action) { this_vector_list: this_vector_list }); - case actions.COUNTER: - var counter = state.counter - counter += 1 + case actions.HOT_COUNTER: + var hotCounter = state.hotCounter + hotCounter += 1 return Object.assign({}, state, { - counter: counter + hotCounter: hotCounter }); From fae1dcc5e318296e3027819fe5aa87d4c96d9d7f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:19:00 +0100 Subject: [PATCH 014/311] debug --- js/actions/selectionActions.js | 1 - js/reducers/selectionReducers.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index c269012d8..9b9b89367 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -44,7 +44,6 @@ export const getFullGraph = function (item) { } - export const gotFullGraph = function (result){ console.log("ACTIONS: "+ result) return { diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 6c05922a8..e5db40569 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -95,7 +95,7 @@ export default function selectionReducers(state = INITIALSTATE, action) { hotCounter += 1 return Object.assign({}, state, { hotCounter: hotCounter - }); + }) // Cases like: @@redux/INIT From 6390d5edd662ebb547d8453648715dec6f74cbc5 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:21:34 +0100 Subject: [PATCH 015/311] debug --- js/actions/selectionActions.js | 2 +- js/components/summaryView.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index 9b9b89367..cf6d931b4 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -15,7 +15,7 @@ export const setToBuyList = function (to_buy_list){ export const hotCounter = function (){ console.log("ACTIONS: counter") return { - type: HOT_COUNTER + type: HOT_COUNTER, } } diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 2cd0dc982..a0fc0ec2f 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,8 +152,8 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

-

Times clicked: {this.state.hotCounter}

- +

Times clicked: {this.props.hotCounter}

+ From 8dcd18dae7757e6c091101e76af1345ef83d5ab3 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:22:29 +0100 Subject: [PATCH 016/311] debug --- js/components/summaryView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index a0fc0ec2f..7a062b308 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -187,7 +187,7 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - counter: selectionActions.hot_Counter + counter: selectionActions.hotCounter } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From 41825682ea9a6ec456ecf6ab3fc67da30257aedd Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:23:19 +0100 Subject: [PATCH 017/311] debug --- js/components/summaryView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 7a062b308..bfaa7a0df 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,7 +152,7 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

-

Times clicked: {this.props.hotCounter}

+

Times clicked: {this.state.hotCounter}

@@ -177,7 +177,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - counter: state.selectionReducers.hotCounter + hotCounter: state.selectionReducers.hotCounter } } @@ -187,7 +187,7 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - counter: selectionActions.hotCounter + hotCounter: selectionActions.hotCounter } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From f67c32c1aec023073a39d7a576758e73ef2e1f8f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:24:58 +0100 Subject: [PATCH 018/311] debug --- js/components/summaryView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index bfaa7a0df..60fc8f5f2 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,8 +152,8 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

-

Times clicked: {this.state.hotCounter}

- +

Times clicked: {this.props.hotCounter}

+ From 6a0c8f3432ab8ea78008e9744e6ec4b1bc437465 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:26:31 +0100 Subject: [PATCH 019/311] debug --- js/components/summaryView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 60fc8f5f2..89d5d37f0 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -153,7 +153,7 @@ class SummaryView extends React.Component{

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

Times clicked: {this.props.hotCounter}

- + @@ -187,7 +187,7 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - hotCounter: selectionActions.hotCounter + hot_Counter: selectionActions.hotCounter } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From dc0a8c330672957d38628cf8acb25ffd2ec28917 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:28:08 +0100 Subject: [PATCH 020/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index e5db40569..0fc8f8405 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -10,7 +10,7 @@ const INITIALSTATE = { this_vector_list: {}, querying: false, to_query: undefined, - counter: 0 + hotcounter: 0 } export default function selectionReducers(state = INITIALSTATE, action) { From 676ee426336cc6e744ee3dbdbc4d8fa90a864ca0 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:28:29 +0100 Subject: [PATCH 021/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 0fc8f8405..c8a31b2c0 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -10,7 +10,7 @@ const INITIALSTATE = { this_vector_list: {}, querying: false, to_query: undefined, - hotcounter: 0 + hot_counter: 0 } export default function selectionReducers(state = INITIALSTATE, action) { From 09187efc14fbbd577b5e7821c3cc108225d8d55c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 18:29:01 +0100 Subject: [PATCH 022/311] debug --- js/reducers/selectionReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index c8a31b2c0..970d9963a 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -10,7 +10,7 @@ const INITIALSTATE = { this_vector_list: {}, querying: false, to_query: undefined, - hot_counter: 0 + hotCounter: 0 } export default function selectionReducers(state = INITIALSTATE, action) { From 9089c7c4e54fe7fe17b65a4b7b6b1e6cebfd555d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Mon, 21 May 2018 22:34:56 +0100 Subject: [PATCH 023/311] debug --- js/actions/actonTypes.js | 2 +- js/actions/selectionActions.js | 6 +++--- js/components/summaryView.js | 3 +-- js/reducers/selectionReducers.js | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/js/actions/actonTypes.js b/js/actions/actonTypes.js index 9260b427e..3ae3de6f3 100644 --- a/js/actions/actonTypes.js +++ b/js/actions/actonTypes.js @@ -53,4 +53,4 @@ export const SELECT_VECTOR = 'SELECT_VECTOR'; export const SET_MOL = 'SET_MOL'; export const SET_VECTOR_LIST = 'SET_VECTOR_LIST'; export const SET_ORIENTATION = 'SET_ORIENTATION'; -export const HOT_COUNTER = 'HOT_COUNTER'; +export const COUNTER_ADD = 'COUNTER_ADD'; diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index cf6d931b4..ea4d29218 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -2,7 +2,7 @@ * Created by abradley on 15/03/2018. */ -import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL, HOT_COUNTER} from './actonTypes' +import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL, COUNTER_ADD} from './actonTypes' export const setToBuyList = function (to_buy_list){ console.log("ACTIONS: "+ to_buy_list) @@ -12,10 +12,10 @@ export const setToBuyList = function (to_buy_list){ } } -export const hotCounter = function (){ +export const CounterAdd = function (){ console.log("ACTIONS: counter") return { - type: HOT_COUNTER, + type: COUNTER_ADD, } } diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 89d5d37f0..c12a407ef 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -182,12 +182,11 @@ function mapStateToProps(state) { } - const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - hot_Counter: selectionActions.hotCounter + hot_Counter: selectionActions.CounterAdd } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 970d9963a..832eb85c6 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -90,7 +90,7 @@ export default function selectionReducers(state = INITIALSTATE, action) { this_vector_list: this_vector_list }); - case actions.HOT_COUNTER: + case actions.COUNTER_ADD: var hotCounter = state.hotCounter hotCounter += 1 return Object.assign({}, state, { From ad55fe35aad3917a0bfbaea9372d0ffe99569165 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 08:35:05 +0100 Subject: [PATCH 024/311] debug --- js/components/summaryView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index c12a407ef..1583599ce 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -153,7 +153,7 @@ class SummaryView extends React.Component{

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

Times clicked: {this.props.hotCounter}

- + @@ -186,7 +186,7 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - hot_Counter: selectionActions.CounterAdd + counterAdd: selectionActions.CounterAdd } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From 4f19edf8e33690a75a5432999c42901a0835b0b0 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 08:45:22 +0100 Subject: [PATCH 025/311] debug --- js/actions/actonTypes.js | 1 - js/actions/selectionActions.js | 9 +-------- js/components/summaryView.js | 4 ---- js/reducers/selectionReducers.js | 11 +---------- 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/js/actions/actonTypes.js b/js/actions/actonTypes.js index 3ae3de6f3..800634316 100644 --- a/js/actions/actonTypes.js +++ b/js/actions/actonTypes.js @@ -53,4 +53,3 @@ export const SELECT_VECTOR = 'SELECT_VECTOR'; export const SET_MOL = 'SET_MOL'; export const SET_VECTOR_LIST = 'SET_VECTOR_LIST'; export const SET_ORIENTATION = 'SET_ORIENTATION'; -export const COUNTER_ADD = 'COUNTER_ADD'; diff --git a/js/actions/selectionActions.js b/js/actions/selectionActions.js index ea4d29218..7975af662 100644 --- a/js/actions/selectionActions.js +++ b/js/actions/selectionActions.js @@ -2,7 +2,7 @@ * Created by abradley on 15/03/2018. */ -import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL, COUNTER_ADD} from './actonTypes' +import {SET_TO_BUY_LIST, APPEND_TO_BUY_LIST, REMOVE_FROM_TO_BUY_LIST, GET_FULL_GRAPH, GOT_FULL_GRAPH, SET_VECTOR_LIST, SELECT_VECTOR, SET_MOL} from './actonTypes' export const setToBuyList = function (to_buy_list){ console.log("ACTIONS: "+ to_buy_list) @@ -12,13 +12,6 @@ export const setToBuyList = function (to_buy_list){ } } -export const CounterAdd = function (){ - console.log("ACTIONS: counter") - return { - type: COUNTER_ADD, - } -} - export const appendToBuyList = function (item){ console.log("ACTIONS: "+ item) return { diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 1583599ce..1da5951a4 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,8 +152,6 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

-

Times clicked: {this.props.hotCounter}

- @@ -177,7 +175,6 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - hotCounter: state.selectionReducers.hotCounter } } @@ -186,7 +183,6 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - counterAdd: selectionActions.CounterAdd } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/reducers/selectionReducers.js b/js/reducers/selectionReducers.js index 832eb85c6..53ea736b2 100644 --- a/js/reducers/selectionReducers.js +++ b/js/reducers/selectionReducers.js @@ -9,8 +9,7 @@ const INITIALSTATE = { vector_list: [], this_vector_list: {}, querying: false, - to_query: undefined, - hotCounter: 0 + to_query: undefined } export default function selectionReducers(state = INITIALSTATE, action) { @@ -90,14 +89,6 @@ export default function selectionReducers(state = INITIALSTATE, action) { this_vector_list: this_vector_list }); - case actions.COUNTER_ADD: - var hotCounter = state.hotCounter - hotCounter += 1 - return Object.assign({}, state, { - hotCounter: hotCounter - }) - - // Cases like: @@redux/INIT default: return state; From 0353f9e3d93c915fc6670e3553bca0928d8b9c39 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:09:29 +0100 Subject: [PATCH 026/311] debug --- js/components/currentState.js | 44 ++++++++++++++++++++++++++++++++++ js/containers/previewHolder.js | 3 +++ 2 files changed, 47 insertions(+) create mode 100644 js/components/currentState.js diff --git a/js/components/currentState.js b/js/components/currentState.js new file mode 100644 index 000000000..bd6d2f42c --- /dev/null +++ b/js/components/currentState.js @@ -0,0 +1,44 @@ +/** + * Created by abradley on 15/03/2018. + */ +import React from 'react'; +import { connect } from 'react-redux' +import { Button, Well, Col, Row } from 'react-bootstrap' +import * as selectionActions from '../actions/selectionActions' +import * as nglLoadActions from '../actions/nglLoadActions' +import * as apiActions from '../actions/apiActions' +import CompoundList from './compoundList'; +import SummaryCmpd from './SummaryCmpd'; + +class SummaryView extends React.Component{ + constructor(props) { + super(props); + this.state = {list_len: 0, cost: 0, num_vectors: 0, num_series: 0, smiles: ""} + } + + render(){ + return
+ + +

Current State:

+
+
+
+ } +} +function mapStateToProps(state) { + return { + to_buy_list: state.selectionReducers.to_buy_list, + to_select: state.selectionReducers.to_select, + this_vector_list: state.selectionReducers.this_vector_list, + vector_list: state.selectionReducers.vector_list, + querying: state.selectionReducers.querying, + to_query: state.selectionReducers.to_query, + } +} + + +const mapDispatchToProps = { +} + +export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index ff8cea191..2b8bccee3 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -34,6 +34,9 @@ class Preview extends Component { + + + ) } From 5059198e5c3217ee5872b138c1b87f4f089b532b Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:11:25 +0100 Subject: [PATCH 027/311] debug --- js/components/currentState.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index bd6d2f42c..9c7eda931 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -13,14 +13,13 @@ import SummaryCmpd from './SummaryCmpd'; class SummaryView extends React.Component{ constructor(props) { super(props); - this.state = {list_len: 0, cost: 0, num_vectors: 0, num_series: 0, smiles: ""} } render(){ return
-

Current State:

+

"Current State:"

From 2cc183c433994f16c5564ef87509fc5bd80a3db4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:12:46 +0100 Subject: [PATCH 028/311] debug --- js/containers/previewHolder.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index 2b8bccee3..c7fcacb5d 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -9,6 +9,7 @@ import MolGroupList from '../components/molGroupList'; import MoleculeList from '../components/moleculeList'; import MolGroupSlider from '../components/molGroupSlider' import SummaryView from '../components/summaryView'; +import CurrentState from '../components/currentState'; class Preview extends Component { From 4c75396dc1749f5267a9f644a401105c974dfdad Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:13:11 +0100 Subject: [PATCH 029/311] debug --- js/components/currentState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 9c7eda931..8c6c6b3da 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -19,7 +19,7 @@ class SummaryView extends React.Component{ return
-

"Current State:"

+

Current State:

From 388621f9e239c39714aa30d3eb500a96255746fa Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:14:03 +0100 Subject: [PATCH 030/311] debug --- js/containers/previewHolder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index c7fcacb5d..588a32dd7 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -35,7 +35,7 @@ class Preview extends Component { - + From 36abae638a314b77e10a97b99734c05df374b932 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:15:24 +0100 Subject: [PATCH 031/311] debug --- js/containers/previewHolder.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index 588a32dd7..cf2ecfe32 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -23,6 +23,7 @@ class Preview extends Component { + @@ -35,9 +36,6 @@ class Preview extends Component { - - - ) } From 90041bc757bc4b0e755d926621bf9a4124d2a4a1 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:15:55 +0100 Subject: [PATCH 032/311] debug --- js/containers/previewHolder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index cf2ecfe32..588a32dd7 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -23,7 +23,6 @@ class Preview extends Component { - @@ -36,6 +35,9 @@ class Preview extends Component { + + + ) } From 43b1388c70393fd537f2ea1e6c579f07afd77e25 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:33:48 +0100 Subject: [PATCH 033/311] debug --- js/components/currentState.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/components/currentState.js b/js/components/currentState.js index 8c6c6b3da..8967cfccd 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -20,6 +20,7 @@ class SummaryView extends React.Component{

Current State:

+

Objects In View: {this.props.object_in_view}

@@ -33,6 +34,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, + object_in_view: state.nglReducers.object_in_view } } From 6b2f05eb45a2cbf1fbd110a21be3a3b7118b9fcd Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:34:14 +0100 Subject: [PATCH 034/311] debug --- js/components/currentState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 8967cfccd..5b00b264e 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -19,7 +19,7 @@ class SummaryView extends React.Component{ return
-

Current State:

+

Current State: \n

Objects In View: {this.props.object_in_view}

From e0bab8a9508a6dfa57a3223fd6847d1191cae438 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:34:33 +0100 Subject: [PATCH 035/311] debug --- js/components/currentState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 5b00b264e..a19dc9192 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -19,7 +19,7 @@ class SummaryView extends React.Component{ return
-

Current State: \n

+

Current State: /n

Objects In View: {this.props.object_in_view}

From f089614ce62263e9c43ba46801e48dfae770c8b9 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:35:07 +0100 Subject: [PATCH 036/311] debug --- js/components/currentState.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index a19dc9192..badbb932b 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -19,7 +19,9 @@ class SummaryView extends React.Component{ return
-

Current State: /n

+

Current State:

+
+

Objects In View: {this.props.object_in_view}

From 7941a6d6be51bf5be9ddca7a8ed1391b6e025038 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 09:35:44 +0100 Subject: [PATCH 037/311] debug --- js/components/currentState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index badbb932b..07fe6449b 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -22,7 +22,7 @@ class SummaryView extends React.Component{

Current State:

-

Objects In View: {this.props.object_in_view}

+

Objects In View: {this.object_in_view}

From a6083e8e8248b3e6e0cb05c977beab813db66210 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 11:14:47 +0100 Subject: [PATCH 038/311] debug --- js/components/currentState.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 07fe6449b..149667622 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -22,7 +22,7 @@ class SummaryView extends React.Component{

Current State:

-

Objects In View: {this.object_in_view}

+

Target: {this.props.target_on}

@@ -36,7 +36,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - object_in_view: state.nglReducers.object_in_view + target_on: state.apiReducers.target_on } } From 492e6aaac511650c0e31395e858bb9d9f24a7dc9 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 11:37:02 +0100 Subject: [PATCH 039/311] debug --- js/components/currentState.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/components/currentState.js b/js/components/currentState.js index 149667622..5e3dcb0cd 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -24,6 +24,9 @@ class SummaryView extends React.Component{

Target: {this.props.target_on}

+ + +
} @@ -42,6 +45,7 @@ function mapStateToProps(state) { const mapDispatchToProps = { + display_state: state.displayStateReducers.display_state } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From a66b282633608901d80209f0857befb3bf8ad83b Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:23:04 +0100 Subject: [PATCH 040/311] debug --- js/components/currentState.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 5e3dcb0cd..97c0b6155 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -27,7 +27,10 @@ class SummaryView extends React.Component{ - +/* + + +*/ } } From 94e1d9e948628cbaf8025265d342dcdf0d282651 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:24:55 +0100 Subject: [PATCH 041/311] debug --- js/components/currentState.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 97c0b6155..ee85fd1cf 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -24,10 +24,10 @@ class SummaryView extends React.Component{

Target: {this.props.target_on}

- +/* -/* + */ From 403f77397920fd4db09ea1afe31da1decd2c4ffb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:25:22 +0100 Subject: [PATCH 042/311] debug --- js/components/currentState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index ee85fd1cf..4fe79d0b9 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -48,7 +48,7 @@ function mapStateToProps(state) { const mapDispatchToProps = { - display_state: state.displayStateReducers.display_state +// display_state: state.displayStateReducers.display_state } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From c80e27468c78d3882f411f2b37ec7f9f51b00ba4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:27:49 +0100 Subject: [PATCH 043/311] debug --- js/components/currentState.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index 4fe79d0b9..ef492565e 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -21,10 +21,10 @@ class SummaryView extends React.Component{

Current State:

- +/*

Target: {this.props.target_on}

-/* + From 2fb925363f4f3aa2711dc202ee539923c783102c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:29:50 +0100 Subject: [PATCH 044/311] debug --- js/components/currentState.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/components/currentState.js b/js/components/currentState.js index ef492565e..4474cf016 100644 --- a/js/components/currentState.js +++ b/js/components/currentState.js @@ -16,12 +16,12 @@ class SummaryView extends React.Component{ } render(){ - return
+/* return

Current State:

-/* +

Target: {this.props.target_on}

@@ -30,20 +30,20 @@ class SummaryView extends React.Component{ -*/
+
- } +*/ } } function mapStateToProps(state) { return { - to_buy_list: state.selectionReducers.to_buy_list, +/* to_buy_list: state.selectionReducers.to_buy_list, to_select: state.selectionReducers.to_select, this_vector_list: state.selectionReducers.this_vector_list, vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on - } +*/ } } From 01fc92c40b59ef28e2d36c547df4b000390f7cfd Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:34:26 +0100 Subject: [PATCH 045/311] debug --- js/components/summaryView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 1da5951a4..a449bdd85 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -174,15 +174,16 @@ function mapStateToProps(state) { this_vector_list: state.selectionReducers.this_vector_list, vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, - to_query: state.selectionReducers.to_query, + to_query: state.selectionReducers.to_query } } + const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, - loadObject: nglLoadActions.loadObject, + loadObject: nglLoadActions.loadObject } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From 9b82252ee8a922849ef364ff7f936f7a39dd243e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:36:18 +0100 Subject: [PATCH 046/311] debug --- js/components/currentState.js | 54 ----------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 js/components/currentState.js diff --git a/js/components/currentState.js b/js/components/currentState.js deleted file mode 100644 index 4474cf016..000000000 --- a/js/components/currentState.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Created by abradley on 15/03/2018. - */ -import React from 'react'; -import { connect } from 'react-redux' -import { Button, Well, Col, Row } from 'react-bootstrap' -import * as selectionActions from '../actions/selectionActions' -import * as nglLoadActions from '../actions/nglLoadActions' -import * as apiActions from '../actions/apiActions' -import CompoundList from './compoundList'; -import SummaryCmpd from './SummaryCmpd'; - -class SummaryView extends React.Component{ - constructor(props) { - super(props); - } - - render(){ -/* return
- - -

Current State:

-
- -

Target: {this.props.target_on}

-
- - - - - - -
-
-*/ } -} -function mapStateToProps(state) { - return { -/* to_buy_list: state.selectionReducers.to_buy_list, - to_select: state.selectionReducers.to_select, - this_vector_list: state.selectionReducers.this_vector_list, - vector_list: state.selectionReducers.vector_list, - querying: state.selectionReducers.querying, - to_query: state.selectionReducers.to_query, - target_on: state.apiReducers.target_on -*/ } -} - - -const mapDispatchToProps = { -// display_state: state.displayStateReducers.display_state -} - -export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From 6170f1dbb8b2428c97b781d22503432d45d66e44 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:37:22 +0100 Subject: [PATCH 047/311] debug --- js/containers/previewHolder.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index 588a32dd7..ff8cea191 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -9,7 +9,6 @@ import MolGroupList from '../components/molGroupList'; import MoleculeList from '../components/moleculeList'; import MolGroupSlider from '../components/molGroupSlider' import SummaryView from '../components/summaryView'; -import CurrentState from '../components/currentState'; class Preview extends Component { @@ -35,9 +34,6 @@ class Preview extends Component { - - - ) } From 5fa386acb5a070092dac002c3fdfcdbab77bc76f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:52:16 +0100 Subject: [PATCH 048/311] debug --- js/components/stateView.js | 53 ++++++++++++++++++++++++++++++++++ js/containers/previewHolder.js | 4 +++ 2 files changed, 57 insertions(+) create mode 100644 js/components/stateView.js diff --git a/js/components/stateView.js b/js/components/stateView.js new file mode 100644 index 000000000..b2e6ab34e --- /dev/null +++ b/js/components/stateView.js @@ -0,0 +1,53 @@ +/** + * Created by abradley on 15/03/2018. + */ +import React from 'react'; +import { connect } from 'react-redux' +import { Button, Well, Col, Row } from 'react-bootstrap' +import * as selectionActions from '../actions/selectionActions' +import * as nglLoadActions from '../actions/nglLoadActions' +import * as apiActions from '../actions/apiActions' +import CompoundList from './compoundList'; +import SummaryCmpd from './SummaryCmpd'; + +class SummaryView extends React.Component{ + constructor(props) { + super(props); + this.state = {list_len: 0, cost: 0, num_vectors: 0, num_series: 0, smiles: ""} + } + + render(){ + return
+ + + +

Current State:

+

Target on? {this.props.target_on}

+ + +
+
+
+ } +} +function mapStateToProps(state) { + return { + to_buy_list: state.selectionReducers.to_buy_list, + to_select: state.selectionReducers.to_select, + this_vector_list: state.selectionReducers.this_vector_list, + vector_list: state.selectionReducers.vector_list, + querying: state.selectionReducers.querying, + to_query: state.selectionReducers.to_query, + to_target: state.apiReducers.to_target + } +} + + + +const mapDispatchToProps = { + appendToBuyList: selectionActions.appendToBuyList, + selectVector: selectionActions.selectVector, + loadObject: nglLoadActions.loadObject +} + +export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/containers/previewHolder.js b/js/containers/previewHolder.js index ff8cea191..6894423d8 100644 --- a/js/containers/previewHolder.js +++ b/js/containers/previewHolder.js @@ -9,6 +9,7 @@ import MolGroupList from '../components/molGroupList'; import MoleculeList from '../components/moleculeList'; import MolGroupSlider from '../components/molGroupSlider' import SummaryView from '../components/summaryView'; +import StateView from '../components/stateView'; class Preview extends Component { @@ -34,6 +35,9 @@ class Preview extends Component { + + + ) } From 5aefbf91c46c608de5ee6d0717c85dd995ba91a0 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:55:57 +0100 Subject: [PATCH 049/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b2e6ab34e..ebe81aed9 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -22,7 +22,7 @@ class SummaryView extends React.Component{

Current State:

-

Target on? {this.props.target_on}

+

Target on? {this.target_on}

@@ -38,7 +38,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - to_target: state.apiReducers.to_target + target_on: state.apiReducers.target_on } } From 6bc585517dc4dcc3c0c79a548c7d643635089dd2 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:57:18 +0100 Subject: [PATCH 050/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index ebe81aed9..f137e9896 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -22,7 +22,7 @@ class SummaryView extends React.Component{

Current State:

-

Target on? {this.target_on}

+

Target on? {this.props.target_id}

@@ -38,7 +38,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - target_on: state.apiReducers.target_on + target_id: state.apiReducers.target_id } } From f1900921b3264ababa6ad55275c4d70ba93842a8 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:58:29 +0100 Subject: [PATCH 051/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index f137e9896..50f179390 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -22,7 +22,7 @@ class SummaryView extends React.Component{

Current State:

-

Target on? {this.props.target_id}

+

Target on? {this.state}

From 165038351da1740e61a5ded03ce14d430d19e3de Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 13:59:22 +0100 Subject: [PATCH 052/311] debug --- js/components/stateView.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 50f179390..b272d6cad 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -13,7 +13,6 @@ import SummaryCmpd from './SummaryCmpd'; class SummaryView extends React.Component{ constructor(props) { super(props); - this.state = {list_len: 0, cost: 0, num_vectors: 0, num_series: 0, smiles: ""} } render(){ @@ -22,7 +21,7 @@ class SummaryView extends React.Component{

Current State:

-

Target on? {this.state}

+

Target on? {this.props.target_id}

From 2b963c397200f9bdb1a2f6cc06032fe2644dd02a Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:02:17 +0100 Subject: [PATCH 053/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b272d6cad..9b01eb295 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -22,7 +22,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_id}

- + From e864029d919e0a87242aff70ab0c6afe1aeea7e7 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:13:10 +0100 Subject: [PATCH 054/311] debug --- js/components/stateView.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 9b01eb295..e46ee420c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -21,7 +21,7 @@ class SummaryView extends React.Component{

Current State:

-

Target on? {this.props.target_id}

+

Target on? {this.props.target_on}

@@ -37,8 +37,7 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - target_id: state.apiReducers.target_id - } + target_on: state.apiReducers.target_on } } From 4f64ac8e1075c4ad1ef4d84c53560e4a50eb89fb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:19:01 +0100 Subject: [PATCH 055/311] debug --- js/components/stateView.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index e46ee420c..3cc146283 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -22,6 +22,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

+

Target id? {this.props.target_id}

+

Project id? {this.props.project_id}

@@ -37,7 +39,10 @@ function mapStateToProps(state) { vector_list: state.selectionReducers.vector_list, querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, - target_on: state.apiReducers.target_on } + target_on: state.apiReducers.target_on, + target_id: state.apiReducers.target_id, + project_id: state.apiReducers.project_id + } } From 494bb0f464e3e298251830495abc7918ac685736 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:21:43 +0100 Subject: [PATCH 056/311] debug --- js/components/stateView.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 3cc146283..21db0ee3a 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -22,8 +22,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Target id? {this.props.target_id}

-

Project id? {this.props.project_id}

+

Group type? {this.props.group_type}

+

Mol Group List? {this.props.mol_group_list}

@@ -40,8 +40,8 @@ function mapStateToProps(state) { querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, - target_id: state.apiReducers.target_id, - project_id: state.apiReducers.project_id + group_type: state.apiReducers.group_type, + mol_group_list: state.apiReducers.mol_group_list } } From 658219ad9477370cadce32fa555b306c0494967e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:23:46 +0100 Subject: [PATCH 057/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 21db0ee3a..86f117c36 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Mol Group List? {this.props.mol_group_list}

+

Pandda Site? {this.props.pandda_site_on}

@@ -41,7 +41,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - mol_group_list: state.apiReducers.mol_group_list + pandda_site_on: state.apiReducers.pandda_site_on } } From a7b9fbf7ea780e5ed7d9405757c4d3c81cf5b0cb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:24:22 +0100 Subject: [PATCH 058/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 86f117c36..138661c2b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Pandda Site? {this.props.pandda_site_on}

+

Pandda Site? {this.props.pandda_site_id}

@@ -41,7 +41,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - pandda_site_on: state.apiReducers.pandda_site_on + pandda_site_id: state.apiReducers.pandda_site_id } } From 1da19004d0f8594bfc7b1b77965427741c5233e8 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:37:38 +0100 Subject: [PATCH 059/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 138661c2b..2f5918828 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Pandda Site? {this.props.pandda_site_id}

+

Pandda Site? {this.props.pandda_site_list}

@@ -41,7 +41,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - pandda_site_id: state.apiReducers.pandda_site_id + pandda_site_list: state.apiReducers.pandda_site_list } } From 6b36ce11cb4e9be06961b2765773c51a56834ba8 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:44:45 +0100 Subject: [PATCH 060/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 2f5918828..408e38e3d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -41,7 +41,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - pandda_site_list: state.apiReducers.pandda_site_list + ObjectsInView: state.apiReducers.ObjectsInView } } @@ -50,7 +50,7 @@ function mapStateToProps(state) { const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, - loadObject: nglLoadActions.loadObject + ObjectsInView: nglLoadActions.ObjectsInView } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From 20936d0670e7cb25ad6d7dcfadc305d54bd35c2b Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:45:21 +0100 Subject: [PATCH 061/311] debug --- js/components/stateView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 408e38e3d..995a2c6ff 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Pandda Site? {this.props.pandda_site_list}

+

Pandda Site? {this.props.ObjectsInView}

@@ -41,7 +41,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - ObjectsInView: state.apiReducers.ObjectsInView + ObjectsInView: state.nglReducers.ObjectsInView } } @@ -50,7 +50,7 @@ function mapStateToProps(state) { const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, - ObjectsInView: nglLoadActions.ObjectsInView + loadObject: nglLoadActions.loadObject } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file From 1b00dadd4a8a584c26ed4a7ea312e01e67bacb11 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:50:50 +0100 Subject: [PATCH 062/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 995a2c6ff..2b8d1a574 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Pandda Site? {this.props.ObjectsInView}

+

Molecule list? {this.props.molecule_list}

@@ -41,7 +41,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - ObjectsInView: state.nglReducers.ObjectsInView + molecule_list: state.apiReducers.molecule_list } } From 603de5280bffef6763878d647600e8cac40d9956 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 14:52:13 +0100 Subject: [PATCH 063/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 2b8d1a574..7819d7fac 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Molecule list? {this.props.molecule_list}

+

Molecule list?

From 4c6fa575eef4c8da579c5c44a1a2eb6d9445b487 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:14:04 +0100 Subject: [PATCH 064/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 7819d7fac..60d8b5fa6 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -24,7 +24,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Group type? {this.props.group_type}

Molecule list?

- + From 8fc39b3543fc06ad24cab14a49d28ba646f05117 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:14:48 +0100 Subject: [PATCH 065/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 60d8b5fa6..579c5d29a 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -24,7 +24,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Group type? {this.props.group_type}

Molecule list?

- + From 4ad697c6b52c087e13b1669e7a7aab78d87556d2 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:26:05 +0100 Subject: [PATCH 066/311] debug --- js/actions/actonTypes.js | 2 ++ js/actions/stateActions.js | 13 +++++++++++++ js/components/stateView.js | 6 ++++-- js/reducers/stateReducers.js | 27 +++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 js/actions/stateActions.js create mode 100644 js/reducers/stateReducers.js diff --git a/js/actions/actonTypes.js b/js/actions/actonTypes.js index 800634316..bea8b1fc7 100644 --- a/js/actions/actonTypes.js +++ b/js/actions/actonTypes.js @@ -53,3 +53,5 @@ export const SELECT_VECTOR = 'SELECT_VECTOR'; export const SET_MOL = 'SET_MOL'; export const SET_VECTOR_LIST = 'SET_VECTOR_LIST'; export const SET_ORIENTATION = 'SET_ORIENTATION'; +// State broadcast +export const STATE_ALERT = 'STATE_ALERT'; \ No newline at end of file diff --git a/js/actions/stateActions.js b/js/actions/stateActions.js new file mode 100644 index 000000000..bee1b5d34 --- /dev/null +++ b/js/actions/stateActions.js @@ -0,0 +1,13 @@ +/** + * Created by abradley on 15/03/2018. + */ + +import {STATE_ALERT} from './actonTypes' + +export const stateAlert = function (){ + console.log("ACTIONS: state alert") + return { + type: STATE_ALERT, + } +} + diff --git a/js/components/stateView.js b/js/components/stateView.js index 579c5d29a..64aab7955 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -9,6 +9,7 @@ import * as nglLoadActions from '../actions/nglLoadActions' import * as apiActions from '../actions/apiActions' import CompoundList from './compoundList'; import SummaryCmpd from './SummaryCmpd'; +import stateAlert from '../actions/stateActions' class SummaryView extends React.Component{ constructor(props) { @@ -24,7 +25,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Group type? {this.props.group_type}

Molecule list?

- + @@ -50,7 +51,8 @@ function mapStateToProps(state) { const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, - loadObject: nglLoadActions.loadObject + loadObject: nglLoadActions.loadObject, + stateAlert: stateActions.stateAlert } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js new file mode 100644 index 000000000..9e496c764 --- /dev/null +++ b/js/reducers/stateReducers.js @@ -0,0 +1,27 @@ +/** + * Created by abradley on 07/03/2018. + */ +import * as actions from '../actions/actonTypes' + + +const INITIALSTATE = { + +} + + +export default function stateReducers(state = INITIALSTATE, action) { + console.log(state); + alert(state); + + switch (action.type) { + // Defined in initialState - but may be needed if we want to load a different structure + case actions.STATE_ALERT: + return Object.assign({}, state, { + + }); + + // Cases like: @@redux/INIT + default: + return state; + } +} From e8c9c92aa1670bede025ecadcfc544194d952211 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:27:22 +0100 Subject: [PATCH 067/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 64aab7955..efd202ef7 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -9,7 +9,7 @@ import * as nglLoadActions from '../actions/nglLoadActions' import * as apiActions from '../actions/apiActions' import CompoundList from './compoundList'; import SummaryCmpd from './SummaryCmpd'; -import stateAlert from '../actions/stateActions' +import * as stateActions from '../actions/stateActions' class SummaryView extends React.Component{ constructor(props) { From fa8f900c4544552266d94e2a9bf195978e0b074f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:37:56 +0100 Subject: [PATCH 068/311] debug --- js/components/stateView.js | 1 - js/reducers/stateReducers.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index efd202ef7..928c17485 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -24,7 +24,6 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Group type? {this.props.group_type}

-

Molecule list?

diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 9e496c764..1efae8a01 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -11,13 +11,12 @@ const INITIALSTATE = { export default function stateReducers(state = INITIALSTATE, action) { console.log(state); - alert(state); switch (action.type) { // Defined in initialState - but may be needed if we want to load a different structure case actions.STATE_ALERT: return Object.assign({}, state, { - + alert(state); }); // Cases like: @@redux/INIT From 9692765c328edf01d6697922239aade68cd1ceee Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:47:35 +0100 Subject: [PATCH 069/311] debug --- js/actions/actonTypes.js | 3 ++- js/actions/stateActions.js | 11 +++++++++-- js/components/stateView.js | 4 +++- js/reducers/stateReducers.js | 7 ++++++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/js/actions/actonTypes.js b/js/actions/actonTypes.js index bea8b1fc7..fdb1a5637 100644 --- a/js/actions/actonTypes.js +++ b/js/actions/actonTypes.js @@ -54,4 +54,5 @@ export const SET_MOL = 'SET_MOL'; export const SET_VECTOR_LIST = 'SET_VECTOR_LIST'; export const SET_ORIENTATION = 'SET_ORIENTATION'; // State broadcast -export const STATE_ALERT = 'STATE_ALERT'; \ No newline at end of file +export const STATE_ALERT = 'STATE_ALERT'; +export const STATE_SPECIFY = 'STATE_SPECIFY'; \ No newline at end of file diff --git a/js/actions/stateActions.js b/js/actions/stateActions.js index bee1b5d34..e02f1764c 100644 --- a/js/actions/stateActions.js +++ b/js/actions/stateActions.js @@ -5,9 +5,16 @@ import {STATE_ALERT} from './actonTypes' export const stateAlert = function (){ - console.log("ACTIONS: state alert") + console.log("ACTIONS: user extracting state") return { - type: STATE_ALERT, + type: STATE_ALERT + } +} + +export const stateSpecify = function (){ + console.log("ACTIONS: user inserting state") + return { + type: STATE_SPECIFY } } diff --git a/js/components/stateView.js b/js/components/stateView.js index 928c17485..e6cdc39a9 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -25,6 +25,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Group type? {this.props.group_type}

+ @@ -51,7 +52,8 @@ const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, loadObject: nglLoadActions.loadObject, - stateAlert: stateActions.stateAlert + stateAlert: stateActions.stateAlert, + stateSpecify: stateActions.stateSpecify } export default connect(mapStateToProps, mapDispatchToProps)(SummaryView); \ No newline at end of file diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 1efae8a01..fa7916442 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -17,7 +17,12 @@ export default function stateReducers(state = INITIALSTATE, action) { case actions.STATE_ALERT: return Object.assign({}, state, { alert(state); - }); + }) + + case actions.STATE_SPECIFY: + return Object.assign({}, state, { + prompt("What state would you like to return to?"); + }) // Cases like: @@redux/INIT default: From f2f115cb13fffd2795709600ddfc631567009a56 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:49:22 +0100 Subject: [PATCH 070/311] debug --- js/actions/stateActions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/actions/stateActions.js b/js/actions/stateActions.js index e02f1764c..e1a2a3f90 100644 --- a/js/actions/stateActions.js +++ b/js/actions/stateActions.js @@ -2,7 +2,7 @@ * Created by abradley on 15/03/2018. */ -import {STATE_ALERT} from './actonTypes' +import {STATE_ALERT, STATE_SPECIFY} from './actonTypes' export const stateAlert = function (){ console.log("ACTIONS: user extracting state") From 7b6566e2e4f4d97e66f17642d085f288e9d25b22 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:51:19 +0100 Subject: [PATCH 071/311] debug --- js/reducers/stateReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index fa7916442..a4f90c2a9 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -16,7 +16,7 @@ export default function stateReducers(state = INITIALSTATE, action) { // Defined in initialState - but may be needed if we want to load a different structure case actions.STATE_ALERT: return Object.assign({}, state, { - alert(state); + alert("state"); }) case actions.STATE_SPECIFY: From e0c920924b56c47dc21fc2aa9f3e6850fa5b1e37 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 22 May 2018 17:53:03 +0100 Subject: [PATCH 072/311] debug --- js/actions/stateActions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/actions/stateActions.js b/js/actions/stateActions.js index e1a2a3f90..88f9ae861 100644 --- a/js/actions/stateActions.js +++ b/js/actions/stateActions.js @@ -13,6 +13,7 @@ export const stateAlert = function (){ export const stateSpecify = function (){ console.log("ACTIONS: user inserting state") + prompt("What state would you like to return to?"); return { type: STATE_SPECIFY } From 21f584acde22c660a7a7cbb376bdc664a95cac77 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:23:36 +0100 Subject: [PATCH 073/311] debug --- js/actions/stateActions.js | 1 - js/components/stateView.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/actions/stateActions.js b/js/actions/stateActions.js index 88f9ae861..e1a2a3f90 100644 --- a/js/actions/stateActions.js +++ b/js/actions/stateActions.js @@ -13,7 +13,6 @@ export const stateAlert = function (){ export const stateSpecify = function (){ console.log("ACTIONS: user inserting state") - prompt("What state would you like to return to?"); return { type: STATE_SPECIFY } diff --git a/js/components/stateView.js b/js/components/stateView.js index e6cdc39a9..b33a77d04 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Group type? {this.props.group_type}

+

Objects in view? {this.props.objects_in_view}

@@ -42,7 +42,7 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - molecule_list: state.apiReducers.molecule_list + objects_in_view: state.nglReducers.objectsInView } } From d25c30bbb9ab33807cc81b86496417461e9236e3 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:28:17 +0100 Subject: [PATCH 074/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b33a77d04..6f646cd8b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {this.props.objects_in_view}

+

Objects in view? {toString(this.props.objects_in_view)}

From 0f4691c0db028fb0f9f3deb119c126541f1c26a1 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:33:20 +0100 Subject: [PATCH 075/311] debug --- js/components/stateView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 6f646cd8b..806d9fcb8 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -24,6 +24,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {toString(this.props.objects_in_view)}

+

Objects to load? {toString(this.props.objects_to_load)}

@@ -42,7 +43,8 @@ function mapStateToProps(state) { to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, - objects_in_view: state.nglReducers.objectsInView + objects_in_view: state.nglReducers.objectsInView, + objects_to_load: state.nglReducers.objectsToLoad } } From 746b78194e0257ceba684ad1832330886b202cf3 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:43:57 +0100 Subject: [PATCH 076/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 806d9fcb8..fadd3377b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,8 +23,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {toString(this.props.objects_in_view)}

-

Objects to load? {toString(this.props.objects_to_load)}

+

Objects in view? {this.props.objects_in_view}

+

Objects to load? {this.props.objects_to_load}

From d2d1713dfe8dcd7b237429c6e604450487737b9d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:45:12 +0100 Subject: [PATCH 077/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index fadd3377b..90123af73 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,8 +23,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {this.props.objects_in_view}

-

Objects to load? {this.props.objects_to_load}

+

Objects in view? {this.props.objects_in_view.length}

+

Objects to load? {this.props.objects_to_load.length}

From 1e6ea038c704a970c1b7f4a6d9cabd49d6efd053 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:49:24 +0100 Subject: [PATCH 078/311] debug --- js/components/stateView.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 90123af73..405ea087d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -51,9 +51,6 @@ function mapStateToProps(state) { const mapDispatchToProps = { - appendToBuyList: selectionActions.appendToBuyList, - selectVector: selectionActions.selectVector, - loadObject: nglLoadActions.loadObject, stateAlert: stateActions.stateAlert, stateSpecify: stateActions.stateSpecify } From c54bc40b9c93a7a671a6b12a1b731df77546bd01 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 08:59:15 +0100 Subject: [PATCH 079/311] debug --- js/reducers/stateReducers.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index a4f90c2a9..0663ec3ff 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -5,18 +5,25 @@ import * as actions from '../actions/actonTypes' const INITIALSTATE = { - + objectsToLoad: {}, + objectsInView: {} } export default function stateReducers(state = INITIALSTATE, action) { + console.log('REDUCERS FIRED OFF. OLD STATE'); console.log(state); + console.log('action.type=' + action.type); switch (action.type) { // Defined in initialState - but may be needed if we want to load a different structure case actions.STATE_ALERT: + var objectsInView = state.objectsInView + + return Object.assign({}, state, { + objectsInView: objectsInView return Object.assign({}, state, { - alert("state"); + alert(objectsInView); }) case actions.STATE_SPECIFY: From bdba058a361bb883480d9a29e97c32f5d23b00a1 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:14:26 +0100 Subject: [PATCH 080/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 405ea087d..37c3ec5bc 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {this.props.objects_in_view.length}

+

Objects in view? {this.props.objects_in_view.MOLGROUPSSELECT10.id}

Objects to load? {this.props.objects_to_load.length}

From 02b042078e8002548355bb850a81ca1b0507ca22 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:15:42 +0100 Subject: [PATCH 081/311] debug --- js/components/summaryView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/components/summaryView.js b/js/components/summaryView.js index a449bdd85..74cc03bc1 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,6 +152,7 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

+ From 399dfd265330657b539fafa1419293e7ed2ef6b0 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:17:45 +0100 Subject: [PATCH 082/311] debug --- js/components/stateView.js | 2 +- js/components/summaryView.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 37c3ec5bc..405ea087d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -23,7 +23,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {this.props.objects_in_view.MOLGROUPSSELECT10.id}

+

Objects in view? {this.props.objects_in_view.length}

Objects to load? {this.props.objects_to_load.length}

diff --git a/js/components/summaryView.js b/js/components/summaryView.js index 74cc03bc1..a449bdd85 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -152,7 +152,6 @@ class SummaryView extends React.Component{

Number vectors explored: {this.state.num_vectors}

Number series explored: {this.state.num_series}

Estimated cost: £{this.state.cost}

- From 33f0b313e10d80303a3bd0295465e127a8f6160d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:22:42 +0100 Subject: [PATCH 083/311] debug --- js/components/stateView.js | 2 -- js/reducers/stateReducers.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 405ea087d..36a1ef55c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -48,8 +48,6 @@ function mapStateToProps(state) { } } - - const mapDispatchToProps = { stateAlert: stateActions.stateAlert, stateSpecify: stateActions.stateSpecify diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 0663ec3ff..3aa1e20dd 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -28,7 +28,7 @@ export default function stateReducers(state = INITIALSTATE, action) { case actions.STATE_SPECIFY: return Object.assign({}, state, { - prompt("What state would you like to return to?"); + console.log("What state would you like to return to?"); }) // Cases like: @@redux/INIT From 18cfdf49b55640264f30194940f2134a9acd1e09 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:24:28 +0100 Subject: [PATCH 084/311] debug --- js/reducers/stateReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 3aa1e20dd..4b63d7a97 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -27,8 +27,8 @@ export default function stateReducers(state = INITIALSTATE, action) { }) case actions.STATE_SPECIFY: + console.log("What state would you like to return to?"); return Object.assign({}, state, { - console.log("What state would you like to return to?"); }) // Cases like: @@redux/INIT From 7c6957b591dfe0f8a64df99b8c35d266ff9f6c5e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:26:18 +0100 Subject: [PATCH 085/311] debug --- js/reducers/stateReducers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 4b63d7a97..2b7c78583 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -27,7 +27,7 @@ export default function stateReducers(state = INITIALSTATE, action) { }) case actions.STATE_SPECIFY: - console.log("What state would you like to return to?"); + alert("What state would you like to return to?"); return Object.assign({}, state, { }) From 2dd12a22cfbd33a78646ff03a439445f8edfca1c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:29:06 +0100 Subject: [PATCH 086/311] debug --- js/components/stateView.js | 2 +- js/reducers/stateReducers.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 36a1ef55c..4de96e530 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -25,7 +25,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

Objects to load? {this.props.objects_to_load.length}

- + diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 2b7c78583..f366b4518 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -27,10 +27,8 @@ export default function stateReducers(state = INITIALSTATE, action) { }) case actions.STATE_SPECIFY: - alert("What state would you like to return to?"); return Object.assign({}, state, { }) - // Cases like: @@redux/INIT default: return state; From 1adb1abb7b4de1a6f5db3c4b0e58c4c80079690e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:33:08 +0100 Subject: [PATCH 087/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4de96e530..8bd896e21 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -25,7 +25,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

Objects to load? {this.props.objects_to_load.length}

- + From a7e3542dc6eb19f65473d739eaf1205269fef0ae Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:35:31 +0100 Subject: [PATCH 088/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8bd896e21..faf90fc32 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -25,7 +25,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

Objects to load? {this.props.objects_to_load.length}

- + From 758a6a2b9e68196cf25b226d1d9bab806ccb5b76 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 11:47:00 +0100 Subject: [PATCH 089/311] debug --- js/reducers/stateReducers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index f366b4518..9405e971a 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -19,15 +19,15 @@ export default function stateReducers(state = INITIALSTATE, action) { // Defined in initialState - but may be needed if we want to load a different structure case actions.STATE_ALERT: var objectsInView = state.objectsInView - return Object.assign({}, state, { objectsInView: objectsInView return Object.assign({}, state, { - alert(objectsInView); }) case actions.STATE_SPECIFY: + var objectsToLoad = state.objectsToLoad return Object.assign({}, state, { + objectsToLoad: objectsToLoad }) // Cases like: @@redux/INIT default: From 17831ad78d163484ea7da5f500becd515a177ae3 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 12:10:54 +0100 Subject: [PATCH 090/311] debug --- js/components/stateView.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index faf90fc32..962c1ac76 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -1,5 +1,5 @@ /** - * Created by abradley on 15/03/2018. + * Created by rgillams on 22/05/2018. */ import React from 'react'; import { connect } from 'react-redux' @@ -14,6 +14,11 @@ import * as stateActions from '../actions/stateActions' class SummaryView extends React.Component{ constructor(props) { super(props); + this.handleStateExport = this.handleStateExport.bind(this); + } + + handleStateExport(){ + alert(this.props.objects_in_view); } render(){ @@ -26,7 +31,7 @@ class SummaryView extends React.Component{

Objects in view? {this.props.objects_in_view.length}

Objects to load? {this.props.objects_to_load.length}

- + From 15ca4ea72e80e693189c196501c3ef3cb9676f38 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:19:11 +0100 Subject: [PATCH 091/311] debug --- js/components/stateView.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 962c1ac76..fd52bfadb 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -17,11 +17,16 @@ class SummaryView extends React.Component{ this.handleStateExport = this.handleStateExport.bind(this); } + handleStateExport(){ alert(this.props.objects_in_view); } - render(){ + handleStateImport(){ + prompt("Please insert state hers:") + } + + render(){ return
@@ -30,8 +35,8 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

Objects to load? {this.props.objects_to_load.length}

- - + +
From 2ecc9b45e6f6d1bd25fb7ffc9268fcf9ec90216c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:22:01 +0100 Subject: [PATCH 092/311] debug --- js/components/stateView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index fd52bfadb..5816961b7 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -15,15 +15,16 @@ class SummaryView extends React.Component{ constructor(props) { super(props); this.handleStateExport = this.handleStateExport.bind(this); + this.handleStateImport = this.handleStateImport.bind(this); } handleStateExport(){ - alert(this.props.objects_in_view); + alert("copy this to store state:\n"this.props.objects_in_view); } handleStateImport(){ - prompt("Please insert state hers:") + prompt("Please insert state here:") } render(){ From 43182b4bed0bf556b7edb6081c49b1b5a1325b86 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:22:33 +0100 Subject: [PATCH 093/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 5816961b7..be83a14c2 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ handleStateExport(){ - alert("copy this to store state:\n"this.props.objects_in_view); + alert("copy this to store state:\n" + this.props.objects_in_view); } handleStateImport(){ From d503dcf17aad03d8cfd0023d519a868e8fa38c14 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:30:56 +0100 Subject: [PATCH 094/311] debug --- js/components/stateView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index be83a14c2..b5bdad860 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -24,7 +24,8 @@ class SummaryView extends React.Component{ } handleStateImport(){ - prompt("Please insert state here:") + var insertedState = prompt("Please insert state here:"); + return insertedState; } render(){ @@ -35,7 +36,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

-

Objects to load? {this.props.objects_to_load.length}

+

Objects to load? {this.handleStateimport()}

From ff66f4e63e822974bd45c67aa1ca99816eab508f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:32:26 +0100 Subject: [PATCH 095/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b5bdad860..af211b555 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -36,7 +36,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

-

Objects to load? {this.handleStateimport()}

+

Objects to load? {this.insertedState}

From 46480f064c74083eb7459cde3ab07a4c006fba75 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:41:40 +0100 Subject: [PATCH 096/311] debug --- js/components/stateView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index af211b555..e6116ec83 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -26,6 +26,7 @@ class SummaryView extends React.Component{ handleStateImport(){ var insertedState = prompt("Please insert state here:"); return insertedState; + this.props.objects_to_load = insertedState; } render(){ @@ -36,7 +37,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

-

Objects to load? {this.insertedState}

+

Objects to load? {this.props.objects_to_load}

From 88d758c7c5a8ecc08bd0673e1dc5678d0ed12574 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:42:39 +0100 Subject: [PATCH 097/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index e6116ec83..91d799831 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -37,7 +37,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

-

Objects to load? {this.props.objects_to_load}

+

Objects to load? {this.insertedState}

From 828c9a7ddcc49af197ba41458696c68e3696f45d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:51:28 +0100 Subject: [PATCH 098/311] debug --- js/components/stateView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 91d799831..3afd8bca0 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,13 @@ class SummaryView extends React.Component{ handleStateExport(){ - alert("copy this to store state:\n" + this.props.objects_in_view); + var stateToSave = this.props.objects_in_view); + var encodedUri = encodeURI(StateToSave); + var link = document.createElement("a"); + link.setAttribute("href", encodedUri); + link.setAttribute("download", "savedState.json"); + document.body.appendChild(link); // Required for FF + link.click(); } handleStateImport(){ From 7c9b21f81a3377d5f57c480166b570070995c198 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 13:52:04 +0100 Subject: [PATCH 099/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 3afd8bca0..31a26b167 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ handleStateExport(){ - var stateToSave = this.props.objects_in_view); + var stateToSave = this.props.objects_in_view; var encodedUri = encodeURI(StateToSave); var link = document.createElement("a"); link.setAttribute("href", encodedUri); From 2e60c024b0ec1b64e2828914eaa12e35fb42b62f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:05:19 +0100 Subject: [PATCH 100/311] debug --- js/components/stateView.js | 3 +-- js/components/summaryView.js | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 31a26b167..47110c483 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,8 +20,7 @@ class SummaryView extends React.Component{ handleStateExport(){ - var stateToSave = this.props.objects_in_view; - var encodedUri = encodeURI(StateToSave); + var encodedUri = encodeURI(this.props.objects_in_view); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); diff --git a/js/components/summaryView.js b/js/components/summaryView.js index a449bdd85..1aa25b340 100644 --- a/js/components/summaryView.js +++ b/js/components/summaryView.js @@ -178,8 +178,6 @@ function mapStateToProps(state) { } } - - const mapDispatchToProps = { appendToBuyList: selectionActions.appendToBuyList, selectVector: selectionActions.selectVector, From 30a4d2facadb7fed6b0cfc9e1b21ee2723aefb5a Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:08:06 +0100 Subject: [PATCH 101/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 47110c483..b96a01e30 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ handleStateExport(){ - var encodedUri = encodeURI(this.props.objects_in_view); + var encodedUri = encodeURI(String(this.props.objects_in_view)); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); From 6080f8177fea79efc0ce974d6de2bfe6979c3bf1 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:09:04 +0100 Subject: [PATCH 102/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b96a01e30..8a74f486f 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ handleStateExport(){ - var encodedUri = encodeURI(String(this.props.objects_in_view)); + var encodedUri = encodeURI(String(this.props.objects_in_view.length)); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); From ec53aa71d841aaad94ee36b48fe2705ffbaa7471 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:11:03 +0100 Subject: [PATCH 103/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8a74f486f..8397d903c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ handleStateExport(){ - var encodedUri = encodeURI(String(this.props.objects_in_view.length)); + var encodedUri = encodeURI(String(this.props.objects_in_view.length) + "a test string"); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); From 9be7df1378597c41112f1436aefbd10e63934e1e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:47:11 +0100 Subject: [PATCH 104/311] debug --- js/components/stateView.js | 19 ++++++++++++++++++- js/reducers/stateReducers.js | 3 +-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8397d903c..c7d481574 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -18,9 +18,26 @@ class SummaryView extends React.Component{ this.handleStateImport = this.handleStateImport.bind(this); } + convert_data_to_list(input_list){ + var outArray = new Array(); + var headerArray = ["smiles"]; + outArray.push(headerArray) + for(var item in input_list){ + var newArray = new Array(); + newArray.push(input_list[item].smiles) + outArray.push(newArray) + } + return outArray; + } handleStateExport(){ - var encodedUri = encodeURI(String(this.props.objects_in_view.length) + "a test string"); + const rows = this.convert_data_to_list(this.props.objects_in_view); + let jsonContent = "data:text/csv;charset=utf-8,"; + rows.forEach(function(rowArray){ + let row = rowArray.join(","); + csvContent += row + "\r\n"; + }); + var encodedUri = encodeURI(jsonContent) + "a test string"); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 9405e971a..e856759df 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -21,7 +21,6 @@ export default function stateReducers(state = INITIALSTATE, action) { var objectsInView = state.objectsInView return Object.assign({}, state, { objectsInView: objectsInView - return Object.assign({}, state, { }) case actions.STATE_SPECIFY: @@ -29,7 +28,7 @@ export default function stateReducers(state = INITIALSTATE, action) { return Object.assign({}, state, { objectsToLoad: objectsToLoad }) - // Cases like: @@redux/INIT + default: return state; } From 6c9aa636349be57a2319c8b398ba0d2981bdba95 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:48:04 +0100 Subject: [PATCH 105/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index c7d481574..9c74ff660 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -37,7 +37,7 @@ class SummaryView extends React.Component{ let row = rowArray.join(","); csvContent += row + "\r\n"; }); - var encodedUri = encodeURI(jsonContent) + "a test string"); + var encodedUri = encodeURI(jsonContent); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); From f194adf3afdfb75bbe871e197ac3e42f3d22c91d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 14:48:48 +0100 Subject: [PATCH 106/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 9c74ff660..232404656 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -35,7 +35,7 @@ class SummaryView extends React.Component{ let jsonContent = "data:text/csv;charset=utf-8,"; rows.forEach(function(rowArray){ let row = rowArray.join(","); - csvContent += row + "\r\n"; + jsonContent += row + "\r\n"; }); var encodedUri = encodeURI(jsonContent); var link = document.createElement("a"); From 072f4f3817e68064f79314b9681e3f2407fce8c4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:04:10 +0100 Subject: [PATCH 107/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 232404656..aa6994545 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {this.props.objects_in_view.length}

-

Objects to load? {this.insertedState}

+

Objects to load? {JSON.stringify(this.props.objects_in_view)}

From 7170d33d90991bc9f2877d90331a08261b4f1d26 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:17:28 +0100 Subject: [PATCH 108/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index aa6994545..b35b74e9b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -58,8 +58,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {this.props.objects_in_view.length}

-

Objects to load? {JSON.stringify(this.props.objects_in_view)}

+

Objects in view? {JSON.stringify(this.props.objects_in_view)}

+

Objects to load? {JSON.stringify(this.props.objects_to_load}

From 9b26bfef59e5054f49633a63bee1cbde1b30f460 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:17:49 +0100 Subject: [PATCH 109/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b35b74e9b..3c9129a38 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Objects in view? {JSON.stringify(this.props.objects_in_view)}

-

Objects to load? {JSON.stringify(this.props.objects_to_load}

+

Objects to load? {JSON.stringify(this.props.objects_to_load)}

From 0c1577a8709d3b2e88dc3b11a1859d2794493ad6 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:20:59 +0100 Subject: [PATCH 110/311] debug --- js/components/stateView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 3c9129a38..205a0b8ff 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -58,6 +58,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

+

Water? {this.props.water}

Objects in view? {JSON.stringify(this.props.objects_in_view)}

Objects to load? {JSON.stringify(this.props.objects_to_load)}

@@ -79,7 +80,8 @@ function mapStateToProps(state) { target_on: state.apiReducers.target_on, group_type: state.apiReducers.group_type, objects_in_view: state.nglReducers.objectsInView, - objects_to_load: state.nglReducers.objectsToLoad + objects_to_load: state.nglReducers.objectsToLoad, + water: state.nglReducers.water, } } From 16452d6e63f1e1989f42479bdd1dd561b7d5e7ff Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:23:02 +0100 Subject: [PATCH 111/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 205a0b8ff..d255d75dd 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,7 +60,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Water? {this.props.water}

Objects in view? {JSON.stringify(this.props.objects_in_view)}

-

Objects to load? {JSON.stringify(this.props.objects_to_load)}

+

Objects to load? {JSON.stringify(this.props.objects_to_load.toString())}

From b87b5af9bbfc59cad44f4e25c633a9ce51713d0f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:24:14 +0100 Subject: [PATCH 112/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d255d75dd..7adb6189b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,8 +59,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water}

-

Objects in view? {JSON.stringify(this.props.objects_in_view)}

-

Objects to load? {JSON.stringify(this.props.objects_to_load.toString())}

+

Objects in view? {this.props.objects_in_view.toString()}

+

Objects to load? {this.props.objects_to_load.toString()}

From 50c963a88b2cb8620c58c5c29528343637853d8e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:26:15 +0100 Subject: [PATCH 113/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 7adb6189b..8d1b4a880 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -58,7 +58,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Water? {this.props.water}

+

Water? {this.props.water.toString()}

Objects in view? {this.props.objects_in_view.toString()}

Objects to load? {this.props.objects_to_load.toString()}

From 26aff780e88ba1d96c994185447134bd5144be86 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:33:31 +0100 Subject: [PATCH 114/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8d1b4a880..0efd69a5d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {this.props.objects_in_view.toString()}

+

Objects in view? {this.props.objects_in_view.join()}

Objects to load? {this.props.objects_to_load.toString()}

From 3baa13c08c4f979d547a4ed908a054a625e485ea Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:37:04 +0100 Subject: [PATCH 115/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 0efd69a5d..8d1b4a880 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {this.props.objects_in_view.join()}

+

Objects in view? {this.props.objects_in_view.toString()}

Objects to load? {this.props.objects_to_load.toString()}

From dd064a1cd2ccb5e45ca5f51fb809ade5e9bd7e09 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:39:13 +0100 Subject: [PATCH 116/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8d1b4a880..ac287ac4d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,8 +59,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {this.props.objects_in_view.toString()}

-

Objects to load? {this.props.objects_to_load.toString()}

+

Objects in view? {this.props.objects_in_view.length}

+

Objects to load? {this.props.objects_to_load.length}

From 0f768b6149736dc89f686e1c1a0321878277c24d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 17:47:06 +0100 Subject: [PATCH 117/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index ac287ac4d..70ccb9582 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {this.props.objects_in_view.length}

+

Objects in view? {Object.keys(this.props.objects_in_view).length}

Objects to load? {this.props.objects_to_load.length}

From 524398b857c2ce5a6fbfc4d519dce4e7e9d9949e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Wed, 23 May 2018 18:16:28 +0100 Subject: [PATCH 118/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 70ccb9582..d857fb56f 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {Object.keys(this.props.objects_in_view).length}

+

Objects in view? {Object.keys(this.props.objects_in_view)}

Objects to load? {this.props.objects_to_load.length}

From 8f2e3e174269cc0b4b3379dd3414034da27afd20 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 08:29:41 +0100 Subject: [PATCH 119/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d857fb56f..92cdf118d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,7 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {Object.keys(this.props.objects_in_view)}

+

Objects in view? {Object.keys(this.props.objects_in_view).toString()}

Objects to load? {this.props.objects_to_load.length}

From 8dc3a189b3ded9e1fadd512479e8cba21cf19a2d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 08:45:19 +0100 Subject: [PATCH 120/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 92cdf118d..cac1e24eb 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -31,7 +31,7 @@ class SummaryView extends React.Component{ } handleStateExport(){ - const rows = this.convert_data_to_list(this.props.objects_in_view); + const rows = this.convert_data_to_list(Object.keys{this.props.objects_in_view}); let jsonContent = "data:text/csv;charset=utf-8,"; rows.forEach(function(rowArray){ let row = rowArray.join(","); From 7404646c208ac6d3efbbfed2e178846f3e91cba6 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 08:47:03 +0100 Subject: [PATCH 121/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index cac1e24eb..f5149f37c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -31,7 +31,7 @@ class SummaryView extends React.Component{ } handleStateExport(){ - const rows = this.convert_data_to_list(Object.keys{this.props.objects_in_view}); + const rows = this.convert_data_to_list(JSON.stringify(Object.keys{this.props.objects_in_view})); let jsonContent = "data:text/csv;charset=utf-8,"; rows.forEach(function(rowArray){ let row = rowArray.join(","); From 20fbcf9c6fbf715a7a526ef4b775719fcc59f282 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 08:47:54 +0100 Subject: [PATCH 122/311] debug --- js/components/stateView.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index f5149f37c..c59dccd63 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -31,12 +31,7 @@ class SummaryView extends React.Component{ } handleStateExport(){ - const rows = this.convert_data_to_list(JSON.stringify(Object.keys{this.props.objects_in_view})); - let jsonContent = "data:text/csv;charset=utf-8,"; - rows.forEach(function(rowArray){ - let row = rowArray.join(","); - jsonContent += row + "\r\n"; - }); + jsonContent = JSON.stringify(Object.keys{this.props.objects_in_view}); var encodedUri = encodeURI(jsonContent); var link = document.createElement("a"); link.setAttribute("href", encodedUri); From b82b59f9a8e6729b746745a64b1b144999c75185 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 08:48:44 +0100 Subject: [PATCH 123/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index c59dccd63..7b3b2e7fb 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -31,7 +31,7 @@ class SummaryView extends React.Component{ } handleStateExport(){ - jsonContent = JSON.stringify(Object.keys{this.props.objects_in_view}); + jsonContent = Object.keys{this.props.objects_in_view}.toString(); var encodedUri = encodeURI(jsonContent); var link = document.createElement("a"); link.setAttribute("href", encodedUri); From fe6aa777d2b47499442f3fe5fb4f38dc9d0afe88 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 08:49:35 +0100 Subject: [PATCH 124/311] debug --- js/components/stateView.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 7b3b2e7fb..b3b047406 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -31,8 +31,7 @@ class SummaryView extends React.Component{ } handleStateExport(){ - jsonContent = Object.keys{this.props.objects_in_view}.toString(); - var encodedUri = encodeURI(jsonContent); + var encodedUri = encodeURI(Object.keys{this.props.objects_in_view}.toString()); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); From 6bd99c489dabba59e550206000b0f69c989bd477 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 09:30:41 +0100 Subject: [PATCH 125/311] debug --- js/components/stateView.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b3b047406..812dd3bf1 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,6 +19,7 @@ class SummaryView extends React.Component{ } convert_data_to_list(input_list){ + let data var outArray = new Array(); var headerArray = ["smiles"]; outArray.push(headerArray) @@ -31,7 +32,8 @@ class SummaryView extends React.Component{ } handleStateExport(){ - var encodedUri = encodeURI(Object.keys{this.props.objects_in_view}.toString()); + jsonNglState = JSON.stringify(this.props.objects_in_view); + var encodedUri = encodeURI(jsonNglState); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "savedState.json"); @@ -53,8 +55,8 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

-

Objects in view? {Object.keys(this.props.objects_in_view).toString()}

-

Objects to load? {this.props.objects_to_load.length}

+

Objects in view? {Object.keys(this.props.objects_in_view)}

+

Objects to load? {Object.keys(this.props.objects_to_load.length}

From 0cc1570ec9723d7c81c73e18f2ee3a0bdf1b82ca Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 09:31:50 +0100 Subject: [PATCH 126/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 812dd3bf1..57aefca64 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -56,7 +56,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Water? {this.props.water.toString()}

Objects in view? {Object.keys(this.props.objects_in_view)}

-

Objects to load? {Object.keys(this.props.objects_to_load.length}

+

Number of objects? {Object.keys(this.props.objects_in_view).length}

From a902a3f6c9b002a66f977f32c53bc1dea43a68f1 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 09:38:17 +0100 Subject: [PATCH 127/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 57aefca64..2adef1c5b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -54,9 +54,9 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Water? {this.props.water.toString()}

Objects in view? {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

+

Stringified: {JSON.stringify(this.props.objects_in_view)}

From be5754fe6b889d29a6ce4664502577f53b87bc4f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 09:55:14 +0100 Subject: [PATCH 128/311] debug --- js/components/stateView.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 2adef1c5b..45db7f939 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -18,21 +18,8 @@ class SummaryView extends React.Component{ this.handleStateImport = this.handleStateImport.bind(this); } - convert_data_to_list(input_list){ - let data - var outArray = new Array(); - var headerArray = ["smiles"]; - outArray.push(headerArray) - for(var item in input_list){ - var newArray = new Array(); - newArray.push(input_list[item].smiles) - outArray.push(newArray) - } - return outArray; - } - handleStateExport(){ - jsonNglState = JSON.stringify(this.props.objects_in_view); + var jsonNglState = JSON.stringify(this.props.objects_in_view); var encodedUri = encodeURI(jsonNglState); var link = document.createElement("a"); link.setAttribute("href", encodedUri); From 1590b8f74b83def8c5aef50c93d5f3f8e659354d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 10:44:55 +0100 Subject: [PATCH 129/311] debug --- js/components/stateView.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 45db7f939..e3ec3fc3b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -18,6 +18,31 @@ class SummaryView extends React.Component{ this.handleStateImport = this.handleStateImport.bind(this); } + convert_state_to_template(input_json){ + var outputArray = ["uuid": UUID, + "title": TITLE, + "scene": JSON_OF_SCENE]; + outputArray.scene = input_json; + } + return outputArray; + } + + handleExport() { + const rows = this.convert_state_to_template(this.props.objects_in_view); + let csvContent = "data:text/csv;charset=utf-8,"; + rows.forEach(function (rowArray) { + let row = rowArray.join(","); + csvContent += row + "\r\n"; + }); + var encodedUri = encodeURI(csvContent); + var link = document.createElement("a"); + link.setAttribute("href", encodedUri); + link.setAttribute("download", "follow_ups.csv"); + document.body.appendChild(link); // Required for FF + link.click(); + } + + handleStateExport(){ var jsonNglState = JSON.stringify(this.props.objects_in_view); var encodedUri = encodeURI(jsonNglState); @@ -44,7 +69,7 @@ class SummaryView extends React.Component{

Objects in view? {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

- + From 578608cd691ee79d6e5b08f725b7d42686aae69c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:19:26 +0100 Subject: [PATCH 130/311] debug --- js/components/compoundView.js | 2 ++ js/components/stateView.js | 12 +++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/js/components/compoundView.js b/js/components/compoundView.js index 7d7f4ec19..df9aaab23 100644 --- a/js/components/compoundView.js +++ b/js/components/compoundView.js @@ -45,6 +45,8 @@ class CompoundView extends GenericView { this.loadFromServer(this.props.width,this.props.height); this.checkInList(); } + + render() { const svg_image = ; this.current_style = this.state.isToggleOn ? this.selected_style : this.not_selected_style; diff --git a/js/components/stateView.js b/js/components/stateView.js index e3ec3fc3b..c83187d4e 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -25,16 +25,10 @@ class SummaryView extends React.Component{ outputArray.scene = input_json; } return outputArray; - } handleExport() { - const rows = this.convert_state_to_template(this.props.objects_in_view); - let csvContent = "data:text/csv;charset=utf-8,"; - rows.forEach(function (rowArray) { - let row = rowArray.join(","); - csvContent += row + "\r\n"; - }); - var encodedUri = encodeURI(csvContent); + var content = JSON.stringify(this.convert_state_to_template(this.props.objects_in_view)); + var encodedUri = encodeURI(content); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "follow_ups.csv"); @@ -66,7 +60,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view? {Object.keys(this.props.objects_in_view)}

+

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

From eeecdec959247e458c150b70e44d8ecf0b747dfc Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:25:59 +0100 Subject: [PATCH 131/311] debug --- js/components/stateView.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index c83187d4e..8eab247ba 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -18,13 +18,14 @@ class SummaryView extends React.Component{ this.handleStateImport = this.handleStateImport.bind(this); } - convert_state_to_template(input_json){ - var outputArray = ["uuid": UUID, + convert_state_to_template(input_json) { + var outputArray = Array[ + "uuid": UUID, "title": TITLE, - "scene": JSON_OF_SCENE]; - outputArray.scene = input_json; + "scene": JSON_OF_SCENE] + outputArray.scene = input_json; + return outputArray; } - return outputArray; handleExport() { var content = JSON.stringify(this.convert_state_to_template(this.props.objects_in_view)); From 81226180e32846881e274a9ec05d98ee6db2252d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:27:03 +0100 Subject: [PATCH 132/311] debug --- js/components/stateView.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8eab247ba..bd47bb0b5 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,10 +19,7 @@ class SummaryView extends React.Component{ } convert_state_to_template(input_json) { - var outputArray = Array[ - "uuid": UUID, - "title": TITLE, - "scene": JSON_OF_SCENE] + var outputArray = Array[uuid: UUID, title: TITLE, scene : JSON_OF_SCENE] outputArray.scene = input_json; return outputArray; } From 9e9ab332802d2ce52c70f6968138b5c336565ecf Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:29:44 +0100 Subject: [PATCH 133/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index bd47bb0b5..8e2aad54b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,7 +19,7 @@ class SummaryView extends React.Component{ } convert_state_to_template(input_json) { - var outputArray = Array[uuid: UUID, title: TITLE, scene : JSON_OF_SCENE] + var outputArray = {uuid: UUID, title: TITLE, scene : JSON_OF_SCENE} outputArray.scene = input_json; return outputArray; } From 1e732c4d8aeb53f8c3288271c38ea6211673537a Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:33:23 +0100 Subject: [PATCH 134/311] debug --- js/components/stateView.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8e2aad54b..4a93a7554 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -18,15 +18,15 @@ class SummaryView extends React.Component{ this.handleStateImport = this.handleStateImport.bind(this); } - convert_state_to_template(input_json) { - var outputArray = {uuid: UUID, title: TITLE, scene : JSON_OF_SCENE} - outputArray.scene = input_json; - return outputArray; - } + convert_state_to_template(input_json) { + var outputArray = {uuid: UUID, title: TITLE, scene : JSON_OF_SCENE} + outputArray.scene = input_json; + return outputArray; + } handleExport() { - var content = JSON.stringify(this.convert_state_to_template(this.props.objects_in_view)); - var encodedUri = encodeURI(content); + var content = this.convert_state_to_template(this.props.objects_in_view); + var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "follow_ups.csv"); @@ -34,7 +34,6 @@ class SummaryView extends React.Component{ link.click(); } - handleStateExport(){ var jsonNglState = JSON.stringify(this.props.objects_in_view); var encodedUri = encodeURI(jsonNglState); From b6c97550932bb0f61634427e831dcfec632adf36 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:48:25 +0100 Subject: [PATCH 135/311] debug --- js/components/stateView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4a93a7554..70086eb24 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,6 +60,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

+

Template: {JSON.stringify{convert_state_to_template(this.props.objects_in_view)}}

From dc4ce46f8fc66268fd3232934d8e400c13b1371d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:49:32 +0100 Subject: [PATCH 136/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 70086eb24..b73008af0 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,7 +60,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {JSON.stringify{convert_state_to_template(this.props.objects_in_view)}}

+

Template: {JSON.stringify{this.convert_state_to_template(this.props.objects_in_view)}}

From eafa3a095a09cab2ac6f16be44b249b3ce06a518 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:51:48 +0100 Subject: [PATCH 137/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b73008af0..94203e984 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,7 +60,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {JSON.stringify{this.convert_state_to_template(this.props.objects_in_view)}}

+

Template: JSON.stringify{this.convert_state_to_template(this.props.objects_in_view)}

From 11dc3dad1338cd735dae5a5a799a6ae0499299aa Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:52:23 +0100 Subject: [PATCH 138/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 94203e984..2f191c234 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,7 +19,7 @@ class SummaryView extends React.Component{ } convert_state_to_template(input_json) { - var outputArray = {uuid: UUID, title: TITLE, scene : JSON_OF_SCENE} + var outputArray = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} outputArray.scene = input_json; return outputArray; } From 5a2f7c0571f77070170c0696153fdf6dfd7c24f3 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:53:46 +0100 Subject: [PATCH 139/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 2f191c234..771c2373c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,7 +19,7 @@ class SummaryView extends React.Component{ } convert_state_to_template(input_json) { - var outputArray = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} + var outputArray = [uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"] outputArray.scene = input_json; return outputArray; } From 0138cd8d6f66291755c52f22aaf63f043ca87417 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:56:34 +0100 Subject: [PATCH 140/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 771c2373c..78ba13cca 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,9 +19,9 @@ class SummaryView extends React.Component{ } convert_state_to_template(input_json) { - var outputArray = [uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"] + var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} outputArray.scene = input_json; - return outputArray; + return templateOut; } handleExport() { From 4cd516029e8f0330714205518b12165e9b145fe5 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:57:05 +0100 Subject: [PATCH 141/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 78ba13cca..b859eb98c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} - outputArray.scene = input_json; + templateOut.scene = input_json; return templateOut; } From 18b14a383183c0f99975ee14f7387e1ea8aa59b9 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:59:00 +0100 Subject: [PATCH 142/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b859eb98c..d82ab03c1 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} - templateOut.scene = input_json; + templateOut.scene: input_json; return templateOut; } From 0f8143d7e00f46c54fa8e5dba003ae88c24cc71a Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 11:59:50 +0100 Subject: [PATCH 143/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d82ab03c1..b859eb98c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} - templateOut.scene: input_json; + templateOut.scene = input_json; return templateOut; } From edfedf96689a2d7731538cc23c83f9f71b334bc4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:22:02 +0100 Subject: [PATCH 144/311] debug --- js/components/stateView.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b859eb98c..4436220dd 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -20,7 +20,7 @@ class SummaryView extends React.Component{ convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} - templateOut.scene = input_json; +// templateOut.scene = input_json; return templateOut; } @@ -78,10 +78,8 @@ function mapStateToProps(state) { querying: state.selectionReducers.querying, to_query: state.selectionReducers.to_query, target_on: state.apiReducers.target_on, - group_type: state.apiReducers.group_type, objects_in_view: state.nglReducers.objectsInView, objects_to_load: state.nglReducers.objectsToLoad, - water: state.nglReducers.water, } } From 56bc259375e7532d14036f537014ec52e6f6392d Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:23:43 +0100 Subject: [PATCH 145/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4436220dd..4f7f98574 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,8 +60,8 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: JSON.stringify{this.convert_state_to_template(this.props.objects_in_view)}

- +

Template: this.convert_state_to_template(this.props.objects_in_view)

+ From a22ba1b93a647c25710bbb3639b1fc5a0ae19185 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:24:02 +0100 Subject: [PATCH 146/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4f7f98574..9d02f97ad 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -61,7 +61,7 @@ class SummaryView extends React.Component{

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

Template: this.convert_state_to_template(this.props.objects_in_view)

- + From 23ec9a99ed028e0949727cc6f4bcc474fac2df1c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:26:38 +0100 Subject: [PATCH 147/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 9d02f97ad..d21ca567b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -24,7 +24,7 @@ class SummaryView extends React.Component{ return templateOut; } - handleExport() { +/* handleExport() { var content = this.convert_state_to_template(this.props.objects_in_view); var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); @@ -33,7 +33,7 @@ class SummaryView extends React.Component{ document.body.appendChild(link); // Required for FF link.click(); } - +*/ handleStateExport(){ var jsonNglState = JSON.stringify(this.props.objects_in_view); var encodedUri = encodeURI(jsonNglState); From b1495d8378e89cef5bada46b667b4efeb8454d15 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:27:14 +0100 Subject: [PATCH 148/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d21ca567b..d27914139 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,7 +60,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: this.convert_state_to_template(this.props.objects_in_view)

+

Template: {this.convert_state_to_template(this.props.objects_in_view)}

From c012e2f572c0fd09df1548a4d0a028bf4650183e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:27:58 +0100 Subject: [PATCH 149/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d27914139..7176ce6db 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,7 +60,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {this.convert_state_to_template(this.props.objects_in_view)}

+

Template: {this.convert_state_to_template(JSON.stringify(this.props.objects_in_view))}

From cb53b85e406c1717acbcf78ff166384ff5cb6680 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:44:21 +0100 Subject: [PATCH 150/311] debug --- js/components/stateView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 7176ce6db..8453cdf65 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -16,6 +16,7 @@ class SummaryView extends React.Component{ super(props); this.handleStateExport = this.handleStateExport.bind(this); this.handleStateImport = this.handleStateImport.bind(this); + this.handleExport = this.handleExport.bind(this); } convert_state_to_template(input_json) { @@ -24,7 +25,7 @@ class SummaryView extends React.Component{ return templateOut; } -/* handleExport() { + handleExport() { var content = this.convert_state_to_template(this.props.objects_in_view); var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); @@ -33,7 +34,7 @@ class SummaryView extends React.Component{ document.body.appendChild(link); // Required for FF link.click(); } -*/ + handleStateExport(){ var jsonNglState = JSON.stringify(this.props.objects_in_view); var encodedUri = encodeURI(jsonNglState); From 9d09ec21421c69681617158b104138a59a1896ea Mon Sep 17 00:00:00 2001 From: ricgillams Date: Thu, 24 May 2018 17:44:53 +0100 Subject: [PATCH 151/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8453cdf65..861966e5e 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -61,7 +61,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {this.convert_state_to_template(JSON.stringify(this.props.objects_in_view))}

+

Template: {this.convert_state_to_template(this.props.objects_in_view)}

From a07f25491a1044c9044d44a78874cecd911e2664 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 09:25:04 +0100 Subject: [PATCH 152/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 861966e5e..bf8b626ad 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -61,7 +61,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {this.convert_state_to_template(this.props.objects_in_view)}

+

Template: {this.convert_state_to_template(this.props.objects_in_view))}

From e97892bffff85cbf772223af377b1483b32c89d3 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 09:27:10 +0100 Subject: [PATCH 153/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index bf8b626ad..861966e5e 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -61,7 +61,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {this.convert_state_to_template(this.props.objects_in_view))}

+

Template: {this.convert_state_to_template(this.props.objects_in_view)}

From a722308e8cf9c54a61c00c9ad72ddb70faf7eb79 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:08:42 +0100 Subject: [PATCH 154/311] debug --- js/components/stateView.js | 2 +- js/reducers/stateReducers.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 861966e5e..750c1536f 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -62,7 +62,7 @@ class SummaryView extends React.Component{

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

Template: {this.convert_state_to_template(this.props.objects_in_view)}

- + diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index e856759df..2e2aabff9 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -33,3 +33,5 @@ export default function stateReducers(state = INITIALSTATE, action) { return state; } } + + From 0e41ab1031847c78d1ea68670e4c05ea66ba94f7 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:10:03 +0100 Subject: [PATCH 155/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 750c1536f..ef16eccf1 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -26,13 +26,13 @@ class SummaryView extends React.Component{ } handleExport() { - var content = this.convert_state_to_template(this.props.objects_in_view); +/* var content = this.convert_state_to_template(this.props.objects_in_view); var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "follow_ups.csv"); document.body.appendChild(link); // Required for FF - link.click(); + */ link.click(); } handleStateExport(){ From 2908770ed380c09eed6655abe6528236ef4f4371 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:11:17 +0100 Subject: [PATCH 156/311] debug --- js/components/stateView.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index ef16eccf1..72338a868 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -19,21 +19,21 @@ class SummaryView extends React.Component{ this.handleExport = this.handleExport.bind(this); } - convert_state_to_template(input_json) { +/* convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} -// templateOut.scene = input_json; + templateOut.scene = input_json; return templateOut; } handleExport() { -/* var content = this.convert_state_to_template(this.props.objects_in_view); + var content = this.convert_state_to_template(this.props.objects_in_view); var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); link.setAttribute("href", encodedUri); link.setAttribute("download", "follow_ups.csv"); document.body.appendChild(link); // Required for FF - */ link.click(); - } + link.click(); + } handleStateExport(){ var jsonNglState = JSON.stringify(this.props.objects_in_view); @@ -50,7 +50,7 @@ class SummaryView extends React.Component{ return insertedState; this.props.objects_to_load = insertedState; } - +*/ render(){ return
From eb29654c0afb2bb853c01eb3b6b8cd73f13a805a Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:12:08 +0100 Subject: [PATCH 157/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 72338a868..1292468e6 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -14,10 +14,10 @@ import * as stateActions from '../actions/stateActions' class SummaryView extends React.Component{ constructor(props) { super(props); - this.handleStateExport = this.handleStateExport.bind(this); +/* this.handleStateExport = this.handleStateExport.bind(this); this.handleStateImport = this.handleStateImport.bind(this); this.handleExport = this.handleExport.bind(this); - } +*/ } /* convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} From 0100c6f582f59b0e0f929819036acfcc071338b9 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:13:03 +0100 Subject: [PATCH 158/311] debug --- js/components/stateView.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 1292468e6..31345e36c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -14,10 +14,10 @@ import * as stateActions from '../actions/stateActions' class SummaryView extends React.Component{ constructor(props) { super(props); -/* this.handleStateExport = this.handleStateExport.bind(this); +// this.handleStateExport = this.handleStateExport.bind(this); this.handleStateImport = this.handleStateImport.bind(this); - this.handleExport = this.handleExport.bind(this); -*/ } +// this.handleExport = this.handleExport.bind(this); + } /* convert_state_to_template(input_json) { var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} @@ -44,13 +44,13 @@ class SummaryView extends React.Component{ document.body.appendChild(link); // Required for FF link.click(); } - +*/ handleStateImport(){ var insertedState = prompt("Please insert state here:"); return insertedState; this.props.objects_to_load = insertedState; } -*/ + render(){ return
From 5ff0e918bfdc31d90278fdd676535268990fd63f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:13:50 +0100 Subject: [PATCH 159/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 31345e36c..5c2a4d43e 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -61,7 +61,7 @@ class SummaryView extends React.Component{

Objects in view: {Object.keys(this.props.objects_in_view)}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {this.convert_state_to_template(this.props.objects_in_view)}

+

Template: {this.props.objects_in_view}

From 4095142af751fadbe855348da4e934f3b59798a4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:15:25 +0100 Subject: [PATCH 160/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 5c2a4d43e..7ae42862e 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -48,7 +48,7 @@ class SummaryView extends React.Component{ handleStateImport(){ var insertedState = prompt("Please insert state here:"); return insertedState; - this.props.objects_to_load = insertedState; +// this.props.objects_to_load = insertedState; } render(){ From fb855f7c3a2a3d3b92c75042ead8488d0235fb44 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:16:47 +0100 Subject: [PATCH 161/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 7ae42862e..776c4a32b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -58,7 +58,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view: {Object.keys(this.props.objects_in_view)}

+

Objects in view: {this.props.objects_in_view}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

Template: {this.props.objects_in_view}

From e867f4a11d6e05d2373259980e880e2114f581b2 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:18:38 +0100 Subject: [PATCH 162/311] debug --- js/components/stateView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 776c4a32b..4baeae418 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -61,7 +61,6 @@ class SummaryView extends React.Component{

Objects in view: {this.props.objects_in_view}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

-

Template: {this.props.objects_in_view}

From 242b3a71c825506bed58dac443622f63783e058c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:20:29 +0100 Subject: [PATCH 163/311] debug --- js/components/stateView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4baeae418..bd32e6b41 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -60,7 +60,6 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Objects in view: {this.props.objects_in_view}

Number of objects? {Object.keys(this.props.objects_in_view).length}

-

Stringified: {JSON.stringify(this.props.objects_in_view)}

From 82d1f65d8a380835dff7c7483902fea0d1ff530e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:21:53 +0100 Subject: [PATCH 164/311] debug --- js/components/stateView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index bd32e6b41..6491b658f 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -58,7 +58,6 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

-

Objects in view: {this.props.objects_in_view}

Number of objects? {Object.keys(this.props.objects_in_view).length}

From e1f93b41fc158f9e898a142dea4a8a014f2c5e6c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Fri, 25 May 2018 12:22:40 +0100 Subject: [PATCH 165/311] debug --- js/components/stateView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/components/stateView.js b/js/components/stateView.js index 6491b658f..541a2e425 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -59,6 +59,7 @@ class SummaryView extends React.Component{

Current State:

Target on? {this.props.target_on}

Number of objects? {Object.keys(this.props.objects_in_view).length}

+

Stringified: {JSON.stringify(this.props.objects_in_view)}

From 4947cd29326703dd1c72bef6662635c865625add Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 08:23:33 +0100 Subject: [PATCH 166/311] debug --- js/components/stateView.js | 15 +-------------- js/reducers/stateReducers.js | 6 +++--- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 541a2e425..cb08539d8 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -4,28 +4,15 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' -import * as selectionActions from '../actions/selectionActions' -import * as nglLoadActions from '../actions/nglLoadActions' -import * as apiActions from '../actions/apiActions' -import CompoundList from './compoundList'; -import SummaryCmpd from './SummaryCmpd'; import * as stateActions from '../actions/stateActions' class SummaryView extends React.Component{ constructor(props) { super(props); -// this.handleStateExport = this.handleStateExport.bind(this); this.handleStateImport = this.handleStateImport.bind(this); -// this.handleExport = this.handleExport.bind(this); } -/* convert_state_to_template(input_json) { - var templateOut = {uuid: "UUID", title: "TITLE", scene : "JSON_OF_SCENE"} - templateOut.scene = input_json; - return templateOut; - } - - handleExport() { +/* handleExport() { var content = this.convert_state_to_template(this.props.objects_in_view); var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); diff --git a/js/reducers/stateReducers.js b/js/reducers/stateReducers.js index 2e2aabff9..264295fba 100644 --- a/js/reducers/stateReducers.js +++ b/js/reducers/stateReducers.js @@ -5,11 +5,10 @@ import * as actions from '../actions/actonTypes' const INITIALSTATE = { - objectsToLoad: {}, - objectsInView: {} + objectsToLoad: [], + objectsInView: [] } - export default function stateReducers(state = INITIALSTATE, action) { console.log('REDUCERS FIRED OFF. OLD STATE'); console.log(state); @@ -21,6 +20,7 @@ export default function stateReducers(state = INITIALSTATE, action) { var objectsInView = state.objectsInView return Object.assign({}, state, { objectsInView: objectsInView + alert(this.objectsInView) }) case actions.STATE_SPECIFY: From dbe9f69e7b490bd1f68b041fbaff642ca823acf2 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 09:32:54 +0100 Subject: [PATCH 167/311] debug --- js/components/stateView.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index cb08539d8..e4a3bf44b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -10,9 +10,11 @@ class SummaryView extends React.Component{ constructor(props) { super(props); this.handleStateImport = this.handleStateImport.bind(this); + this.handleExport = this.handleExport.bind(this); + this.handleStateExport = this.handleStateExport.bind(this); } -/* handleExport() { + handleExport() { var content = this.convert_state_to_template(this.props.objects_in_view); var encodedUri = encodeURI(JSON.stringify(content)); var link = document.createElement("a"); @@ -31,7 +33,7 @@ class SummaryView extends React.Component{ document.body.appendChild(link); // Required for FF link.click(); } -*/ + handleStateImport(){ var insertedState = prompt("Please insert state here:"); return insertedState; From b09c6dbf8fcc16977aa7a3a03067c1650900eace Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 10:43:05 +0100 Subject: [PATCH 168/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index e4a3bf44b..36535e828 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -49,7 +49,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

- + From 08548288afa52b72dfadff97320c63695b7aa90e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 10:46:10 +0100 Subject: [PATCH 169/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 36535e828..636ce957f 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -37,7 +37,7 @@ class SummaryView extends React.Component{ handleStateImport(){ var insertedState = prompt("Please insert state here:"); return insertedState; -// this.props.objects_to_load = insertedState; + this.props.objects_to_load = insertedState; } render(){ From 29907e891336e83075067a08692ff0947d10237c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 11:01:08 +0100 Subject: [PATCH 170/311] debug --- js/components/stateView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 636ce957f..9a2a467aa 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -12,6 +12,7 @@ class SummaryView extends React.Component{ this.handleStateImport = this.handleStateImport.bind(this); this.handleExport = this.handleExport.bind(this); this.handleStateExport = this.handleStateExport.bind(this); + this.handleStateState = this.handleStateState.bind(this); } handleExport() { @@ -39,6 +40,11 @@ class SummaryView extends React.Component{ return insertedState; this.props.objects_to_load = insertedState; } + + handleStateState(){ + var stateState = JSON.stringify(this.props.objects_in_view) + return alert(stateState) + } render(){ return
@@ -49,7 +55,7 @@ class SummaryView extends React.Component{

Target on? {this.props.target_on}

Number of objects? {Object.keys(this.props.objects_in_view).length}

Stringified: {JSON.stringify(this.props.objects_in_view)}

- + From a6791bb0293b10b1bce29d9a105fef118b27b295 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 11:42:06 +0100 Subject: [PATCH 171/311] debug --- js/components/stateView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 9a2a467aa..b2d8b43b6 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -42,8 +42,9 @@ class SummaryView extends React.Component{ } handleStateState(){ - var stateState = JSON.stringify(this.props.objects_in_view) - return alert(stateState) + var stateState = JSON.stringify(this.props.objects_in_view); + var formattedState = stateState; + return alert(formattedState) } render(){ From 00014f196388119f256576e2d9f89c7bedcb897f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 11:44:17 +0100 Subject: [PATCH 172/311] debug --- js/components/stateView.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b2d8b43b6..5aaa48a33 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -43,7 +43,11 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); - var formattedState = stateState; + var formattedState = { + "uuid": UUID, + "title": TITLE, + "scene": stateState + }; return alert(formattedState) } From 756199bbd19fb41492eb97d97ea8a447e512c85e Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 11:45:09 +0100 Subject: [PATCH 173/311] debug --- js/components/stateView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/components/stateView.js b/js/components/stateView.js index 5aaa48a33..5507acd04 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -43,6 +43,8 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); + var TITLE = 'title'; + var UUID = 'uuid'; var formattedState = { "uuid": UUID, "title": TITLE, From 1bfcb12a9b6b462b9b09012f20e7441bf9fd7c33 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 11:46:38 +0100 Subject: [PATCH 174/311] debug --- js/components/stateView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 5507acd04..b223ca818 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -46,9 +46,9 @@ class SummaryView extends React.Component{ var TITLE = 'title'; var UUID = 'uuid'; var formattedState = { - "uuid": UUID, - "title": TITLE, - "scene": stateState + uuid: UUID, + title: TITLE, + scene: stateState }; return alert(formattedState) } From e4d3318425e76b316ee90b4f78023e197a837ebb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 11:47:51 +0100 Subject: [PATCH 175/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index b223ca818..11c6e437b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -50,7 +50,7 @@ class SummaryView extends React.Component{ title: TITLE, scene: stateState }; - return alert(formattedState) + return alert(JSON.stringify(formattedState)) } render(){ From c0d8c7e8774a6fb60c840760d88e8db5672c54b8 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:09:08 +0100 Subject: [PATCH 176/311] debug --- js/components/stateView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 11c6e437b..40c6fb35b 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -5,6 +5,7 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' import * as stateActions from '../actions/stateActions' +import class SummaryView extends React.Component{ constructor(props) { @@ -43,7 +44,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); - var TITLE = 'title'; + var TITLE = this.props.objects_in_view.PROTEIN_1_MAIN.name; var UUID = 'uuid'; var formattedState = { uuid: UUID, From 6d5e9d8b89e3b901c910ea76e21d3fb56460dee6 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:10:06 +0100 Subject: [PATCH 177/311] debug --- js/components/stateView.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 40c6fb35b..fdd0d7802 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -44,11 +44,10 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); - var TITLE = this.props.objects_in_view.PROTEIN_1_MAIN.name; var UUID = 'uuid'; var formattedState = { uuid: UUID, - title: TITLE, + title: this.props.objects_in_view.PROTEIN_1_MAIN.name, scene: stateState }; return alert(JSON.stringify(formattedState)) From 9414c25885a211f8910ec74e497fb1ec32a99718 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:11:34 +0100 Subject: [PATCH 178/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index fdd0d7802..1020d7ee6 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -47,7 +47,7 @@ class SummaryView extends React.Component{ var UUID = 'uuid'; var formattedState = { uuid: UUID, - title: this.props.objects_in_view.PROTEIN_1_MAIN.name, + title: Object.keys(this.props.objects_in_view).PROTEIN_1_MAIN.name, scene: stateState }; return alert(JSON.stringify(formattedState)) From e5a87d24e07f02fa994625b85695409a6a81d136 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:12:05 +0100 Subject: [PATCH 179/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 1020d7ee6..0b05c74bd 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -47,7 +47,7 @@ class SummaryView extends React.Component{ var UUID = 'uuid'; var formattedState = { uuid: UUID, - title: Object.keys(this.props.objects_in_view).PROTEIN_1_MAIN.name, + title: Object.keys(this.props.objects_in_view).length, scene: stateState }; return alert(JSON.stringify(formattedState)) From 31c0b6cb9c8637dae84a2b0a2eeaebb14e45026a Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:12:55 +0100 Subject: [PATCH 180/311] debug --- js/components/stateView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 0b05c74bd..025ab37fb 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -45,9 +45,10 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; + var TITLE = Object.keys(this.props.objects_in_view).length var formattedState = { uuid: UUID, - title: Object.keys(this.props.objects_in_view).length, + title: TITLE, scene: stateState }; return alert(JSON.stringify(formattedState)) From 19e14febdb3ebc3ba8d3f01e3286909b8115a6aa Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:14:06 +0100 Subject: [PATCH 181/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 025ab37fb..97fcbcb20 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -45,7 +45,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; - var TITLE = Object.keys(this.props.objects_in_view).length + var TITLE = this.props.objects_in_view.length; var formattedState = { uuid: UUID, title: TITLE, From e9c5a5bdb04468c2f203128b80eb7421f09d261f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:15:07 +0100 Subject: [PATCH 182/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 97fcbcb20..cd221acd9 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -45,7 +45,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; - var TITLE = this.props.objects_in_view.length; + var TITLE = this.props.objects_in_view.find(name); var formattedState = { uuid: UUID, title: TITLE, From b4e62d9122debe448099432af66d48ae3cb27d94 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:18:53 +0100 Subject: [PATCH 183/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index cd221acd9..2f7edabf1 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -45,7 +45,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; - var TITLE = this.props.objects_in_view.find(name); + var TITLE = JSON.stringify(this.props.objects_in_view.name); var formattedState = { uuid: UUID, title: TITLE, From 4569756d43b577a3109d27cb591a00890b6b6017 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:19:38 +0100 Subject: [PATCH 184/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 2f7edabf1..037c4441f 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -45,7 +45,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; - var TITLE = JSON.stringify(this.props.objects_in_view.name); + var TITLE = JSON.stringify(this.props.objects_in_view); var formattedState = { uuid: UUID, title: TITLE, From 08f4c451741106faf5fc557ae8782e7d8c3a778f Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:20:22 +0100 Subject: [PATCH 185/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 037c4441f..be67fb3d8 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -45,7 +45,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; - var TITLE = JSON.stringify(this.props.objects_in_view); + var TITLE = 'title'; var formattedState = { uuid: UUID, title: TITLE, From b44a45051ed3396392b3a007f79e7c003b2c3082 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:22:48 +0100 Subject: [PATCH 186/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index be67fb3d8..638a2ca59 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -44,8 +44,8 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); - var UUID = 'uuid'; var TITLE = 'title'; + var UUID = 'uuid'; var formattedState = { uuid: UUID, title: TITLE, From a94d4a0afdbcbd7ef54c6b7c913c8c62d317d1bf Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:25:15 +0100 Subject: [PATCH 187/311] debug --- js/components/stateView.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 638a2ca59..5507acd04 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -5,7 +5,6 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' import * as stateActions from '../actions/stateActions' -import class SummaryView extends React.Component{ constructor(props) { @@ -47,11 +46,11 @@ class SummaryView extends React.Component{ var TITLE = 'title'; var UUID = 'uuid'; var formattedState = { - uuid: UUID, - title: TITLE, - scene: stateState + "uuid": UUID, + "title": TITLE, + "scene": stateState }; - return alert(JSON.stringify(formattedState)) + return alert(formattedState) } render(){ From e316cc2dec46090b02b003386f6f444850dee011 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:26:50 +0100 Subject: [PATCH 188/311] debug --- js/components/stateView.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 5507acd04..4dc7fe3ec 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -43,14 +43,14 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); - var TITLE = 'title'; var UUID = 'uuid'; + var TITLE = Object.keys(this.props.objects_in_view).length var formattedState = { - "uuid": UUID, - "title": TITLE, - "scene": stateState + uuid: UUID, + title: TITLE, + scene: stateState }; - return alert(formattedState) + return alert(JSON.stringify(formattedState)) } render(){ From e3f3f0221a30017ceba56287de261967283cdb50 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:27:41 +0100 Subject: [PATCH 189/311] debug --- js/components/stateView.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4dc7fe3ec..83a9e9abf 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -44,10 +44,9 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; - var TITLE = Object.keys(this.props.objects_in_view).length var formattedState = { uuid: UUID, - title: TITLE, + title: Object.keys(this.props.objects_in_view).PROTEIN_1_MAIN.name, scene: stateState }; return alert(JSON.stringify(formattedState)) From c029462e03f822a4b872cfffb5dd17d24faa99cb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:28:33 +0100 Subject: [PATCH 190/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 83a9e9abf..58d339ada 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -46,7 +46,7 @@ class SummaryView extends React.Component{ var UUID = 'uuid'; var formattedState = { uuid: UUID, - title: Object.keys(this.props.objects_in_view).PROTEIN_1_MAIN.name, + title: JSON.stringify(this.props.objects_in_view.PROTEIN_1_MAIN.name), scene: stateState }; return alert(JSON.stringify(formattedState)) From 3b37d077fb02dcf017735c2a495452b0fcb003fc Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 13:30:12 +0100 Subject: [PATCH 191/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 58d339ada..d0d4bd28d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -46,7 +46,7 @@ class SummaryView extends React.Component{ var UUID = 'uuid'; var formattedState = { uuid: UUID, - title: JSON.stringify(this.props.objects_in_view.PROTEIN_1_MAIN.name), + title: JSON.stringify(Object.keys(this.props.objects_in_view).PROTEIN_1_MAIN.name), scene: stateState }; return alert(JSON.stringify(formattedState)) From 71f0aad341e1de10e6e6743f2b2808991db78655 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:00:18 +0100 Subject: [PATCH 192/311] debug --- js/components/stateView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d0d4bd28d..48d4e7ca2 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -44,9 +44,10 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); var UUID = 'uuid'; + var TITLE = 'title'; var formattedState = { uuid: UUID, - title: JSON.stringify(Object.keys(this.props.objects_in_view).PROTEIN_1_MAIN.name), + title: TITLE, scene: stateState }; return alert(JSON.stringify(formattedState)) From 638d9fc472e467382830e7500d2043eec9184d59 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:03:18 +0100 Subject: [PATCH 193/311] debug --- js/components/stateView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 48d4e7ca2..ac0f98efa 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -43,10 +43,10 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); - var UUID = 'uuid'; + const uuidv4 = require('uuid/v4'); var TITLE = 'title'; var formattedState = { - uuid: UUID, + uuid: uuidv4(), title: TITLE, scene: stateState }; From 31b5902469d5df3d9f76ebfc33ace5d25f2fe0fb Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:24:31 +0100 Subject: [PATCH 194/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index ac0f98efa..d52ea1c41 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -44,7 +44,7 @@ class SummaryView extends React.Component{ handleStateState(){ var stateState = JSON.stringify(this.props.objects_in_view); const uuidv4 = require('uuid/v4'); - var TITLE = 'title'; + var TITLE = 'need to define title'; var formattedState = { uuid: uuidv4(), title: TITLE, From 45b70911ca47ac56ea5afdf5c4cbf8e6e6e13b83 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:49:21 +0100 Subject: [PATCH 195/311] debug --- js/components/stateView.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/components/stateView.js b/js/components/stateView.js index d52ea1c41..41a041ce5 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -53,6 +53,10 @@ class SummaryView extends React.Component{ return alert(JSON.stringify(formattedState)) } + handleDescribeState(){ + const handleDescribe = this.props.objects_to_load + } + render(){ return
@@ -64,6 +68,11 @@ class SummaryView extends React.Component{

Stringified: {JSON.stringify(this.props.objects_in_view)}

+
+ + + +
From e8c24c4da6afaccf5f34b6dafc1d2b372630e433 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:50:51 +0100 Subject: [PATCH 196/311] debug --- js/components/stateView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/components/stateView.js b/js/components/stateView.js index 41a041ce5..4d00ed57c 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -13,6 +13,7 @@ class SummaryView extends React.Component{ this.handleExport = this.handleExport.bind(this); this.handleStateExport = this.handleStateExport.bind(this); this.handleStateState = this.handleStateState.bind(this); + this.handleDescribeState = this.handleDescribeState.bind(this); } handleExport() { From 378c14934ba3589d7362fe9bf4635f3dcb190bdf Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:52:02 +0100 Subject: [PATCH 197/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4d00ed57c..8f393b645 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -55,7 +55,7 @@ class SummaryView extends React.Component{ } handleDescribeState(){ - const handleDescribe = this.props.objects_to_load + const {handleDescribe} = this.props.objects_to_load } render(){ From 781207fa52024404af3831f8b4d93b498fa7d7d4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:53:05 +0100 Subject: [PATCH 198/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8f393b645..b03b11f63 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -55,7 +55,7 @@ class SummaryView extends React.Component{ } handleDescribeState(){ - const {handleDescribe} = this.props.objects_to_load + const { handleDescribe } = this.props } render(){ From 9c82e32bd3e93028fe8e6fa32b7cc693ecadf2d2 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 14:55:49 +0100 Subject: [PATCH 199/311] debug --- js/components/stateView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/components/stateView.js b/js/components/stateView.js index b03b11f63..6bfaf28b0 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -5,6 +5,7 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' import * as stateActions from '../actions/stateActions' +import {formReducer as form} from 'redux-form' class SummaryView extends React.Component{ constructor(props) { From 7ae66550c913e5d924ed555f0cc87c5895714358 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 15:04:59 +0100 Subject: [PATCH 200/311] debug --- js/components/stateView.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 6bfaf28b0..909b47726 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -5,7 +5,7 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' import * as stateActions from '../actions/stateActions' -import {formReducer as form} from 'redux-form' +import Prompt from 'react-native-prompt' class SummaryView extends React.Component{ constructor(props) { @@ -14,7 +14,7 @@ class SummaryView extends React.Component{ this.handleExport = this.handleExport.bind(this); this.handleStateExport = this.handleStateExport.bind(this); this.handleStateState = this.handleStateState.bind(this); - this.handleDescribeState = this.handleDescribeState.bind(this); +// this.handleDescribeState = this.handleDescribeState.bind(this); } handleExport() { @@ -55,10 +55,10 @@ class SummaryView extends React.Component{ return alert(JSON.stringify(formattedState)) } - handleDescribeState(){ +/* handleDescribeState(){ const { handleDescribe } = this.props } - +*/ render(){ return
@@ -70,11 +70,19 @@ class SummaryView extends React.Component{

Stringified: {JSON.stringify(this.props.objects_in_view)}

-
- - - - + this.setState({ + promptVisible: false, + message: "You cancelled" + }) } + onSubmit={ (value) => this.setState({ + promptVisible: false, + message: `You said "${value}"` + }) }/>
From 5d19b983e189da0ed286073f903f64f99ea739bc Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 15:09:10 +0100 Subject: [PATCH 201/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 909b47726..d060ef236 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -5,7 +5,7 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' import * as stateActions from '../actions/stateActions' -import Prompt from 'react-native-prompt' +import Prompt from 'react-prompt' class SummaryView extends React.Component{ constructor(props) { From 9017819929c06c8eaefb17186e4614bcb167b7fe Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 15:09:49 +0100 Subject: [PATCH 202/311] debug --- js/components/stateView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index d060ef236..8488a80ba 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -5,7 +5,6 @@ import React from 'react'; import { connect } from 'react-redux' import { Button, Well, Col, Row } from 'react-bootstrap' import * as stateActions from '../actions/stateActions' -import Prompt from 'react-prompt' class SummaryView extends React.Component{ constructor(props) { From 4f677692ef61cff3a3852f7153e40fab600ecf7c Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 15:43:35 +0100 Subject: [PATCH 203/311] debug --- js/components/stateView.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 8488a80ba..4f2ffa09d 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -69,19 +69,10 @@ class SummaryView extends React.Component{

Stringified: {JSON.stringify(this.props.objects_in_view)}

- this.setState({ - promptVisible: false, - message: "You cancelled" - }) } - onSubmit={ (value) => this.setState({ - promptVisible: false, - message: `You said "${value}"` - }) }/> +
+ +
From b4b551720a0c53be1dd6ca987d4ba6b3c73bfcf4 Mon Sep 17 00:00:00 2001 From: ricgillams Date: Tue, 29 May 2018 15:47:21 +0100 Subject: [PATCH 204/311] debug --- js/components/stateView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/stateView.js b/js/components/stateView.js index 4f2ffa09d..a707d93e2 100644 --- a/js/components/stateView.js +++ b/js/components/stateView.js @@ -70,7 +70,7 @@ class SummaryView extends React.Component{
-