change fade animation and properly clean timeout
This commit is contained in:
parent
5c99abfafc
commit
02f986fe72
|
@ -5,6 +5,7 @@ BroadcastTowerComponent = Ember.Component.extend
|
|||
classNames: ['broadcast']
|
||||
|
||||
isOpen: false
|
||||
timeoutId: ''
|
||||
|
||||
isEmpty: (->
|
||||
@get('status') == ''
|
||||
|
@ -16,9 +17,12 @@ BroadcastTowerComponent = Ember.Component.extend
|
|||
@sendAction('toggleBroadcasts')
|
||||
|
||||
if @get('isOpen') == true
|
||||
setTimeout =>
|
||||
@toggleProperty('isOpen')
|
||||
@sendAction('toggleBroadcasts')
|
||||
, 10000
|
||||
@set('timeoutId', setTimeout =>
|
||||
@toggleProperty('isOpen')
|
||||
@sendAction('toggleBroadcasts')
|
||||
, 10000
|
||||
)
|
||||
else
|
||||
clearTimeout(@get('timeoutId'))
|
||||
|
||||
`export default BroadcastTowerComponent`
|
||||
|
|
|
@ -48,8 +48,6 @@ Controller = Ember.Controller.extend
|
|||
broadcasts.set('content', receivedBroadcasts)
|
||||
broadcasts.set('isLoading', false)
|
||||
|
||||
console.log broadcasts
|
||||
|
||||
broadcasts
|
||||
).property('broadcasts')
|
||||
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
margin: 0 auto .7em
|
||||
border-radius: 2px
|
||||
height: 0
|
||||
transform-origin: top center
|
||||
transform: translateY(50%) scale(.9)
|
||||
transform-origin: center center
|
||||
// transform: translateY(50%)
|
||||
opacity: 0
|
||||
z-index: -1
|
||||
will-change: transform, opacity
|
||||
transition: opacity 150ms ease, transform 50ms linear
|
||||
will-change: opacity
|
||||
transition: opacity 150ms ease
|
||||
|
||||
&:after
|
||||
content: ""
|
||||
|
@ -55,7 +55,7 @@
|
|||
border: solid 2px $cream-dark
|
||||
opacity: 1
|
||||
height: auto
|
||||
transform: translateY(0) scale(1)
|
||||
// transform: translateY(0)
|
||||
|
||||
.icon-close
|
||||
display: inline-block
|
||||
|
|
Loading…
Reference in New Issue
Block a user