X-Git-Url: https://git.r.bdr.sh/rbdr/heart/blobdiff_plain/fff45e3b9d371851d4e8c3e1655a5bf1509080f2..b412d834ecb0bc6eb445049da4ec93ce5923af2f:/js/app.js 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