parent
8c80e7d4e5
commit
59c4d87839
|
@ -16,8 +16,6 @@ export default class Category extends React.Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.parent = this.container.parentNode
|
||||
|
||||
this.margin = 0
|
||||
this.minMargin = 0
|
||||
|
||||
|
@ -66,11 +64,12 @@ export default class Category extends React.Component {
|
|||
}
|
||||
|
||||
memoizeSize() {
|
||||
var parent = this.container.parentElement
|
||||
var { top, height } = this.container.getBoundingClientRect()
|
||||
var { top: parentTop } = this.parent.getBoundingClientRect()
|
||||
var { top: parentTop } = parent.getBoundingClientRect()
|
||||
var { height: labelHeight } = this.label.getBoundingClientRect()
|
||||
|
||||
this.top = top - parentTop + this.parent.scrollTop
|
||||
this.top = top - parentTop + parent.scrollTop
|
||||
|
||||
if (height == 0) {
|
||||
this.maxMargin = 0
|
||||
|
|
Loading…
Reference in New Issue