Class: AntetypeWeb

AntetypeWeb()

main object for the viewer. Used in Live Preview/Antetype WebView and the exported Viewer. AntetypeWebViewer is used in the exported web viewer .

Constructor

new AntetypeWeb()

Source:

Members

asyncCommandExecuting

true if async-commands are in the queue.
Source:

asyncCommandExecuting

starts or ends async command-processing. If true commands executed with runCommand are stored in a queue and executed after calling asyncCommandExecuting = false.
Source:

currentScreen

the current visible Screen GDScreen
Source:

project

the project of this prototype. GDProject
Source:

runsInAntetype

if the prototype is running inside Antetype (true) or in the browser (false)
Source:

Methods

addEventListener(type, callback)

EventTarget-API. callback wird aufgerufen, wenn das event aufgetreten ist. Derzeit definiert sind: `loadscreen` (wird aufgerufen, wenn ein neuer Screen geladen ist) und `unloadscreen` (wird aufgerufen, wenn der alte screen noch aktiv ist, aber gleich ein neuer geladen wird).
Parameters:
Name Type Description
type String loadscreen oder unloadscreen
callback function wird aufgerufen, wenn das Event eingetreten ist
Source:

addEventListeners()

here we add "Global" eventListeners which mainly forward to the current tool. For Interaction we have to handle some events differently (which don't bubble, up). Those are added in GDEventHandler.updateEventListeners GDEventHandler#updateEventListeners
Source:

cellSetProperty(figure, key, value)

sets the value for the given property in cell and active state This also updates the HTML/CSS.
Parameters:
Name Type Description
figure GDWidgetInstanceCell the cell
key String the property name (see documentation)
value Object the value of the property
Source:

cellSetPropertyInState(figure, key, value, state)

sets the value for the given property in cell and state. This also updates the HTML/CSS.
Parameters:
Name Type Description
figure GDWidgetInstanceCell the cell
key String the property name (see documentation)
value Object the value of the property
state GDState the state
Source:

changeStateOfCell(cell, state, cssTransition)

Change the active state of the cell.
Parameters:
Name Type Description
cell GDWidgetInstanceCell The cell
state GDState The new State
cssTransition string The transition used
Source:

cssClassNameForRootCellInState(cell, state) → {String}

Antetype uses a rather complex mapping from Widget/Cell/State to CSS class names. If you don't have the Antetype-Cell-Object (often after cloning HTML Elements) but want to change the state, you can use this method to return the proper className. In all other circumstances use changeStateOfCell which makes sure the Antetype-Objects and DOM-Objects are in sync.
Parameters:
Name Type Description
cell GDWidgetInstanceRootCell the cell to use
state GDState
Source:
Returns:
the class name
Type
String

executeFinalWidgetLayoutPass()

Normally our CSS-generation is divided into widget- and instance-css. But unfortunately sometimes we need to know the container to generate the right css. For root-instance-cells the container is not known on creation, only when the instance is inserted in the screen. (or a state change). FIXME: * currently this method is called on numerous places after changing the hierarchy, can we make it automatic? * Calling the styling-stuff here directly looks wrong, either make it explicit in the css-generation ... * tests are missing
Source:

gotoNextScreen()

go to the next screen in the protoype. (jumps to the first if, the current screen is the last screen) Currently only usable in the exported WebViewer
Source:

gotoPreviousScreen()

go to the previous screen in the protoype. (jumps to the last one, if the current screen is the first screen) Currently only usable in the exported WebViewer
Source:

gotoScreen(s)

Displays the given Screen 's'.
Parameters:
Name Type Description
s GDScreen
Source:

gotoScreenWithIndex()

display the screen with the given index.
Source:

gotoScreenWithTransition(screen, transition, duration)

like gotoScreen, but using a transition.
Parameters:
Name Type Description
screen GDScreen
transition int
duration float (in seconds)
Source:

removeEventListener(type, callback)

löscht den callback für das event "type"
Parameters:
Name Type Description
type String type of event
callback function callback für das Event
Source:

runCommand()

runs a command send from Antetype. Commands are registered using registerCommand
Source: