-
Notifications
You must be signed in to change notification settings - Fork 4
Overlays
Eric edited this page Apr 26, 2022
·
18 revisions
From any
Uxi
, or object that extends theOverlay
class
this.addOverlay(
_CLOSE_ON_CLICK_, //Bool or Function, if the overlay hides itself on click/tap
_ANIMATION_, //The animation to use to show/hide the overlay,
_DELAY_, //The timeout/delay defore the animation starts
);
Example - Adding an overlay with a fade and expecting it to disappears if the user taps on it
this.addOverlay(true, OGX.App.OVERLAY_FADE);
Example - Adding an overlay with no animation and ignore if the user taps on it
this.addOverlay(false, false);
Special note on the delay parameter: if you animate other elements on top of a fading overlay (such as a popup, a menu), depending on the platform (Android or iOS), you might need to adjust the delay so the animation starts a bit after another animation. iOS is very sensitive to this. The value defaults to 350 (ms).
this.removeOverlay(_ANIMATION_);
Removing a popup without passing an animation will use the animation used when the popup was created. Passing an animation overrides it.
- Welcome
- Changelog
- Structure
- Configuration
- Getting started
- CLI
- Poly
- Core
- Templating
- Routing
- Controllers
- Components
- Extra Components
- Helpers
- Styling
- Debugging