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