Skip to content

isCentered option does not always work as expected #191

@OceanITs

Description

@OceanITs

[css]
.column:nth-child(1) {
height: 200px !important;
}
[js]
isCentered: true,

////////////////
Current version
https://codepen.io/OceanITs/pen/qPexBq

Fixed version
https://codepen.io/OceanITs/pen/EwqQXN

///////////////////
shuffle.js(dist)
line 784 (lastItem.left) must be the same?

///////////////////
Some fix that work for me

comment lines 784,785
before line 780 add {
// add-fix
var lastItem = rowMap[0][rowMap[0].length - 1];
var end = lastItem.left + lastItem.width;
var offset = Math.round((containerWidth - end) / 2);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions