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