WanaPlan

API Docs for: 2.7.0
Show:

SA_ConnectionStatusDetector

Extends BaseComponent2D
Module: Component
Parent Module: Wanaplan

Summary

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

Constructor

SA_ConnectionStatusDetector

Syntax

SA_ConnectionStatusDetector

(
  • core
)

Summary

Parameters:

  • core Core

    The main engine.

Methods

_offline

Syntax

_offline

() private

Summary

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

_online

Syntax

_online

() private

Summary

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

_onOfflineHandler

Syntax

_onOfflineHandler

() private

Summary

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

_onOnlineHandler

Syntax

_onOnlineHandler

() private

Summary

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

checkOnline

Syntax

checkOnline

()

Summary

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

Syntax

destroy

()

Summary

Destroy the component.

disable

Inherited from BaseComponent2D:

Syntax

disable

()

Summary

Disables the component

enable

Inherited from BaseComponent2D:

Syntax

enable

()

Summary

Enables the component

getTargeted

Inherited from BaseComponent2D:

Syntax

getTargeted

(
  • vector
)
Object

Summary

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

Syntax

initialize

()

Summary

Initialize the component.

onContextChanged

Inherited from BaseComponent2D:

Syntax

onContextChanged

(
  • context
)

Summary

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

Parameters:

  • context String

    The new context

startListening

Inherited from BaseComponent2D:

Syntax

startListening

()

Summary

Calls all the event listeners.

stopListening

Inherited from BaseComponent2D:

Syntax

stopListening

()

Summary

Removes all the event listeners.

update

Inherited from BaseComponent2D

Syntax

update

()

Summary

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

Properties

name

Inherited from BaseComponent2D:

Syntax

name

String

Summary

Component name

priority

Inherited from BaseComponent2D:

Syntax

priority

Number

Summary

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

structure

Inherited from BaseComponent2D:

Syntax

structure

wnp.Structure

Summary

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