WDL resizing

Apologies if I’ve missed this in the documentation somewhere, but do I need to retain the original aspect ratio when resizing the WDL canvas?

To explain: the reference size seems to be 550x400 giving an aspect ratio of 1.375:1 and a landscape orientation. I know the WDL canvas can be resized and I was trying to reshape the canvas into more of a portrait format but getting some odd results with instrument layouts. Maybe it can only be sensibly resized if the same orientation and aspect ratio as the reference size is retained. Would this be right? Or is it possible to change to eg portrait format?

Julian can confirm this, but I don’t think you can re-size the underlying area used by WDL. You can scale it, but the 550*400 grid is built into the WDL source code and it can’t be changed through configuration. At least that’s what I understood him to say when I asked a similar question!

That is indeed correct. You can change the aspect ratio but this will of course distort the screen.

Julian

Why can you not set up a frame (iframe, table) put the code in the table, do away with the actual frame outline and re-orient the instruments with the x,y coordinates? I spent a couple of days doing that and learned way more about WDL than I really wanted to. :signlol: 'Tis true it still doesn’t work with FF but Oh Well.

Nicely done too Lulu :smiley:

That is indeed a viable workaround but if the iframe is smaller than WDL there is a risk the viewer can move WDL around by clicking and dragging their mouse within the iframe.

Julian

I did have the code in a table cell, but I guess you’re implying that’s not enough and you explicitly need to use an iframe? Certainly changing the X,Y coordinates of the instruments wasn’t giving predictable results. What do you do about the widthOfWdl and heightOfWdl values?

A separate, but potentially related question: Is it possible to have more than one instance of a WDL object on one web page (each reading different config files)?

WOW! Thanks!

No-o-o-o-o-o there’s no implication of anything. Simply telling a fellow user my solution. I used a table. Manipulating the x,y coordinates takes a ginarmous amount of patience and perserverence/trial and error (lots of errors). WDL is a really neat concept and now I’m not as afraid of screwing something up as I was before I relocated the instruments and gauges, which for me is a good thing.

Yes, you can have as many as you like - or as many as your browser can cope with :wink:

Julian

Sorry I’m sure I’m being thick here, I understand about changing the X,Y coordinates, but what I’m not clear about is removing the fixed aspect ratio. Julian et al, if I’ve understood correctly, are saying that it can’t be done (with predictable results at least), which was certainly my experience. But I believe that you’re suggesting otherwise in the context of eg a table cell, perhaps by not defining the widthOfWdl and heightOfWdl values, which is the only way round it I can think of. Is this the answer or is there something else I’ve overlooked?

That last point about FF is precisely why I will only use layouts which work in all browsers, and not stick to stuff which works in IE but looks bad in anything else. I know from my stats that about 20% of my visitors dont use the latest versions of IE so I will alienate that 20% by doing stuff which only works well in IE or uses IE specific tags etc. Lulu you page does indeed not work in FF - it is pretty unreadable, and I will not use IE just to read a page which does not work in my browser, I just move on.

Stuart

I’m not aware of a reliable cross browser way of doing this.

Julian

That’s cool…no problem.