Correct calculation for the center bit
This commit is contained in:
parent
2bdb1adf50
commit
66c71891db
1 changed files with 3 additions and 2 deletions
|
@ -26,8 +26,9 @@ if(!$.fn.dividerfy) {
|
||||||
//Some minor adjustments due to roundings
|
//Some minor adjustments due to roundings
|
||||||
next += 100 - (previous + next);
|
next += 100 - (previous + next);
|
||||||
}
|
}
|
||||||
const value_a = "calc(" + previous + "% - " + (vertical ? element.width() : element.height()) + "px)";
|
const center = (vertical ? element.width() : element.height()) / 2;
|
||||||
const value_b = "calc(" + next + "% - " + (vertical ? element.width() : element.height()) + "px)";
|
const value_a = "calc(" + previous + "% - " + center + "px)";
|
||||||
|
const value_b = "calc(" + next + "% - " + center + "px)";
|
||||||
|
|
||||||
/* dont cause a reflow here */
|
/* dont cause a reflow here */
|
||||||
if(property === "height") {
|
if(property === "height") {
|
||||||
|
|
Loading…
Add table
Reference in a new issue