Skip to content

Potential optimization document listeners #2002

@g-rodigy

Description

@g-rodigy

Describe the bug
Not a bug.
Scene use Input class (src/viewer/scene/input/Input.js) to add listeners like click, mousedown, etc. Plugins such NavCubePlugin, SectionPlanePlugin and other creates own Scenes with added listeners again that never use them.
As a result, several identical listeners are created that are never used.
For example NavCubePlugin has only one place where used scene.input

this._navCubeScene.input.keyboardEnabled = false; // Don't want keyboard input in the NavCube

When need global scene events can use something like viewer.scene.input

To Reproduce
Create Viewer with plugins NavCubePlugin or other plugins that use their own scene.

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