jeudi 16 juin 2016

No animate for draggable Angular directive?

I had implemented a draggable sidebar directive, very similar to this:

http://plnkr.co/edit/Zi2f0EPxmtEUmdoFR63B?p=preview

I then added an ng-click and some CSS to animate the closing of the left pane. But now when I drag, it animates. How can I make sure that on draggable it doesn't animate, bypassing/nullifying CSS? I would like to do this with no external libraries such as ngAnimate, if possible. Current behavior exists in the Plunkr below:

http://plnkr.co/edit/TZiatECwDaKVrHazTcWv?p=preview

#sidebar {
    background-color: #EEE;
    position: absolute;
    top: 35px;
    bottom: 0;
    left: 0;
    width: 200px;
    overflow: auto;
    transition: width .5s ease-out;
}

I would like to disable the transition property when using the draggable directive.

Aucun commentaire:

Enregistrer un commentaire