cbopp-art / lightcase

The smart and flexible Lightbox Plugin.
https://cornel.bopp-art.com/lightcase/
Other
400 stars 106 forks source link

opening iframe or inline HTML full-browser width & height #159

Open halukkaramete opened 6 years ago

halukkaramete commented 6 years ago

Hello, is it possible for the lightcase to open an iframe OR inline in fullbrowser width and height such as width:100% & height:100%. Looks like I can define with/height in px but not in percentages, but I could be wrong.

I'm assuming that in the case of w & h @ 100%, the close/dismiss button would still live above the lighboxed content so we can close this lighbox that is taking over the entire underlying window.

Is it possible?

cbopp-art commented 6 years ago

Theoretically, it should be possible using width: '100%', height: '100%' for the video or iframe but i'm not absolutely sure if it will work. You have to try.

video: {
  width: '100%',
  height: '100%'
},
iframe: {
  width: '100%',
  height: '100%'
} 

But anyway, why do you need this? Wouldn't it be better to define the exact dimensions of the video that will open (e.g. full hd)? Then, lightcase will shrink the video to always fit the browser window and keep the exact ratio. Yes, the position of the close button is not depending on the content frame size.

halukkaramete commented 6 years ago

Thank you for your reply... I will get back to you once I try/play with the suggestions.

I would like to use the lightcase, at times, outside the typical lightbox UI, like a fullpane overlay, such as the SEARCH UI's you see in some sites ( Ex: Comedy central's search UI @ http://www.cc.com/ ) As you see, that effect is not lightbox cause the new content takes over the entire screen. but, lightbox can adapt to it with the modifications I'm trying to finalize thru this thread.

That's the reason why I wanted to define the display area of the canvas of the lightbox be from edge to edge, ( especially in an iframe case ), giving 0 dimmable area for the underlying window. And since I cannot guess the screen size, I could not put exact numbers.

However, you've said something interesting...

Then, lightcase will shrink the video to always fit the browser window and keep the exact ratio.

Well, Then I can arbitrarily give a humangous 1600px by 900px or 3200px bt 1800px and let lightcase do the shrinking. Chances are it will be full screen! So I will try that too... But I'm not sure if that would for iframes...

As to the close button. No, I was not asking whether it will be in the same place.

All my worry was whether it would survive to stay on top of an fullsize iframe that is brought by the lightbox. When an iframe becomes fullscreen, the dismiss/close button of the lightcase must survive over it. That's my worry.