           translator 'opinion_views.minimize_minimize', 'minimize'
 
   shadow_view_state_offset: ->
-    left = document.querySelector('[data-view-state="custom"]')?.offsetLeft    
-    
+    ww = WINDOW_WIDTH()
+    return if @local.view_state_left? && ww == @left_set_for_window_width
+
+    left = @refs.custom?.offsetLeft
     if left != @local.view_state_left
       @local.view_state_left = left 
+      @left_set_for_window_width = ww
       save @local
 
   componentDidUpdate: -> @shadow_view_state_offset()

  date_state.start = date_state.end = date_state.active = null 
  save date_state

reset_to_all = ->
  clear_all()
  is_admin = fetch('/current_user').is_admin  
  show_others = !customization('hide_opinions') || is_admin
  opinion_views_ui = fetch 'opinion_views_ui'  

        callback: (item, previous_state) => 
          if previous_state == 'custom'
            if user_has_set_a_view()
              local_state.minimized = !local_state.minimized
              save local_state
            else 
              reset_to_all(local_state)

          else 
            local_state.minimized = false
            clear_all(local_state)
      }
    ]

    reset_to_default_view = (force_all) ->
      clear_all(local_state)

      dfault = customization('opinion_views_default')

