Skip to main content

TransitionModel

This model deduplicates and handles transitions for showing, hiding, and toggling. Inherits from BasicPane. See for more API.

Functions

new

TransitionModel.new() → TransitionModel

A transition model that takes a set amount of time to show and hide. Can be used just like a BasicPane (in fact, it inherits from it), but additionally allows for variable length show and hide calls.

isTransitionModel

TransitionModel.isTransitionModel(valueany) → boolean

Returnes true if it's a transition model

PromiseShow

TransitionModel:PromiseShow(doNotAnimateboolean) → Promise

Shows the model and promises when the showing is complete.

PromiseHide

TransitionModel:PromiseHide(doNotAnimateboolean) → Promise

Hides the model and promises when the showing is complete.

PromiseToggle

TransitionModel:PromiseToggle(doNotAnimateboolean) → Promise

Toggles the model and promises when the transition is complete.

IsShowingComplete

TransitionModel:IsShowingComplete() → boolean

Returns true if showing is complete

IsHidingComplete

TransitionModel:IsHidingComplete() → boolean

Returns true if hiding is complete

ObserveIsShowingComplete

TransitionModel:ObserveIsShowingComplete() → Observable<boolean>

Observe is showing is complete

ObserveIsHidingComplete

TransitionModel:ObserveIsHidingComplete() → Observable<boolean>

Observe is hiding is complete

BindToPaneVisbility

TransitionModel:BindToPaneVisbility(paneBasicPane) → function--

Cleanup function

Binds the transition model to the actual visiblity of the pane

SetPromiseShow

TransitionModel:SetPromiseShow(
showCallbackfunction?--

Callback which should return a promise

) → ()

Sets the callback which will handle showing the transition

SetPromiseHide

TransitionModel:SetPromiseHide(
hideCallbackfunction?--

Callback which should return a promise

) → ()

Sets the callback which will handle hiding the transition

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "A transition model that takes a set amount of time to show\nand hide. Can be used just like a [BasicPane] (in fact, it\ninherits from it), but additionally allows for variable length\nshow and hide calls.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "TransitionModel"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 28,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "isTransitionModel",
            "desc": "Returnes true if it's a transition model",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 54,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "PromiseShow",
            "desc": "Shows the model and promises when the showing is complete.",
            "params": [
                {
                    "name": "doNotAnimate",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 64,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "PromiseHide",
            "desc": "Hides the model and promises when the showing is complete.",
            "params": [
                {
                    "name": "doNotAnimate",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 78,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "PromiseToggle",
            "desc": "Toggles the model and promises when the transition is complete.",
            "params": [
                {
                    "name": "doNotAnimate",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 92,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "IsShowingComplete",
            "desc": "Returns true if showing is complete",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 104,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "IsHidingComplete",
            "desc": "Returns true if hiding is complete",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 112,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "ObserveIsShowingComplete",
            "desc": "Observe is showing is complete",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 120,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "ObserveIsHidingComplete",
            "desc": "Observe is hiding is complete",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 128,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "BindToPaneVisbility",
            "desc": "Binds the transition model to the actual visiblity of the pane",
            "params": [
                {
                    "name": "pane",
                    "desc": "",
                    "lua_type": "BasicPane"
                }
            ],
            "returns": [
                {
                    "desc": "Cleanup function",
                    "lua_type": "function"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 138,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "SetPromiseShow",
            "desc": "Sets the callback which will handle showing the transition",
            "params": [
                {
                    "name": "showCallback",
                    "desc": "Callback which should return a promise",
                    "lua_type": "function?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 164,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        },
        {
            "name": "SetPromiseHide",
            "desc": "Sets the callback which will handle hiding the transition",
            "params": [
                {
                    "name": "hideCallback",
                    "desc": "Callback which should return a promise",
                    "lua_type": "function?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 175,
                "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "TransitionModel",
    "desc": "This model deduplicates and handles transitions for showing, hiding, and\ntoggling. Inherits from [BasicPane]. See for more API.",
    "source": {
        "line": 7,
        "path": "src/transitionmodel/src/Shared/TransitionModel.lua"
    }
}