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

bootstrap 5 - layout problem #74

Open
hegelab opened this issue Jan 14, 2022 · 4 comments
Open

bootstrap 5 - layout problem #74

hegelab opened this issue Jan 14, 2022 · 4 comments

Comments

@hegelab
Copy link

hegelab commented Jan 14, 2022

Hi,

If I use bootstrap 5 then litemol plugin's div covers the full screen.

<div class="col-6">somthing</div>
<div class="col-6"><div id="litemol"</div></div>

Do you have any solution?
Thanks, Tamas

@dsehnal
Copy link
Owner

dsehnal commented Jan 14, 2022

Hi, I am pretty sure you can tweak the CSS of the litemol element to fit inline. Also, when you create the instance of the plugin, do you set the expanded property to true or false?

@hegelab
Copy link
Author

hegelab commented Jan 14, 2022

I tried to have <span> instead of <div> and also tried to set class=d-inline - did not work

I do not see expanded property in create: https://webchemdev.ncbr.muni.cz/LiteMol/SourceDocs/interfaces/litemol.plugin.plugincontrolleroptions.html
I found layoutState : {isExpanded}
I tried all variations, including:

let plugin = LiteMol.Plugin.create({
        target: '#litemol',
        viewportBackground: '#ffffff',
        layoutState: { hideControls: true, expanded: false }
    });

@dsehnal
Copy link
Owner

dsehnal commented Jan 15, 2022

Sorry the property is called isExpanded indeed.

LiteMol.Plugin.create({
        target: '#litemol',
        viewportBackground: '#ffffff',
        layoutState: { hideControls: true, isExpanded: false }
    });

It's same usage as for example in

isExpanded: false

You can also try:

<div class="col-6" style="position: relative"><div id="litemol"></div></div>

The lack of relative position on the parent is probably what's causing your issue.

@hegelab
Copy link
Author

hegelab commented Jan 15, 2022

style="position: relative" solved this issue.
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants