JSignage:Popup

From SpinetiX Support Wiki

Jump to: navigation, search

Description

The popup function attracts the user's immediate attention, e.g. when a confirmation is required, by dimming the entire viewing area and showing the a layer floating on top at the center position. When the popup layer ends, the floating layer disappears and the document is dimmed back in.

The popup is part of the interactive layer type and part of the interactivity framework.

A new popup is constructed with $.popup( layer, [params] )

  • layer
    a jSignage object to be displayed on top of the viewport. Its position will be centered on the viewport, only the width and height parameters are used for geometry, the other ones are ignored.

Popup parameters

All layers share a common set of attributes to define their screen layout and active time interval.

  • dimming
    the amount of dimming applied to viewport. Default: '50%'.
  • popupDur
    the dimming duration when the popup appears. Default: 0s.
  • popoutDur
    the dimming duration when the popup disappears. Default: 0s.

Specific functions

The popup does not have any specific function.

See the list of functions to work with layers.

Examples

User confirmation

$(function(){
     $.pushButton({
            left: '35%', top: '40%', width: '30%', height: '20%',
            style: 'round',
         }, 'Submit' )
      .click( function() { 
            $.popup(
                $.textArea({                        
                        fontSize: '60'
                    }).text( 'Thank you, please wait...' )
                , { dur: 2, dimming: '99%' }
            );
        })
  .addTo( 'svg' );
});
This page was last modified on 10 September 2020, at 16:42.