Correct calculation for the center bit

This commit is contained in:
WolverinDEV 2019-11-19 18:17:30 +01:00
parent 2bdb1adf50
commit 66c71891db

View file

@ -26,8 +26,9 @@ if(!$.fn.dividerfy) {
//Some minor adjustments due to roundings
next += 100 - (previous + next);
}
const value_a = "calc(" + previous + "% - " + (vertical ? element.width() : element.height()) + "px)";
const value_b = "calc(" + next + "% - " + (vertical ? element.width() : element.height()) + "px)";
const center = (vertical ? element.width() : element.height()) / 2;
const value_a = "calc(" + previous + "% - " + center + "px)";
const value_b = "calc(" + next + "% - " + center + "px)";
/* dont cause a reflow here */
if(property === "height") {