API Docs for: 2.7.3
Show:

SA_ConnectionStatusDetector Class

Extends BaseComponent2D
Module: Component
Parent Module: Wanaplan

This component is responsible to detect if the browser is online or offline.

Constructor

SA_ConnectionStatusDetector

(
  • core
)

Parameters:

  • core Core

    The main engine.

Methods

_offline

() private

Handler used by the checkOnline method to send a wnp.standalone.connectionChanged event.

_online

() private

Handler used by the checkOnline method to send a wnp.standalone.connectionChanged event.

_onOfflineHandler

() private

Handler called when the browser status is set to offline from its menu.

_onOnlineHandler

() private

Handler called when the browser status is set to online from its menu.

checkOnline

()

Check if the browser is online or offline by sending an Ajax request. If the browser is online then a wnp.standalone.online event is triggered. Otherwise a wnp.standalone.offline event is triggered.

destroy

()

Inherited from BaseComponent2D

Destroy the component.

disable

()

Inherited from BaseComponent2D:

Disables the component

enable

()

Inherited from BaseComponent2D:

Enables the component

getTargeted

(
  • vector
)
Object

Inherited from BaseComponent2D:

Finds out if the given position is over an element handled by the component

Parameters:

  • vector Vector

    A position, usually the cursor's one.

Returns:

Object:

The targeted element, or null if nothing is found.

initialize

()

Inherited from BaseComponent2D

Initialize the component.

onContextChanged

(
  • context
)

Inherited from BaseComponent2D:

Method called when the context is switched (2D -> 3D or 3D -> 2D)

Parameters:

  • context String

    The new context

startListening

()

Inherited from BaseComponent2D:

Calls all the event listeners.

stopListening

()

Inherited from BaseComponent2D:

Removes all the event listeners.

update

()

Inherited from BaseComponent2D

Update the the component. The internal timer is updated and a check is done if needed.

Properties

name

String

Inherited from BaseComponent2D:

Component name

priority

Number

Inherited from BaseComponent2D:

Priority of the component in the "update" and "draw" routines

structure

wnp.Structure

Inherited from BaseComponent2D:

Structure file instance (shortcut to wanaplan.structure). This is the base object where the whole plan is saved