angular-carousel icon indicating copy to clipboard operation
angular-carousel copied to clipboard

Library stopped working with angular 1.3.1

Open BeOleg opened this issue 10 years ago • 18 comments

My bower.json:

{
  "name": "blue",
  "version": "0.0.0",
  "dependencies": {
    "angular": "1.3.1",
    "json3": "~3.3.1",
    "es5-shim": "~3.1.0",
    "bootstrap-sass-official": "~3.2.0",
    "angular-sanitize": "1.3.1",
    "angular-animate": "1.3.1",
    "angular-touch": "1.3.1",
    "restangular": "~1.4.0",
    "ui-bootstrap": "~0.11.2",
    "ui-router": "~0.2.11",
    "ng-grid": "~2.0.13",
    "angular-bootstrap": "~0.11.2",
    "angular-carousel": "~0.3.5"
  },
  "devDependencies": {
    "angular-mocks": "1.3.1",
    "angular-scenario": "1.3.1"
  },
  "appPath": "app"
}
        <ul rn-carousel class="image">
            <li ng-repeat="image in email.value.files">
                <div class="layer">{{ image }}</div>
            </li>
        </ul>
        <ul rn-carousel class="image">
            <li>slide #1</li>
            <li>slide #2</li>
            <li>slide #3</li>
        </ul>

the <ul rn-carousel class="image"> shows on the DOM with width and height of 0px.

Any assistance is highly appreciated.

BeOleg avatar Nov 04 '14 09:11 BeOleg

Hi man, The css slightly changed in carousel 0.3+ (much lighter) did you get the last css from the repo ? https://github.com/revolunet/angular-carousel/blob/master/dist/angular-carousel.css

revolunet avatar Nov 04 '14 09:11 revolunet

I'm getting the same issue. Already updated the bower package but i still get height 0px even thought my images are 480px * 480px large

geekyme avatar Nov 05 '14 09:11 geekyme

Wrote a simple example:

image

This is the result:

image

geekyme avatar Nov 05 '14 10:11 geekyme

any plunker around ?

revolunet avatar Nov 05 '14 10:11 revolunet

http://plnkr.co/edit/jQZmKrKvue090h7VKDf7?p=preview instead

geekyme avatar Nov 05 '14 10:11 geekyme

yep you need to set your ul height in css

revolunet avatar Nov 05 '14 10:11 revolunet

that doesnt make sense... previously i dont have to do that. Also, my images are coming in dynamically and I need to support different screen sizes. I should not be hardcoding the ul height but instead allow the height to stretch according to the image sizes.

geekyme avatar Nov 05 '14 10:11 geekyme

looks like its due to the position:relative on the ul. i'll try to find a solution but if you have some time, PR appreciated :)

revolunet avatar Nov 05 '14 10:11 revolunet

I don't really know the innards of how you wire up the transitions... but anyway when I changed position:absolute below to position: relative, the images appear again. However the transitions between slides broke so you would probably know best about that

angular-carousel.css:14

  ul[rn-carousel] > li {
    color: black;
    -webkit-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: visible;
    vertical-align: top;
    position: absolute;
    left: 0;
    right: 0;
    white-space: normal;
    padding: 0;
    margin: 0;
    list-style-type: none;
    width: 100%;
    height: 100%;
    display: inline-block; }

geekyme avatar Nov 05 '14 11:11 geekyme

is this fixed in the new release? I see you added a new feature.

geekyme avatar Nov 11 '14 02:11 geekyme

nope we need to find a proper solution

revolunet avatar Nov 11 '14 13:11 revolunet

I managed to get around this for now by adding the following to ul[rn-carousel]

ul[rn-carousel] {
height: 100%;
min-height: 100%;
}

That works for me on android/iOS.

olliekav avatar Nov 20 '14 17:11 olliekav

@olliekav Thought the same, didnt worked as expected for me :/

iam4x avatar Nov 21 '14 14:11 iam4x

This at least shows you the contents of the carousel again @iam4x :

ul[rn-carousel] {
height: 1000px;
min-height: 100%;
}

My workaround is setting the height with javascript : /

samsface avatar Nov 22 '14 23:11 samsface

@samsface It depends on your layout, 1000px would be rly too much for me :)

iam4x avatar Nov 23 '14 12:11 iam4x

Is there a workaround guys? I am still facing this problem :(

maharjanmilan avatar Dec 25 '14 16:12 maharjanmilan

I used an angular watch on the height of the elements directly inside the carousel where the watch callback function sets the height of the carousel. I don't like it, but it's the only thing I could think off.

samsface avatar Dec 25 '14 16:12 samsface

any news here?

molerat619 avatar Feb 11 '16 15:02 molerat619