Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/js/components/vue-scrollbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,24 @@
this.dragging = false
},

getSize(){
getSize: function getSize () {
// The Elements
let $scrollArea = this.$refs.scrollArea
let $scrollWrapper = this.$refs.scrollWrapper
var $scrollArea = this.$refs.scrollArea;
var $scrollWrapper = this.$refs.scrollWrapper;

var $height = $scrollArea.children[0] ? $scrollArea.children[0].clientHeight : 0;
var $width = $scrollArea.children[0] ? $scrollArea.children[0].clientWidth : 0;
// Get new Elements Size
let elementSize = {
var elementSize = {
// Scroll Area Height and Width
scrollAreaHeight: $scrollArea.children[0].clientHeight,
scrollAreaWidth: $scrollArea.children[0].clientWidth,
scrollAreaHeight: $height,
scrollAreaWidth: $width,

// Scroll Wrapper Height and Width
scrollWrapperHeight: $scrollWrapper.clientHeight,
scrollWrapperWidth: $scrollWrapper.clientWidth,
}
return elementSize
scrollWrapperWidth: $scrollWrapper.clientWidth
};
return elementSize;
},

calculateSize(cb){
Expand Down