       actions.unsetMachineListItem @machine('_id'), this
 
 
-  componentWillReceiveProps: ->
-
-    return  unless @refs.sidebarMachinesListItem
-
-    coordinates = getBoundingClientReact @refs.sidebarMachinesListItem
-    @setState { coordinates: coordinates }
-
+  componentWillReceiveProps: -> @setCoordinates()
 
   machine: (key) ->
 


  renderInvitationWidget: ->

    return null  unless @state.coordinates
    return null  unless @props.machine.get('_id') is @state.activeInvitationMachineId

    <SharingMachineInvitationWidget
      key="InvitationWidget-#{@props.machine.get '_id'}"

    kd.utils.defer =>
      actions.setMachineListItem @machine('_id'), this

      if @state.requiredInvitationMachine
        if @state.requiredInvitationMachine.get('_id') is @machine '_id'
          if @state.activeInvitationMachineId isnt @machine '_id'
            # to show invitation widget for both on initial load and after a
            # realtime event. This is probably an anti pattern, to do this in
            # this component here. I will fix it with the restructure of
            # sidebar. ~Umut
            setActiveInvitationMachineId { machine: @props.machine }
            @setCoordinates()

      if @state.activeInvitationMachineId
        @setCoordinates()


  setCoordinates: ->

    return  unless @refs.sidebarMachinesListItem

    coordinates = getBoundingClientReact @refs.sidebarMachinesListItem

    debug 'setcoordinates', coordinates
    @setState { coordinates: coordinates }


  componentWillUnmount: ->

