-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add ability to nest the viewer in a specific DOM element by ID #468
Add ability to nest the viewer in a specific DOM element by ID #468
Conversation
… the DOM node/element that the viewer's BorderContainer should be added to
This seems reasonable to me. Thanks for adding commented config info to viewer.js as well. @tmcgee ? |
This definitely seems reasonable. Sorry that my overhaul of the project files caused a conflict. Fortunately that is easily resolved. I've been thinking about this PR. In addition to the hard-coded ui: {
container: 'cmv',
map: 'myMapID'
}, Perhaps Thoughts? |
I think this naturally leads to loading a layout Class as a templated widget or otherwise. Requires pretty big changes to the way Controller works, how widgets are loaded, and so on. That discussion needs to continue. As far this PR, it's a good addition with a real use case. I propose layout: {
/* options */
} |
|
It isn't as big a change when we get Mixins going for Controller. That's my next PR. ;) |
The config structure that I submitted was
The reason for this was that I wasn't sure if you may want to add other settings for the main container, ex. type, etc. Would it be good to keep that structure and move it under a new
Or is that unnecessarily complex? @tmcgee I could pull in the latest develop branch and make some of these changes on Friday if it would help. Just let me know. Thanks! |
@JoelDCarter Can you provide 1 or 2 example use cases for additional items within container/map/etc beyond the id? I could certainly support that notion but would like to hear more examples of how it might be used. Thanks for the contribution and discussion. |
The core concept is good and the added flexibility is nice. Let's have a look at the use cases. I think we can make this work at some level. As both @btfou and @tmcgee pointed out, this has other implications in our long term plan but also leeds us in the right direction (Different themes etc.). Thanks @JoelDCarter for the PR and discussion! |
I have add the optional In that PR, I refactored the Controller into separate mixins so the relevant line is here in the new Feedback and discussion is welcome and encouraged! :) |
@JoelDCarter Thanks for this PR and discussion. There is a conflict with this PR now so I'm going to close it but the good news is that this concept made it into core. Thanks for the great idea. Keep them coming. |
This pull request adds support in the viewer's controller for specifying the DOM element that the viewer's main BorderContainer should be added to via an optional viewer.js config file setting.
This helps with custom layouts where it's undesirable to append the BorderContainer to the document body. The current behavior is maintained if new 'container.id' setting is not set.