X-Git-Url: https://git.r.bdr.sh/rbdr/heart/blobdiff_plain/f895bdac3edf5d607331628798fd6d1b6d8d6f0e..abf60045c085a46fe80ba074cfd0670ac67a7677:/js/app.js?ds=sidebyside diff --git a/js/app.js b/js/app.js index 12065b2..63990dc 100644 --- a/js/app.js +++ b/js/app.js @@ -15,6 +15,8 @@ heartRenderer.activate(); window.addEventListener('resize', heartRenderer.resize.bind(heartRenderer)); + window.addEventListener('blur', heartRenderer.stopFollowingMouse.bind(heartRenderer)); + window.addEventListener('focus', heartRenderer.startFollowingMouse.bind(heartRenderer)); /** * Exported global object. This will contain the instance of the heart