X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=src%2Fmkws-widget-main.js;h=a73a1afe6b5f84155072281a29e66fc4aea9083e;hp=3986c16fa21b04ac72796964cc3841cbf7f6975c;hb=51fe6a6521ef94fed9a1b36daae52831b10e0269;hpb=7610fdb0a2ebc53d9e9f960bbd9f2c806ec3d738 diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 3986c16..a73a1af 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -159,19 +159,24 @@ mkws.registerWidgetType('records', function() { } this.team.queue("records").subscribe(setRecordData); - - this.node.mouseenter(function() { + + var m_timer; + this.node.mousemove(function() { that.info("freezing display records"); that.node.css('opacity', 0.5); m_frozen = true; + clearTimeout(m_timer); + m_timer = setTimeout(unfreezeRecordDisplay, 1000); }); - this.node.mouseleave(function() { + function unfreezeRecordDisplay() { + clearTimeout(m_timer); that.info("refreshing records"); that.node.css('opacity', 1); m_frozen = false; refreshRecordData(); - }); + } + this.node.mouseleave(unfreezeRecordDisplay); that.autosearch(); });