Namespace: PR

PR

Widgets use a publisher/subscriber design pattern to communicate. Widgets are self-contained as much as possible so these communication lines are primarily between an individual widget and the core although there are cases where widgets are listening for other widgets firing events (e.g. nested widgets must listen for ELEMENT_VISIBLE events to determine their visibility levels—some widgets perform an action when they become visible).

Widgets are defined using HTML markup and each widget in this documentation includes example markup. The widgets are flexible and are defined using data parameters attached to an HTML element (usually a <div> although other elements can usually be used with no ill effects) meaning that the possible combinations that can be created is vast, hence, the example markup will show only a very small subset of what is possible with the widgets. The best way to get a feel for this is to dive into the documentation, create a few pages with example widgets and then get creative with using the widgets to create fantastic interactive user experiences.

Author:
  • AppStudio Widgets
Source:
  • core/PressrunCore.js, line 3

Classes

AnimationWidget
AudioWidget
Button
ColoringWidget
Event
FlipCard
HighlightWidget
Image360Widget
ImageEffectsWidget
ImageEnlargeWidget
PictureZoomWidget
PopUpViewer
ScrollZoneWidget
SlideShowWidget
TransformableMaster
TransformableWidget
TransformableWidget
VideoWidget
WebViewWidget

Members

<static> CoreObject

The core class that will handle tasks required across all the widgets. Maintains constants, utilitites and
repetitive jobs.

Source:
  • core/PressrunCore.js, line 382

<static> INTERACTION_EVENTSObject

Constants that will be used across the framework to add mouse and touch handlers.

Source:
  • core/PressrunCore.js, line 370

Methods

<static> highlightAll( str )

Add the highlightAll hook to PR to be called by the App when searching for a term

Parameters:
Name Type Description
str String
Source:
  • core/HighlightWidget.js, line 313

<static> log( message, level )

Logger to replace console.log().

Parameters:
Name Type Description
message
level
Source:
  • core/PressrunCore.js, line 1472

<static> unhighlightAll( )

Add the unhighlightAll hook - not currently in use

Source:
  • core/HighlightWidget.js, line 320
Top