darul75 / angular-awesome-slider

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

position pointer? #136

Open vance opened 8 years ago

vance commented 8 years ago

The pointer always has an origin of left/top. I'm trying to move my custom pointer image left (increase size of pointer, too) but the image always hangs too far tot he right. There's no container to move around. not sure how to accomplish this.

In my opinion jslider-pointer should not have the background image, it should be on a child element so it can be positioned better without having to break the pointer element.

vance commented 8 years ago

Ah, I guess I can just remove the background on the jslider-pointer and add a child element right in the template and set the overflow to visible.

    angular.module('angularAwesomeSlider')
        .run(['$templateCache', function ($templateCache) {
            $templateCache.put('ng-slider/slider-bar.tmpl.html',
                '<span ng-class="mainSliderClass" id="{{sliderTmplId}}">' +
                '<table><tr><td>' +
                '<div class="jslider-bg">' +
                '<i class="left"></i>'+
                '<i class="right"></i>'+
                '<i class="range"></i>'+
                '<i class="before"></i>'+
                '<i class="default"></i>'+
                '<i class="default"></i>'+
                '<i class="after"></i>'+
                '</div>' +
                '<div class="jslider-pointer"><div class="handle-image"></div></div>' +
                '<div class="jslider-pointer jslider-pointer-to"></div>' +
                '<div class="jslider-label" ng-show="options.limits"><span ng-bind="limitValue(options.from)"></span>{{options.dimension}}</div>' +
                '<div class="jslider-label jslider-label-to" ng-show="options.limits"><span ng-bind="limitValue(options.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>');
        }]);
darul75 commented 8 years ago

HI Vance, I have looked at your website, very nice.

Your description is quite clear and maybe I should fix something with that, is it possible for you to put an example by changing this fiddle, it will help me to solve or help you http://jsfiddle.net/darul75/g9e9n8xc/

Did my answer helped you on #135