From 5f4c72c20d8ece819f526cc8a006b0e7b73380c4 Mon Sep 17 00:00:00 2001 From: Brian Peiris <brianpeiris@gmail.com> Date: Tue, 22 May 2018 00:26:21 -0700 Subject: [PATCH] Add doc for exit-on-blur system --- doc/index.html | 6 +++++- src/systems/exit-on-blur.js | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/index.html b/doc/index.html index 57204dfc8..8845ce6e1 100644 --- a/doc/index.html +++ b/doc/index.html @@ -13,7 +13,7 @@ <ul> <li>Systems <ul> - <li><a href="#systems/app-mode">app-mode</a></li><li><a href="#systems/personal-space-bubble">personal-space-bubble</a></li> + <li><a href="#systems/app-mode">app-mode</a></li><li><a href="#systems/exit-on-blur">exit-on-blur</a></li><li><a href="#systems/personal-space-bubble">personal-space-bubble</a></li> </ul> </li> @@ -267,6 +267,10 @@ <a name="systems/app-mode"></a><h4>app-mode</h4> <p>Simple system for keeping track of a modal app state</p> <span>src/systems/app-mode.js</span> + </article><article> + <a name="systems/exit-on-blur"></a><h4>exit-on-blur</h4> + <p>Emits an "exit" event when a user has stopped using the app for a certain period of time</p> + <span>src/systems/exit-on-blur.js</span> </article><article> <a name="systems/personal-space-bubble"></a><h4>personal-space-bubble</h4> <p>Iterates through bubbles and invaders on every tick and sets invader state accordingly. testing multiline things</p> diff --git a/src/systems/exit-on-blur.js b/src/systems/exit-on-blur.js index c6820a401..5fe0b6fd6 100644 --- a/src/systems/exit-on-blur.js +++ b/src/systems/exit-on-blur.js @@ -1,3 +1,7 @@ +/** + * Emits an "exit" event when a user has stopped using the app for a certain period of time + * @system exit-on-blur + */ AFRAME.registerSystem("exit-on-blur", { init() { this.onBlur = this.onBlur.bind(this); -- GitLab