shagstrom/split-pane

IE8 issue

Closed this issue · 2 comments

$layoutRightPane.splitPane('lastComponentSize', 240)

There is an error :

ie8mode_issue

function setLeft(firstComponent, divider, lastComponent, left) {
    firstComponent.style.width = left;

//Invalid argument. left is NANpx
divider.style.left = left;
lastComponent.style.left = left;
}

I use isNaN for a work around:

methods.lastComponentSize = function(value) {
    this.each(function() {
        var $splitPane = $(this),
            components = getComponents($splitPane);
        if ($splitPane.is('.fixed-top')) {
            value = components.splitPane.offsetHeight -components.divider.offsetHeight - value;
            fixedTopHandler(components, components.divider.offsetTop)({pageY: value});
        } else if ($splitPane.is('.fixed-bottom')) {
            fixedBottomHandler(components, -components.last.offsetHeight)({pageY: -value});
        } else if ($splitPane.is('.horizontal-percent')) {
            horizontalPercentHandler(components, -components.last.offsetHeight)({pageY: -value});
        } else if ($splitPane.is('.fixed-left')) {
            value = components.splitPane.offsetWidth -components.divider.offsetWidth - value;
            !isNaN(value) && fixedLeftHandler(components, components.divider.offsetLeft)({pageX: value});
        } else if ($splitPane.is('.fixed-right')) {
            fixedRightHandler(components, -components.last.offsetWidth)({pageX: -value});
        } else if ($splitPane.is('.vertical-percent')) {
            verticalPercentHandler(components, -components.last.offsetWidth)({pageX: -value});
        }
    });
};

The issue has been fixed in 0.7.1.