Overlays - globules-io/OGX.JS GitHub Wiki

Stack

From any Uxi, or object that extends the Overlay class

Adding

const conf = {
    anim: _ANIMATION_, //optional
    display: _DISPLAY_OBJ_, //optional
    close_on_click: true|function|false //optional
};

this.addOverlay(conf);

Display

Add a custom display

 const conf = {       
    display: {css: 'my_css', html:'<span>some text</span>'},
    close_on_click: false
};

this.addOverlay(conf);   

Removing

 this.removeOverlay(_ANIMATION_, _CALL_BACK_);

Removing a popup without passing an animation will use the animation used when the popup was created. Passing an animation overrides it.

⚠️ **GitHub.com Fallback** ⚠️