Эх сурвалжийг харах

Fixed indicator height + offset

Taddeus Kroes 12 жил өмнө
parent
commit
8e72509409
2 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 2 1
      guide.coffee
  2. 1 1
      style.sass

+ 2 - 1
guide.coffee

@@ -7,7 +7,6 @@ FETCH_URL = 'programs.php'
 HOUR_WIDTH = 200
 HOUR_WIDTH = 200
 SCROLL_MULTIPLIER = HOUR_WIDTH
 SCROLL_MULTIPLIER = HOUR_WIDTH
 
 
-
 #
 #
 # Utils
 # Utils
 #
 #
@@ -164,11 +163,13 @@ AppView = Backbone.View.extend(
         setInterval((=> @updateIndicator()), 3600000 / HOUR_WIDTH)
         setInterval((=> @updateIndicator()), 3600000 / HOUR_WIDTH)
 
 
     addChannels: () ->
     addChannels: () ->
+        @$('.channels').empty()
         Channels.each((channel) ->
         Channels.each((channel) ->
             view = new ChannelView(model: channel)
             view = new ChannelView(model: channel)
             view.render()
             view.render()
             @$('.channels').append(view.el)
             @$('.channels').append(view.el)
         , @)
         , @)
+        @$('.indicator').height(@$('.channels').height())
         @fetchPrograms()
         @fetchPrograms()
 
 
     loadDay: (day) ->
     loadDay: (day) ->

+ 1 - 1
style.sass

@@ -82,5 +82,5 @@ html, body
     position: absolute
     position: absolute
     width: 1px
     width: 1px
     height: 100%
     height: 100%
-    top: 0
+    top: 64px
     background-color: $indicator-color
     background-color: $indicator-color