use event handler to trig plot drawing (avoid heavy garbage calls after plot is removed from session)

This commit is contained in:
jean-emmanuel 2016-03-14 12:06:02 +01:00
parent 8c09e690f5
commit 10eed99257

View file

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