Skip to content

onUpdate - reset the zoom in Nextjs (React) #328

Open
@tannath

Description

@tannath

When use onUpdate the big problem with read any X and Y of selection.
After selection using useState - setTempXandY reset the zoom in, state.
How to solve the the reseting the zoom in, after XXXX seconds?

onUpdate={(EvEnT) => tempUpDaTe(EvEnT)}

const tempUpDaTe= (EvEnT: any) => {
    clearTimeout(timeoutId);
    timeoutId = setTimeout(() => {
        setTempXandY(prevState => ({
            ...prevState,
            x: e.layout.xaxis.range[0],
            y: e.layout.yaxis.range[0]
        }));
    }, 5500);
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions