]> git.r.bdr.sh - rbdr/heart/blobdiff - js/app.js
Update changelog
[rbdr/heart] / js / app.js
index 25d581d8268fe02446f52cc28d9fda453231c7b5..63990dc1bbca0e80e7cabea851b2f39b35503a34 100644 (file)
--- a/js/app.js
+++ b/js/app.js
     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.