@@ -177,7 +177,7 @@ function findDimensions(gd, sliderOpts) {
177177 sliderOpts . labelStride = Math . max ( 1 , Math . ceil ( computedSpacePerLabel / availableSpacePerLabel ) ) ;
178178 sliderOpts . labelHeight = labelHeight ;
179179
180- sliderOpts . height = sliderOpts . currentValueTotalHeight + constants . tickOffset + constants . tickLength + constants . labelOffset + sliderOpts . labelHeight + sliderOpts . pad . t + sliderOpts . pad . b ;
180+ sliderOpts . height = sliderOpts . currentValueTotalHeight + constants . tickOffset + sliderOpts . ticklen + constants . labelOffset + sliderOpts . labelHeight + sliderOpts . pad . t + sliderOpts . pad . b ;
181181
182182 var xanchor = 'left' ;
183183 if ( anchorUtils . isRightAnchor ( sliderOpts ) ) {
@@ -292,9 +292,9 @@ function drawGrip(sliderGroup, gd, sliderOpts) {
292292 rx : constants . gripRadius ,
293293 ry : constants . gripRadius ,
294294 } )
295- . call ( Color . stroke , constants . gripBorderColor )
296- . call ( Color . fill , constants . gripBgColor )
297- . style ( 'stroke-width' , constants . gripBorderWidth + 'px' ) ;
295+ . call ( Color . stroke , sliderOpts . bordercolor )
296+ . call ( Color . fill , sliderOpts . bgcolor )
297+ . style ( 'stroke-width' , sliderOpts . borderwidth + 'px' ) ;
298298}
299299
300300function drawLabel ( item , data , sliderOpts ) {
@@ -335,7 +335,7 @@ function drawLabelGroup(sliderGroup, sliderOpts) {
335335
336336 Lib . setTranslate ( item ,
337337 normalizedValueToPosition ( sliderOpts , d . fraction ) ,
338- constants . tickOffset + constants . tickLength + sliderOpts . labelHeight + constants . labelOffset + sliderOpts . currentValueTotalHeight
338+ constants . tickOffset + sliderOpts . ticklen + sliderOpts . labelHeight + constants . labelOffset + sliderOpts . currentValueTotalHeight
339339 ) ;
340340 } ) ;
341341
@@ -398,7 +398,7 @@ function attachGripEvents(item, gd, sliderGroup, sliderOpts) {
398398
399399 d3 . event . stopPropagation ( ) ;
400400 d3 . event . preventDefault ( ) ;
401- grip . call ( Color . fill , constants . gripBgActiveColor ) ;
401+ grip . call ( Color . fill , sliderOpts . activebgcolor ) ;
402402
403403 var normalizedPosition = positionToNormalizedValue ( sliderOpts , d3 . mouse ( node ) [ 0 ] ) ;
404404 handleInput ( gd , sliderGroup , sliderOpts , normalizedPosition , true ) ;
@@ -409,7 +409,7 @@ function attachGripEvents(item, gd, sliderGroup, sliderOpts) {
409409 } ) ;
410410
411411 $gd . on ( 'mouseup' , function ( ) {
412- grip . call ( Color . fill , constants . gripBgColor ) ;
412+ grip . call ( Color . fill , sliderOpts . bgcolor ) ;
413413 $gd . on ( 'mouseup' , null ) ;
414414 $gd . on ( 'mousemove' , null ) ;
415415 } ) ;
@@ -426,7 +426,7 @@ function drawTicks(sliderGroup, sliderOpts) {
426426 tick . exit ( ) . remove ( ) ;
427427
428428 tick . attr ( {
429- width : constants . tickWidth ,
429+ width : sliderOpts . tickwidth + 'px' ,
430430 'shape-rendering' : 'crispEdges'
431431 } ) ;
432432
@@ -435,11 +435,11 @@ function drawTicks(sliderGroup, sliderOpts) {
435435 var item = d3 . select ( this ) ;
436436
437437 item
438- . attr ( { height : isMajor ? constants . tickLength : constants . minorTickLength } )
439- . call ( Color . fill , isMajor ? constants . tickColor : constants . minorTickColor ) ;
438+ . attr ( { height : isMajor ? sliderOpts . ticklen : sliderOpts . minorticklen } )
439+ . call ( Color . fill , isMajor ? sliderOpts . tickcolor : sliderOpts . tickcolor ) ;
440440
441441 Lib . setTranslate ( item ,
442- normalizedValueToPosition ( sliderOpts , i / ( sliderOpts . steps . length - 1 ) ) - 0.5 * constants . tickWidth ,
442+ normalizedValueToPosition ( sliderOpts , i / ( sliderOpts . steps . length - 1 ) ) - 0.5 * sliderOpts . tickwidth ,
443443 ( isMajor ? constants . tickOffset : constants . minorTickOffset ) + sliderOpts . currentValueTotalHeight
444444 ) ;
445445 } ) ;
@@ -498,9 +498,9 @@ function drawTouchRect(sliderGroup, gd, sliderOpts) {
498498
499499 rect . attr ( {
500500 width : sliderOpts . inputAreaLength ,
501- height : Math . max ( sliderOpts . inputAreaWidth , constants . tickOffset + constants . tickLength + sliderOpts . labelHeight )
501+ height : Math . max ( sliderOpts . inputAreaWidth , constants . tickOffset + sliderOpts . ticklen + sliderOpts . labelHeight )
502502 } )
503- . call ( Color . fill , constants . gripBgColor )
503+ . call ( Color . fill , sliderOpts . bgcolor )
504504 . attr ( 'opacity' , 0 ) ;
505505
506506 Lib . setTranslate ( rect , 0 , sliderOpts . currentValueTotalHeight ) ;
@@ -522,9 +522,9 @@ function drawRail(sliderGroup, sliderOpts) {
522522 ry : constants . railRadius ,
523523 'shape-rendering' : 'crispEdges'
524524 } )
525- . call ( Color . stroke , constants . railBorderColor )
526- . call ( Color . fill , constants . railBgColor )
527- . style ( 'stroke-width' , '1px ') ;
525+ . call ( Color . stroke , sliderOpts . bordercolor )
526+ . call ( Color . fill , sliderOpts . bgcolor )
527+ . style ( 'stroke-width' , sliderOpts . borderwidth + 'px ') ;
528528
529529 Lib . setTranslate ( rect ,
530530 constants . railInset ,
0 commit comments