Coder Social home page Coder Social logo

angular-carousel's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-carousel's Issues

Issue on iOS 7 - images do not show up

We have an issue using the carousel - and it only occurs in our testing for iOS 7 :(

Here is a sample: https://demo.christianweyer.net/repro/index.html
A Fiddle does not show the issue, BTW.

Please try to hit the URL with e.g. an iPad or the simulator. Some (most) images are not showing up although all of them are loaded (can be seen via the browser web inspector).

Any idea what is wrong here?

Thanks.

deep collection watch and perfs issues

we use a deep $watch on the ngRepeat collection for 2 reasons :

  • track the collection changes (elements added or removed)
  • dimension the container based on the first <li> item dimensions

This causes perfs issues on big collections

we should remove the watch asap and use a non-deep watcher to reference the collection

Buffered and Index don't play together well

This directive works fine if I remove rn-carousel-buffered, but when rn-carousel-index and rn-carousel-buffered both exist on an element, I get an error. I will try to write a test for this a little later (and maybe a PR). I'm using Angular 1.1.4.

<ul rn-carousel rn-carousel-index="5" rn-carousel-buffered>
  <li ng-repeat="page in pages">{{page}}</li>
</ul>

Stacktrace:

TypeError: Cannot call method 'slice' of undefined
    at Object.<anonymous> (angular-carousel.js:13:18)
    at fnInvoke (angular.js:6601:21)
    at OPERATORS.| (angular.js:6218:59)
    at extend.constant (angular.js:6547:14)
    at Object.$watchCollectionWatch (angular.js:8407:22)
    at Object.watchExpression (/#/articles/tag%253Ablogger.com%252C1999%253Ablog-7159470537406093899.post-8500912369013786441?index=11:743:29)
    at Object.Scope.$digest (angular.js:8563:38)
    at Object.$delegate.__proto__.$digest (/#/articles/tag%253Ablogger.com%252C1999%253Ablog-7159470537406093899.post-8500912369013786441?index=11:833:31)
    at Object.Scope.$apply (angular.js:8771:24)
    at Object.$delegate.__proto__.$apply (/#/articles/tag%253Ablogger.com%252C1999%253Ablog-7159470537406093899.post-8500912369013786441?index=11:844:30) 

modifs demo

sur la demo flickr:

  • modif effet de zoom
  • loader modale
  • metas apple home screen
  • metas viewport
  • préparer images coté srv pour améliorer les perfs
  • multiples templates
  • touchmove+click fix

Duplicated first slide in Firefox

The problem with duplicated first slide occurs in Firefox (ver.22).

To solve the problem just comment/remove line 136 (line 136: carousel.css('transform', '').css(translateSlideProperty(getTransformCoordinates(carousel[0]), false));).

I suppose the real problem lies in getTransformCoordinates method.

rn-carousel does not update <UL> content if its reference not modified

I'd made plunker example to reproduce the problem.

  1. Click twice or more on New item link. It will unshifts to start of data array some new values.
  2. Nothing updated in carousel.
  3. Nothing updated in carousel even when you click on Prev or Next links.
  4. Click Toggle trick which is actives mode when data array completly replaced by angular.copy each time new element created.
  5. All (1/2/3) works now as should.

Plugin does not monitor changes on existent data object reference as espected, as angular works by default.

Quick fix is to do trick but its redraws ALL elements per operation that is unacceptable in some cases (which is mine).

Two pixels are missing in the calculated carousel-container width

Hi

When the carousel-container width is calculated there are two pixels missing compared to the translation for each slide. This makes almost no difference if you have just a few slides. But if you have 28+ slides, like I do, it soon makes a very noticeable difference. Each slide gets offset to left the farther into the deck I slide. If I increase the carousel container width +2px (by inspecting the element in chrome), it works fine.

This is also evident on you demo page. Below is after swiping the first slide left.

<div id="carousel-1" class="carousel-container" style="width: 398px;">
 <ul carousel="" class="image ng-scope carousel-slides carousel-animate" 
style="-webkit-transform: translate3d(-400px, 0, 0);">

Sorry for spamming with issues, keep up the good work. :)

Flickering display of previous slide.

I'm seeing a flicker of the previous slide when using an infinite carousel and swiping from previous slide to next.

I see it using the iPad in chrome and safari on this page:

http://blog.revolunet.com/angular-carousel/demo/infinite2.html

I see something like it in my own app with chrome on android (galaxy s4.) however on I don't see it on the demo page above.

I don't see this problem on iphone4 safari on the demo page nor in my app.

In my app (which is just displaying an image on each slide) with the android phone i very clearly see the previous slide for a moment, though this only happens for slides newly added by the infinite next/prev callbacks, however on the iPad it happens on every slide.

Anyone having similar issues? any thoughts on how to go about debugging the issue?

bower install problem

  1. bower install error:
  2. git clone git://github.com/angular/angular-carousel.git don't contain css
  3. need dependencies: ngMobile, but don't mention at readme
D:\Workspace\Code\9game\sklrassistant>bower install angular-carousel
bower cloning git://github.com/angular/angular-carousel.git
bower caching git://github.com/angular/angular-carousel.git
bower fetching angular-carousel
bower checking out angular-carousel#27a0bb766c7ce48ff44978f8108c489071b227be
bower warn Package angular-carousel is still using the deprecated "component.json" file
bower copying C:\Users\TZ\AppData\Roaming\bower\cache\angular-carousel\76c7a29d213308d041cd857d3709d20d
bower cloning git://github.com/angular/bower-angular.git
bower caching git://github.com/angular/bower-angular.git
bower fetching angular
bower checking out angular#v1.0.6
bower copying C:\Users\TZ\AppData\Roaming\bower\cache\angular\ef2188def21eb1bbd1f1792311942a53
bower installing angular#1.0.6
bower installing angular-carousel#27a0bb766c7ce48ff44978f8108c489071b227be
bower error EPERM, rmdir 'D:\Workspace\Code\9game\sklrassistant\src\app\components\angular-carousel\.git\logs\refs'

There were errors, here's a summary of them:
- angular-carousel EPERM, rmdir 'D:\Workspace\Code\9game\sklrassistant\src\app\components\angular-carousel\.git\logs\refs'

When page auto reload carousel redirect to the first slide.

when page auto reload the carousel automatically redirect to the first slide. means if I am on slide No. 3 and if page get refresh automatically then carousel also is redirecting to slide No.1

how to set carousel on current slide on page reload.

Use of orderBy with carousel

I may have made a schoolboy error, but it seems to me that I cannot use orderBy to sort in conjunction with the carousel? I created a sample from your simple demo page, by adding data to sort by, but it generates a "Error: 10 $digest() iterations reached." error. I can't attach the sample here unfortunately. I put the key parts in jsFiddle: http://jsfiddle.net/HcJnd/ but it doesn't run at all there. Sorry.

add rn-carousel-cycle

When the carousel collection is finite (not using getPrev/getNext) we could enable a cycle mode where the carousel cycle through all the slides infinitely.

support data-ng-repeat

var liAttribute = tElement.find('li')[0].attributes['ng-repeat'], got error when using data-ng-repeat or x-ng-repeat

support auto change slide

support autoChange param to auto change slide.

I had try:

<div class="carousel-container" style="height:{{cfg.screen.scrollImgHeight}}px;">
  <ul rn-carousel rn-carousel-index="adIndex" rn-carousel-indicator>
    <li ng-repeat="adInfo in adList" data-ng-click="gotoPage(adInfo.alink)">
      <img data-ng-src='{{adInfo.logo}}' style="height:{{cfg.screen.scrollImgHeight}}px; width:100%"/>
      <!-- <div class="label">{{adInfo.title}}{{adIndex}}-{{$index}}</div> -->
    </li>
  </ul>
</div>
    $scope.adList = [];
    $scope.adIndex = 0;
    var autoScroll=function(){
      $timeout(function(){
        $scope.$apply(function(){
          $scope.adIndex = $scope.adIndex >= $scope.adList.length-1 ? 0 : $scope.adIndex+1
          console.log($scope.adIndex)
        })
        autoScroll()
      },2000)
    }

console.log output the new index but slide don't change.

and when using angular.element($0).scope().$apply(function(){angular.element($0).scope().adIndex=2}) ($0 is scope005) at chrome, the slide change well.

image

image

Ng-repeat not working on angular 1.2.0-rc.2

After an angular update the ng-repeat on

  • is not working at all, it's like carouselCollection.cards object is empty...

    It's still working well when I'm not using ng-repeat though...

  • <IE10 Support

    Hi Revolunet, Great Carousel! We are interested in using it for our project, but no support for <IE10 is a problem for us.

    I note (with interest) your todo comment around line 149 "todo : use non-3d version for browsers not supporting it". I tried to see if I could use modernizr to make it work for IE9:

    carousel.css(translateSlideProperty(getTransformCoordinates(carousel[0]), Modernizr.csstransforms3d));

    ...but it didn't work for me and of course 2d transform isn't supported in any case by <IE9 .

    What are your plans for <IE10 support?

    Thanks in advance.

    I also modified it to use class="ul" and class="li" so that I could use divs instead of ordered list, to make it play nicely with some other software we are using. Might be nice to be able to specify a selector for parent and an optional selector for child elements (defaulting to any immediate child of the parent).

    Appending/prepending slides directly to model

    Currently the rn-carousel-next and rn-carousel-prev directives need new items to be returned, which leads to disconnection between the initial array of carousel's ng-repeat and the carousel's collection. For example in the 'infinite carousel' demo, the 'pages' array only contains the first five slides, and new slides are never added to it.

    It would be nice to be able to append/prepend slides directly to the model (i.e. the 'pages' array in this case). This already works for appending, although it relies on the inefficient deep watch on carousel collection. Prepending causes the carousel to switch to a different slide.

    Issue when images are loaded after the page

    Hi,
    First, nice work.

    I have an issue when the variable who store images is set after the page load.
    The carousel width and height was not set correctly.
    I ultimately a long and small width.

    How can we redefine carousel's proportion after the change of the variable who store images ?

    adding slides while transitionning

    If we have a buffered carousel and receive the new slides while transitioning, this can shift the visible slides which is not desired, and also shift the whole indexes.

    If we detect an ongoing transition, we should wait until it finishes before updating the buffer.

    demo update

    • améliorer menu snap (gauche) : traits parasites entre les sections
    • contenu : mettre du contenu PRO : immobilier, luxe (bijoux, montres...)
    • icones : faire plus fin, mettre une icone info a la palce de "?"
    • centrage horizontal loader
    • pb bandes blanches a droite et en bas
    • loader de fond des images pdt que ca charge pour la modale
    • icone infos : préparer modale avec infos revolunet

    Request for feature: static carousel initialization.

    See header. We need some like this:

    <ul rn-carousel>
      <li><our-direcitve1/></li>
      <li><our-direcitve2/></li>
      <li><our-direcitve3/></li>
    </ul>
    

    No ng-repeat. No watching on collection. Just static initialization like in example above.

    Any suggestions?

    améliorer design demo

    dans le dossier demo/flickr-full, améliorer le design :

    • toolbar du haut
    • layer des images
    • menu de gauche
    • loader (doit etre en css3)

    autres idées ?

    Uncaught TypeError: Property 'getWidth' of object [object Object] is not a function

    I get the error:

    Uncaught TypeError: Property 'getWidth' of object [object Object] is not a function angular-carousel.min.js:8
    E angular-carousel.min.js:8
    (anonymous function) angular.js:2032
    forEach angular.js:151
    eventHandler
    

    My HTML:

    <ul carousel class="hero-unit">
      <li ng-repeat="question in questionsResponse.questions" style="width: 300px">
        {{ question.text }}
      </li>
    </ul>
    

    There also seem to be debugging enabled for any mouse event, in the minified version in github.

    overflow-y: scroll

    Awesome, plugin. Quick question, is is possible to to enable scrolling?

    Click send after swiping

    When there is a clickable element like a button on a carousel slide and a swipe is release on this element a click is performed.

    Expected result: If the user performs a swipe all click events should be cancelled.

    I tested this on a PC with a mouse.

    backface-visibility: hidden on li is necessary?

    I will only talk about the behaviour on Chrome 29.

    The CSS property -webkit-backface-visibility: hidden; backface-visibility: hidden; is used on li.

    From what I though maybe it was used to force the browser to create a hardware accelerated layer for each li. The problem is all elements with located on top of it by using position absolute or relative will also have their own layer (you can see this by enabling show composited border layers in Chrome dev tools). In the end it can cause the creation of too many layers which can lead to performance issue especially on mobile when the browser needs to composite layers. If we remove this CSS property everything gets back to normal and I did not notice changes of the behaviour on the carousel. So, the question is this CSS property is really required?

    TypeError: Cannot set property 'transform' of undefined

    I get this very randomly, say every 50 slide swipes or more, so I'm not sure how to isolate the problem. Testing on Galaxy Tab 2 in Phonegap, Logcat gives the following:

    06-14 02:45:39.661: E/Web Console(883): TypeError: Cannot set property 'transform' of undefined
    06-14 02:45:39.661: E/Web Console(883): at forEach.css (file:///android_asset/app/components/angular/angular.js:1806:27)
    06-14 02:45:39.661: E/Web Console(883): at Object.JQLite.(anonymous function) as css
    06-14 02:45:39.661: E/Web Console(883): at updateSlidePosition (file:///android_asset/app/components/ng-carousel/angular-carousel.js:223:22)
    06-14 02:45:39.661: E/Web Console(883): at Object.fn (file:///android_asset/app/components/ng-carousel/angular-carousel.js:148:15)
    06-14 02:45:39.661: E/Web Console(883): at Object.Scope.$digest (file:///android_asset/app/components/angular/angular.js:7896:27)
    06-14 02:45:39.661: E/Web Console(883): at Object.Scope.$apply (file:///android_asset/app/components/angular/angular.js:8097:24)
    06-14 02:45:39.661: E/Web Console(883): at Object.$swipe.bind.end (file:///android_asset/app/components/ng-carousel/angular-carousel.js:272:23)
    06-14 02:45:39.661: E/Web Console(883): at HTMLUListElement. (file:///android_asset/app/components/ng-carousel/angular-mobile.js:109:39)
    06-14 02:45:39.661: E/Web Console(883): at file:///android_asset/app/components/angular/angular.js:1972:10
    06-14 02:45:39.661: E/Web Console(883): at Array.forEach (native):5704

    The carousel freezes visually after this, but swipe events are still triggered as normal.

    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.