Skip to content

Viewport does not work if div id is not "viewport" #2

Open
@CharlesSiqiLiang

Description

When using multiLoader to load structures, it doesn't seem to work if the id of my div is not "viewport", even if I pass a different id to multiLoader. It seems that if a stage with custom id does not exist, it is not created either.

In NGL.specialOps.load, below the comment "- check if there is a stage", changing
NGL.stageIds[myData.id] = new NGL.Stage('viewport', {backgroundColor: myData.backgroundColor}); to NGL.stageIds[myData.id] = new NGL.Stage(myData.id, {backgroundColor: myData.backgroundColor}); seems to solve this issue.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions