Git Product home page Git Product logo

angular-ranger's People

Contributors

justmaier avatar seriouscoderone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-ranger's Issues

Single value not updated

Hi,

When you use "Single value", the value is not updated (position of bar is unchanged) when value change. (Missing watcher?)

Temp fix.: Add max-value like this:
<angular-ranger min="1" max="100" step="1" value="s.v" max-value="s.v">

Regards,

Vertical View

is it possible to use the ranger in a vertical view?

Bower Version Still old

Hey dude,

I see you fixed the marker.css error on github, but your bower version is still 0.1.3. Is there a reason you aren't updating it?

Cheers

Single Value

Is there a way to make only single value ranger?

Windows Resize causes "Uncaught TypeError: Cannot read property 'css' of undefined"

Error:

Uncaught TypeError: Cannot read property 'css' of undefined

To reproduce error:

  1. Import angular-ranger as usual
  2. Don't click on the ranger
  3. Resize window screen (Whenever windows screen resizes, the same error gets logged)

Stack Trace: Anything related to .css function call

function updatePosition(){
    markers[moveTarget].css('left', currentX[moveTarget]+'px');
    if(moveTarget == 'min'){
        fill.css('left', currentX.min+'px');
    }else{
        fill.css('right', (maxPx - currentX.max)+'px');
    }
}
function updatePositionPercentage(){
    var percentages = {
        min: (Math.abs(scope.min - scope.minValue)/range)*100,
        max: (Math.abs(scope.min - scope.maxValue)/range)*100
    };
    markers.min.css('left', percentages.min+'%');
    markers.max.css('left', percentages.max+'%');
    fill.css({
        'left': percentages.min+'%',
        'right': (100-percentages.max)+'%'
    });
}

Possible workaround:

  1. Added checking logic before running the codes: (e.g.)
if (markers[moveTarget]) ...

How to determine change event

I want to fire a change event when the slider values have been changed. However, without ngModel, it seems I can not have a ngChange in the directive.
I don't want to use $watch in my situation because there are several sliders created by ngRepeat, and I wants to know which one fire the change event.

Is there clean way to do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.