Skip to content

Commit

Permalink
fix: fix preact compat
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Feb 5, 2019
1 parent 10dc040 commit 65e2c64
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export default class Category extends React.Component {
}

componentDidMount() {
this.parent = this.container.parentNode

this.margin = 0
this.minMargin = 0

Expand Down Expand Up @@ -67,10 +65,10 @@ export default class Category extends React.Component {

memoizeSize() {
var { top, height } = this.container.getBoundingClientRect()
var { top: parentTop } = this.parent.getBoundingClientRect()
var { top: parentTop } = this.container.parentNode.getBoundingClientRect()
var { height: labelHeight } = this.label.getBoundingClientRect()

this.top = top - parentTop + this.parent.scrollTop
this.top = top - parentTop + this.container.parentNode.scrollTop

if (height == 0) {
this.maxMargin = 0
Expand Down

0 comments on commit 65e2c64

Please sign in to comment.