GithubHelp home page GithubHelp logo

angular-sly's People

Contributors

decease avatar gigerbytes avatar jperals avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

angular-sly's Issues

Great start - but left unfinished

Any plans to finish this Angular directive for Sly? NgRepeat requires some work, so that sly's "reload" is called after an item is added (and the repeat is executed).

'slidee' element always set to width: 0px

For some reason my .slidee element is always initialized to 'width: 0px'.

Here is my view code somewhat simplified (in jade):

#sliderbox-container
  .scrollbar#slyscrollbar
      .handle
        .mousearea
  .frame(sly-horizontal)
    ul.slidee
      li.daywithtimeslots(ng-repeat="day in dayswithappts()" sly-horizontal-repeat sly-options="{itemNav: 'centered', startAt: 1}")
        .dateheader
          h2.date {{ day.format('M') }}/{{ day.format('D') }}
          span.weekday {{ day.format('dddd') }}
        .timeslot-box
          ul.timeslots
            li timeslot

here is my style code (less):

#sliderbox-container {
        .frame {
          height: 500px;
          margin: 0px 0px;
          padding: 10px 0px; //(ver,hor)
          overflow: hidden;
          width: 100%;
        }
        .slidee {
          list-style: none;
          margin: 0;
          padding: 0;
          height: 100%;
        }
        .slidee li {
          float: left;
          height: 100%;
          margin: 0 5px 0 0;
          width: 175px;
          text-align: center;
          cursor: pointer;
        }
        .scrollbar {
          margin: 0 0 1em 0;
          height: 2px;
          background: #ccc;
          line-height: 0;
        }
        .scrollbar .handle {
          width: 100px;
          height: 100%;
          background: #292a33;
          cursor: pointer;
        }
        .scrollbar .handle .mousearea {
          position: absolute;
          top: -9px;
          left: 0;
          width: 100%;
          height: 20px;
        }

      }

when it loads, I can see that the 'dragged' class gets added when I do a drag action, and the translateX amount gets changed, but the ul.slidee is always width:0px and therefore when I drag it doesnt allow the move to 'stick'.. i.e. it gets dragged as long as I am doing the action but it just 'bounces' back to the start position, also only the first li element shows up since there is no width.

What is incorrect that is making it not calculate the slidee width initially?

** NOTE: this is in a directive with isolate scope, if that effects anything.

Reload scrollable on resize

In order to get a horizontal sly to readjust and show the correct active item when you resize your browser you need to reload the sly object with the keyword reload. Sly will then perform new calculations on the list items appropriately.

Add this to your horizontal and horizontal repeat, saved me on a project.

$(window).on("resize", function() { frame.sly("reload"); });

use grunt build erro

the erro info is:
Uncaught Error: [$injector:modulerr] Failed to instantiate module ncApp due to:
Error: [$injector:modulerr] Failed to instantiate module angular-sly due to:
Error: [$injector:nomod] Module 'angular-sly' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

I use the yeoman generator-angular grunt

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.