X-Git-Url: https://git.r.bdr.sh/rbdr/heart/blobdiff_plain/910278aad4a0b47dc40112839a18bc8e590302e5..db32a40a558bcc51609d3059079112027507760e:/js/app.js?ds=sidebyside diff --git a/js/app.js b/js/app.js index 25d581d..63990dc 100644 --- a/js/app.js +++ b/js/app.js @@ -14,6 +14,10 @@ heartRenderer.render(mainElement); 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 * renderer being used. It is set up on load.