From 8291a6f628ffe98b431a1413111ac5e6724005e1 Mon Sep 17 00:00:00 2001 From: Stefan van Groningen Date: Thu, 1 Jun 2017 19:47:13 +0200 Subject: [PATCH] Changed this.props.elementBox.top <=0 to <-1 --- components/SideBlock.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/SideBlock.jsx b/components/SideBlock.jsx index dfb832e..14fc684 100644 --- a/components/SideBlock.jsx +++ b/components/SideBlock.jsx @@ -34,10 +34,16 @@ import ReactDOM from 'react-dom'; let isCurrent = this.props.elementBox && this.props.elementBox.top!==undefined && ( - this.props.elementBox.top <=0 + this.props.elementBox.top <-1 && this.props.elementHeight+this.props.elementBox.top>=0 && this.props.elementHeight != this.props.windowHeight ); + console.log("elementBox: ", this.props.elementBox); + console.log(this.props.elementBox.top); + console.log(this.props.elementHeight); + console.log(this.props.windowHeight); + console.log("isCurrent: ", isCurrent); + let isAtEnd = this.props.elementBox && this.props.elementBox.bottom