src/boxesscroll.js
function updateGrabberSizes() {
			if (ctrl.horizontal !== undefined) {
				var bgSizeElt = ctrl.ngelt.css('background-size');
				var bgSizeSb = ctrl.ngsb.css('background-size');

				var grabbersizePixel = '100%';
				if(getInnerLimit() !== $scope.total) {
					grabbersizePixel = getGrabberSizePixelFromPercent(getGrabberSizePercentFromScopeValues())+'px';
				}

				if (ctrl.horizontal) {
					bgSizeElt = bgSizeElt.replace(/.*\s+/, grabbersizePixel + ' ');
					bgSizeSb = bgSizeSb.replace(/.*\s+/, grabbersizePixel + ' ');
				} else {
					bgSizeElt = bgSizeElt.replace(/px\s+\d+(\.\d+)*.*/, 'px ' + grabbersizePixel);
					bgSizeSb = bgSizeSb.replace(/px\s+\d+(\.\d+)*.*/, 'px ' + grabbersizePixel);
				}
				ctrl.ngelt.css({'background-size': bgSizeElt});
				ctrl.ngsb.css({'background-size': bgSizeSb});
			}
		}
function updateGrabberSizes() {
			if (ctrl.horizontal !== undefined) {
				var bgSizeElt = ctrl.ngelt.css('background-size');
				var bgSizeSb = ctrl.ngsb.css('background-size');

				var grabbersizePixel = '100%';
				if(getInnerLimit() !== $scope.total) {
					grabbersizePixel = getGrabberSizePixelFromPercent(getGrabberSizePercentFromScopeValues())+'px';
				}

				if (ctrl.horizontal) {
					bgSizeElt = bgSizeElt.replace(/.*\s+/, grabbersizePixel + ' ');
					bgSizeSb = bgSizeSb.replace(/.*\s+/, grabbersizePixel + ' ');
				} else {
					bgSizeElt = bgSizeElt.replace(/px\s+\d+(\.\d+)*.*/, 'px ' + grabbersizePixel);
					bgSizeSb = bgSizeSb.replace(/px\s+\d+(\.\d+)*.*/, 'px ' + grabbersizePixel);
				}
				ctrl.ngelt.css({'background-size': bgSizeElt});
				ctrl.ngsb.css({'background-size': bgSizeSb});
			}
		}
function updateGrabberSizes ( ) { if ( ctrl . horizontal !== undefined ) { var bgSizeElt = ctrl . ngelt . css ( 'background-size' ) ; var bgSizeSb = ctrl . ngsb . css ( 'background-size' ) ; var grabbersizePixel = '100%' ; if ( getInnerLimit ( ) !== $scope . total ) { grabbersizePixel = getGrabberSizePixelFromPercent ( getGrabberSizePercentFromScopeValues ( ) ) + 'px' ; } if ( ctrl . horizontal ) { bgSizeElt = bgSizeElt . replace ( / .*\s+ / , grabbersizePixel + ' ' ) ; bgSizeSb = bgSizeSb . replace ( / .*\s+ / , grabbersizePixel + ' ' ) ; } else { bgSizeElt = bgSizeElt . replace ( / px\s+\d+(\.\d+)*.* / , 'px ' + grabbersizePixel ) ; bgSizeSb = bgSizeSb . replace ( / px\s+\d+(\.\d+)*.* / , 'px ' + grabbersizePixel ) ; } ctrl . ngelt . css ( { 'background-size' : bgSizeElt } ) ; ctrl . ngsb . css ( { 'background-size' : bgSizeSb } ) ; } }
Calcul la taille des grabbers
Calcul la taille des grabbers