darul75 / angular-awesome-slider

:arrows_clockwise: Angular slider control directive
http://darul75.github.io/angular-awesome-slider/
MIT License
144 stars 63 forks source link

Tip of the slider is not changing #10

Closed roots-ai closed 10 years ago

roots-ai commented 10 years ago

screen shot 2014-04-02 at 9 00 26 pm

What can be the issue? Please help.

darul75 commented 10 years ago

hi, can you send your options (in JSON) so I can reproduce it, thx

roots-ai commented 10 years ago

$scope.fileOptions = { from: 1700, to: 2014, step: 10, scale: [1700, 1800, 1900, 2000], smooth: true } $scope.fileFilters = {year:"1914;2014"};

darul75 commented 10 years ago

In your case, 'to' limit if out of scale bounds, would following options fit your needs:

$scope. fileOptions = {
    from: 1700,
    to: 2050,
    step: 10,
    scale: [1700, '|', 1800, '|', 1900, '|', 2000, '|'],                                
    smooth: true
};

or

$scope. fileOptions = {
    from: 1700,
    to: 2100,
    step: 10,
    scale: [1700, 1800, 1900, 2000, 2100],                              
    smooth: true
};

by instance

roots-ai commented 10 years ago

Hi, thanks. that worked but only on the one slider.

Actually there are three sliders and with different options, and ids. But the tooltip isn't working properly on the rest two. What might be the issue?

darul75 commented 10 years ago

I have checked how 'id' are handled and have not seen any issue yet, check you deal with last version 0.1.0. Do not hesitate send me some code (html/js/fiddle or online example)

roots-ai commented 10 years ago

Hi, Thanks for replying.

I am unable to reproduce the error on the plunkr. I guess some of the internal javascript files are playing with the ng-slider(a possibility). Also now on removing the other two sliders the tooltips on even the single slider are not working properly. Can you please guide me how can I go about debugging this problem?

darul75 commented 10 years ago

hi,

thank you for details, first of all check following template content has the right id for each of you sliders ( directive template )

'<span ng-class="mainSliderClass" id="{{sliderTmplId}}">' +
                        '<table><tr><td>' +
                            '<div class="jslider-bg">' +
                                '<i class="l"></i><i class="f"></i><i class="r"></i>' +
                                // '<i class="v"></i>' +
                            '</div>' +
                            '<div class="jslider-pointer"></div>' +
                            '<div class="jslider-pointer jslider-pointer-to"></div>' +
                            '<div class="jslider-label"><span ng-bind-html="from"></span></div>' +
                            '<div class="jslider-label jslider-label-to"><span ng-bind-html="to"></span>{{options.dimension}}</div>' +
                            '<div class="jslider-value"><span></span>{{options.dimension}}</div>' +
                            '<div class="jslider-value jslider-value-to"><span></span>{{options.dimension}}</div>' +
                            '<div class="jslider-scale" id="{{sliderScaleDivTmplId}}"></div>' +
                        '</td></tr></table>' +
                    '</span>',

Then recheck my example here : http://darul75.github.io/ng-slider/

There might be a bug somewhere ;)

I have to look more deeply inside code then.

darul75 commented 10 years ago

reproduced ?

roots-ai commented 10 years ago

Hi darul! Sorry for not been able to reply. I had to leave this thing due to some design issues with my project. But when the last time I was working with it, I was still having the issues and was unable to find the problem. Though I didn't completely try.