-
Notifications
You must be signed in to change notification settings - Fork 4
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
Viewport does not work if div id is not "viewport" #2
Comments
Thanks (and fixed)! To be honest I have not tested the alternative NGL viewport name option since early development, so there may be other oddities. One I can see is The major issues however may be with the case of multiple viewports, as This mess is fixable, but would change the public methods and may break a few of the monitored pages that have wackier code (e.g. P450), so I would not be able to do this for a while. |
I was trying to put two viewports on the same page so I had different ids for them, but currently I'm thinking of changing my design so things may get a bit easier. Thanks for the heads up! |
Okay. I have just done some major code tweaks as I needed to implement multicolored residue selections. I changed
The script is okay with a second I have not received automated notifications that pages are behaving differently, but I am sure there will be some drama, so I might need to tweak it further... |
Thanks a lot! I just implemented a page with two viewports and your modification worked well at least in my case. I only had one structure for each viewport so there wasn't the problem of tracking which structures were displayed in which viewport. |
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 differentid
tomultiLoader
. 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", changingNGL.stageIds[myData.id] = new NGL.Stage('viewport', {backgroundColor: myData.backgroundColor});
toNGL.stageIds[myData.id] = new NGL.Stage(myData.id, {backgroundColor: myData.backgroundColor});
seems to solve this issue.The text was updated successfully, but these errors were encountered: