ModalViewController
Extends:
This is like ModalController but better. This uses ModalTemplate
Constructor Summary
Public Constructor | ||
public |
constructor(context: HTMLElement, opts: Object, bumpAnimation: boolean) Creates controller for context |
Method Summary
Public Methods | ||
public |
bind(node: string | HTMLElement, template: ModalViewTemplate) Binds an element to trigger to show a modal. |
|
public |
Hides the current template if there is one |
|
public |
async present(template: ModalViewTemplate, opts: Object) Presents a template. |
Inherited Summary
From class ViewController | ||
public static |
Creates a view controller directly for all members of a class. |
|
public static |
of(elem: string | Element): ViewController Returns a canolical VC of an element if it exists |
Public Constructors
public constructor(context: HTMLElement, opts: Object, bumpAnimation: boolean) source
Creates controller for context
Override:
ViewController#constructorPublic Methods
public bind(node: string | HTMLElement, template: ModalViewTemplate) source
Binds an element to trigger to show a modal. If the ID does NOT exist this will not do any binding.
Params:
Name | Type | Attribute | Description |
node | string | HTMLElement | ID of node or the node itself |
|
template | ModalViewTemplate | The modal template to show |
public async hide(opts: Object, bumpAnimation: boolean) source
Hides the current template if there is one
public async present(template: ModalViewTemplate, opts: Object) source
Presents a template.
Params:
Name | Type | Attribute | Description |
template | ModalViewTemplate | The modal template |
|
opts | Object | ||
opts.bumpAnimation | boolean |
|
show a little bump when animating |
opts.alignmentClass | string |
|
class to align with |