wade and iframe
krumza

good day to all.

in General I'm trying to finish my program for drawing layouts of suspended ceilings.

the peculiarity is that in the one essence of the drawing can be multiple entities, so you must create tabs.

the first thing I did in Wade chrome-like tabs as objects Wade but most of my recent changes related to the fact that

I did the whole user interface was moved to the html and the canvas put in iframe. maybe the same that you have in the editor

The problem with tabs, I decided to try to do so is to create a tab on html to insert iframe. But alas - not working. you can put only 1 iframe Call the second from flooding console message type:


/wade.js:426 *** __wade_unnamed_sceneObject_1.Sprite0 has an invalid size: NaN, 66
Wade.warn @ /wade.js:426
Layer.draw @ /wade.js:96
Renderer.draw @ /wade.js:190
SceneManager.draw @ /wade.js:214
Wade.event_mainLoop @ /wade.js:457
(anonymous) @ /wade.js:457
/wade.js:426 *** __wade_unnamed_sceneObject_4.Sprite0 has an invalid position: NaN, -525
Wade.warn @ /wade.js:426
Layer.draw @ /wade.js:96
Renderer.draw @ /wade.js:190
SceneManager.draw @ /wade.js:214
Wade.event_mainLoop @ /wade.js:457
(anonymous) @ /wade.js:457
/wade.js:426 *** __wade_unnamed_sceneObject_2.Sprite0 has an invalid size: NaN, 6
Wade.warn @ /wade.js:426
Layer.draw @ /wade.js:96
Renderer.draw @ /wade.js:190
SceneManager.draw @ /wade.js:214
Wade.event_mainLoop @ /wade.js:457
(anonymous) @ /wade.js:457
/wade.js:426 *** __wade_unnamed_sceneObject_13.Sprite0 has an invalid size: NaN, 6

Why not put on the page more than 1 iframe with the same app?

All 2 Comments
Gio

Hi

There is nothing wrong with putting more than 1 iframe with wade apps on the same page. As a matter of fact, we do this in the editor too - the main scene editor is a wade iframe, when you select a sprite you see a sprite preview on the top-right of the screen: that's another wade iframe. When you edit an isometric tile, the tile preview is (again) another wade iframe. Your game preview is another wade iframe.

So in principle, this is fine.

It seems that you have a problem with the size and position of some of your objects there. I have not seen your code so I can only guess, but it seems to me that perhaps you are setting some sizes and positions based on the screen width, and your current method of showing tabs involves resizing these iframes (setting width to 0 to hide it) - this is what jQuery usually does with its hide() and show() animations.

Instead, to hide an iframe, do not change its size, set its style display property to none.

krumza

thank you

it really because new tab has 0 height size an i use for iframe wrapper css heght:0 and padding-bottom for responsive

change order fix problem - first ned create new tab, then show it tab, than insert frame

 

Post a reply
Add Attachment
Submit Reply
Login to Reply