Merge pull request #4696 from FlipWarthog/PV4689
Fix #4689 - ScrollPanel: TypeError: Cannot read properties of null (reading 'scrollWidth')pull/4704/head
commit
cf94e06718
|
@ -103,6 +103,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
moveBar() {
|
moveBar() {
|
||||||
|
if (this.$refs.content) {
|
||||||
/* horizontal scroll */
|
/* horizontal scroll */
|
||||||
let totalWidth = this.$refs.content.scrollWidth;
|
let totalWidth = this.$refs.content.scrollWidth;
|
||||||
let ownWidth = this.$refs.content.clientWidth;
|
let ownWidth = this.$refs.content.clientWidth;
|
||||||
|
@ -136,6 +137,7 @@ export default {
|
||||||
this.$refs.yBar.style.cssText = 'height:' + Math.max(this.scrollYRatio * 100, 10) + '%; top: calc(' + (this.$refs.content.scrollTop / totalHeight) * 100 + '% - ' + this.$refs.xBar.clientHeight + 'px);right:' + right + 'px;';
|
this.$refs.yBar.style.cssText = 'height:' + Math.max(this.scrollYRatio * 100, 10) + '%; top: calc(' + (this.$refs.content.scrollTop / totalHeight) * 100 + '% - ' + this.$refs.xBar.clientHeight + 'px);right:' + right + 'px;';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onYBarMouseDown(e) {
|
onYBarMouseDown(e) {
|
||||||
this.isYBarClicked = true;
|
this.isYBarClicked = true;
|
||||||
|
|
Loading…
Reference in New Issue