     jQelm = $(elm[0])
     $(jQelm).resizable({
       start: (event, ui) ->
-        widget.render = false
         for series in widget.data
           series.values = series.values.slice()
       stop: (event, ui) ->
-        widget.render = true
+        widget.update()
     })
 )
 


  $scope.removeAllWidgets = ->
    $scope.widgets = []

  # update widgets
  $interval(
    ->
      widget.update() for widget in $scope.widgets when widget.render
    , 300
    )
])

.directive('draggable',


  $scope.addWidget = (peripheralFilter = {id: -1}) ->
    $scope.widgets.push new widgetFactory(robot.peripheral(peripheralFilter), 'linechart')
    $scope.widgets[$scope.widgets.length-1].update()

  $scope.removeWidget = (widget) ->
    id = widget.id
