Skip to content

Storing the current position of the Viewport #1446

Answered by tortmayr
jmenzies12 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jmenzies12,

to achieve this you need to fetch the current viewport data from the model before sending the RequestModelAction and restore it afterwards.
Assuming you are dispatching the RequestModelAction on the client side you could implement a custom action handler.
Here is an (untested) draft of how this could look like:

export interface ReloadModelAction extends Action {
    kind: typeof ReloadModelAction.KIND;
    options?: Args;
}

export namespace ReloadModelAction {
    export const KIND = 'reloadModel';

    export function is(action: Action): action is ReloadModelAction {
        return Action.hasKind(action, KIND);
    }

    export function create(options?: Args): ReloadMod…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jmenzies12
Comment options

@jmenzies12
Comment options

Answer selected by jmenzies12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants