export var calculateChange = function (e, container) {
    var containerWidth = container.clientWidth;
    var x = e.pageX;
    var left = x - (container.getBoundingClientRect().left + window.scrollX);
    var alpha;
    if (left < 0) {
        alpha = 0;
    }
    else if (left > containerWidth) {
        alpha = 100;
    }
    else {
        var percent = (left * 100) / containerWidth;
        alpha = (100 * percent) / 100;
    }
    return Math.round(alpha);
};
