Responsive iframe containing c2 app

Chat about anything not covered in these forums, but keep it civil!

Post » Fri Feb 21, 2014 12:25 pm

Hello,

I have developed an app with HTML 5 and ECMAscript. I have wrapped my site with node-webkit.

I have games developed with construct 2 they are embedded in an Iframe I have set the Iframe properties to match those of the games.

The HTML looks something like:
<div id="iframeContainer"><div id="iframeSpacer"></div></div>

I then use createElement("iframe") assign properties and append. I need a spacer because there is a top navigation bar with CSS max-width set to 70px.

I want to resize the games on start up and resize. The app is responsive.
I can communicate between iframe and parent no problem.

I achieve resize when adjusting c2canvas CSS height. However the mouse pointer is slightly off. If I then call cr_size canvas and pass iframe width and height as args, it seems to undo resize.

Is this possible? Do I use cr_sizeCanvas? I have tried manipulating iframe, c2canvasdiv and c2canvas width and height attributes and CSS. So far no luck.

Please help, it is withhelding me from handover. The team that developed their games do have a pro licence if needed.

Thank you,
Dagan
B
3
Posts: 5
Reputation: 208

Return to Open Topic

Who is online

Users browsing this forum: No registered users and 3 guests