AoN
Internet Programmer
- Aug 1, 2012
- 114
So, as yall know, I try not to make posts for help, especially since I'm supposed to be the Internet programmer, but some things just take up too much time more me (want) to solve. I created a StackOverflow (I swore I'd never use it, but I did) and never got a response. Updated a week in, now nearly two, and still nothing. Posted up on TSF, though I don't honestly expect any help there for this sort of issue. As such, to save myself some time, I basically just copied and pasted the post from TSF.
Let me know if yall have any ideas. I don't have a clue on how else I could go about rewriting the function, and this is the closest to 100% functional as I've gotten, so it's probably the most broken. ^^'
DDAoN said:Basic idea of what I'm trying to do: Place GoogleDocs Viewer (GDV) inside Bootstrap modal, hiding the controlbar from the GDV, while centering the modal on the page without losing the inherent responsiveness expected from Bootstrap.
I've got everything working, just not 100% together. Centering the modal was easy. Doing the <IFRAME> while hiding the controlbar was easy. Making it responsive, took me about 10 days of rewrite after rewrite to make it work, is good. Putting it all together, not so much. The problem is with applying the responsive sizing when the screen is sized that the width dictates the sizes of everything else.
Rather than fill this post with the code, I just created a JSFiddle of the code in action: Edit fiddle - JSFiddle
I know the problem is showhow caused by the lineSo long as I specify a fixed value, it gives no problems, but it should be calculated the same way as the modalMarginLeft value is when the sizing is controlled vertically, except for the y-axis instead of the x.Code:modalMarginTop = (windowY - modalY) / 2;
If you remove the last two lines of the function, which set the margins, you can see that the responsiveness works perfectly. Put the margin-left back in and it still works great. It's just the margin-top during height is determined by the width.
Let me know if yall have any ideas. I don't have a clue on how else I could go about rewriting the function, and this is the closest to 100% functional as I've gotten, so it's probably the most broken. ^^'