Skip to content

Add offline/online detection#37

Open
jbassendine wants to merge 1 commit intohomtec:masterfrom
jbassendine:offline-online-detection
Open

Add offline/online detection#37
jbassendine wants to merge 1 commit intohomtec:masterfrom
jbassendine:offline-online-detection

Conversation

@jbassendine
Copy link
Copy Markdown

Work towards resolving issue #23.

Added HTML banner, offline-online-pane, added helper functions goOffline, goOnline, and animateOnlineOfflinePane, and bound goOffline and goOnline to the following:

Offline banner is always displayed when error is detected, online is only displayed when status is changed from offline to online (which is the purpose of the wasOnline global variable) so people aren't bothered by repeated messages telling them everything is working.

Not sure what you were intending for the design of the banner, I've made it so it slides down as a solid red/green banner from the top, 100% width and 35px height, stays for 2.5 seconds, then slides back to leave 3px of green or red exposed under the header, to give an ongoing display of connection status. Some pictures from iPhone, Android, desktop Chrome below. Also tested on IE11 and desktop Firefox, haven't seen any problems:

online-offline-detection iphone android
online-offline-detection chrome

Cheers!

…helper functions to tilelayer events for map, ajax events for poi search, and inbuilt navigator.onLine online/offline events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant