Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use external canvas for NavCube #68

Closed
xeolabs opened this issue May 17, 2019 · 1 comment
Closed

Use external canvas for NavCube #68

xeolabs opened this issue May 17, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@xeolabs
Copy link
Member

xeolabs commented May 17, 2019

Encapsulating management of HTML within JS is an anti-pattern - better to manage HTML externally to the likes of NavCubePlugin etc.

Change NavCube to accept ID of canvas, ie:

new NavCubePlugin(viewer, {
        canvasId: "myNavCubeCanvas",
        visible: true,           // Initially visible (default)
        size: 250,               // NavCube size in pixels (default is 200)
        alignment: "topRight",   // Align NavCube to top-left of Viewer canvas
        topMargin: 170,          // 170 pixels margin from top of Viewer canvas
        cameraFly: true,       // Fly camera to each selected axis/diagonal
        cameraFitFOV: 45,        // How much field-of-view the scene takes once camera has fitted it to view
        cameraFlyDuration: 0.5 // How long (in seconds) camera takes to fly to each new axis/diagonal
    });
xeolabs added a commit that referenced this issue May 17, 2019
@xeolabs xeolabs self-assigned this May 17, 2019
@xeolabs xeolabs added the enhancement New feature or request label May 17, 2019
@xeolabs
Copy link
Member Author

xeolabs commented May 17, 2019

Now in master

@xeolabs xeolabs closed this as completed May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant