X-Git-Url: https://git.r.bdr.sh/rbdr/heart/blobdiff_plain/a1c6d8138d774cf9b9e6eee7950e2e4ae18376aa..refs/heads/main:/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