Skip to content

Width not right calculated on maximized browser with no scrollbar #53

Description

@konum

Hi!

I'm using qwicks for a 100% width of the screen. If the window is maximized the width of each panel is not rightly calculated resulting in the rightmost panel have a weird separation, like the image attached.

Seems like is related to the navigator scroll. If its the scroll does not appear the code this.getContainerSize(true); in calculatePanelSizes does not return the full screen width (1920 vs 1903 in my case).

if I do this the panel gets the right width:
$().ready(function() {
$('.kwicks').kwicks({
maxSize : '30%',
behavior : 'menu',
spacing: '0px'
});
$('.kwicks').kwicks('resize');
});

This should fix the bug:
Kwick.prototype.getContainerSize = function(clearCache) {
var containerSize = this._containerSize;
if (clearCache || !containerSize) {
containerSize = this._containerSize = this.$containerthis.primaryDimension;
}
//Fix weird containerSize the no browser scroll bar
if (this.$containerthis.primaryDimension>containerSize){
containerSize = this.$containerthis.primaryDimension;
}
return containerSize;
};

Environment:
jQuery JavaScript Library v1.11.0
Tested on Chrome 44.0.2403.130 and Firefox 32.0.3

PD:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions