summaryrefslogtreecommitdiff
path: root/frontend/views/graph/components/graph.editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/views/graph/components/graph.editor.js')
-rw-r--r--frontend/views/graph/components/graph.editor.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/views/graph/components/graph.editor.js b/frontend/views/graph/components/graph.editor.js
index a5c7c45..f0a5753 100644
--- a/frontend/views/graph/components/graph.editor.js
+++ b/frontend/views/graph/components/graph.editor.js
@@ -23,6 +23,7 @@ const defaultState = {
w: 0, h: 0,
},
page: null,
+ highlightedPageId: null,
measurements: {},
}
@@ -161,13 +162,15 @@ class GraphEditor extends Component {
}
handleMouseEnter(e, page) {
+ this.setState({ highlightedPageId: page.id })
}
handleMouseLeave(e, page) {
+ this.setState({ highlightedPageId: null })
}
render(){
// console.log(this.props.graph.show.res)
- const { page: currentPage, box, measurements } = this.state
+ const { page: currentPage, box, measurements, highlightedPageId } = this.state
const { res: graph } = this.props.graph.show
// console.log(res.pages)
return (
@@ -176,6 +179,7 @@ class GraphEditor extends Component {
bounds={this.state.bounds}
pages={graph.pages}
currentPage={currentPage}
+ highlightedPageId={highlightedPageId}
measurements={measurements}
box={box}
/>