directly check if widget is in dom instead of using jquery event to decide if it has to be updated

This commit is contained in:
jean-emmanuel 2016-03-14 17:42:32 +01:00
parent 10eed99257
commit fc86609875

View file

@ -83,11 +83,8 @@ module.exports.create = function(widgetData,container) {
})
$('body').on('sync',function(e,id,w){
widget.trigger('draw',[id,w])
if (widget.linkedWidgets.indexOf(id)==-1 || !document.contains(widget[0])) return
})
widget.on('draw',function(e,id,w){
if (widget.linkedWidgets.indexOf(id)==-1) return
widget.fetchValues()
requestAnimationFrame(widget.draw)
})