X-Git-Url: https://git.r.bdr.sh/rbdr/heart/blobdiff_plain/fff45e3b9d371851d4e8c3e1655a5bf1509080f2..43764349c0c78925e5d83ab5dad2d0e51a152d60:/js/app.js?ds=inline 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