Closed H4xX02z closed 9 years ago
if you display a scale with lots of entries, the scale have not the equal size as the slider.
The problem is in this file ng-slider.js file in the generateScale method. if you round the result the scale wont be display correctly.
scope.generateScale = function(){ if( scope.options.scale && scope.options.scale.length > 0 ){ var str = ""; var s = scope.options.scale; //var prc = Math.round((100/(s.length-1))*10)/10; // just replace Math.round var prc = (100/(s.length-1)); for( var i=0; i < s.length; i++ ){ str += '<span style="left: ' + i*prc + '%">' + ( s[i] != '|' ? '<ins>' + s[i] + '</ins>' : '' ) + '</span>'; } return str; } else return ""; return ""; };
sure, nice fix
if you display a scale with lots of entries, the scale have not the equal size as the slider.
The problem is in this file ng-slider.js file in the generateScale method. if you round the result the scale wont be display correctly.