Open CorbynS opened 11 years ago
probably related, uislider doesn't work within angularui tabs.
The following works ...
<slider floor="1" ceiling="60" ng-model-low="peeks.b" ng-model-high="peeks.t"></slider>
<tabset id="cntabs">
Wheras this ...
<tabset id="cntabs">
<slider floor="1" ceiling="60" ng-model-low="peeks.b" ng-model-high="peeks.t"></slider>
displays the bubble on the left and is not draggable along the slider bar.
I have also noticed the issue rsmithh points out above.
Yeah.. I'm seeing this problem as well. Prajwalkman, this severely limits the use of this REALLY cool directive.. Any possibility we can get a fix?
Getting same problem :( When initially hidden with an ng-show the slider handle is "stuck" on the far left of the slider and won't move.
Same problem in a more specific case: when
Either-way, great work on this directive @prajwalkman (wonderful to have a slider without lugging in the massive JqueryUI library).
@rsmithh I am getting the same problem inside tabset directive from angular-ui, any ideas how to fix it?
Same issue. would love to see a fix
The problem seems to be in the dimensions function, it sets all widths up but when the element isn't visible all the widths are zero until a watch fires and redraws things. One way to resolve this is to force the slider to redraw when made visible, this can be accomplished by adding the following watch to the post link function, roughly line 134 in the latest angular-slider.js file:
scope.$watch(function() { return element.is(':visible'); }, function(isVisible) { if (isVisible) { updateDOM(); //existing function that redraws everything } });
The above fix works. Although in the long run, it may just be better to go with a new Angular slider library since this one is deprecated.
@deloschang, which project are you referring to?
When the slider is wrapped with-in an element that has an ng-show defaulted to false, the slider does not appear correctly initially.
Code example: javascript:
html:
With this code block the initial pointers will both be placed to the far left. Once I attempt to drag the pointers the slider is displayed correctly. This bug has been verified on Chromium Version 28.0.1500.71 Ubuntu 12.04 (28.0.1500.71-0ubuntu1.12.04.1) and Firefox version 23.0 for Ubuntu 12.04