PDA

View Full Version : How to determine clientRect, size window to surround container?



stewardsencha
10 May 2012, 1:07 PM
I'm playing a video inside a window.
The window has title bars are resizeable handles and toolbars...

If I change contained element size (eg switch video from 4:30 to 16:9),

then I need to resize the window. To what?

Do I need to do the math, discover the sizes of toolbars and frames etc, add them to the clientRect to determine the actual size for window with all the gizmos?

Just checking to make sure there isn't Ext or javascript magic I don't know about.

scottmartin
15 May 2012, 8:22 AM
Are these items that you have added, or that are part of the video plugin? If you are adding them, then you will have to do the math. If it is part of the video, then I would hope you find this out from it.

Regards,
Scott.

stewardsencha
20 Jun 2012, 8:47 AM
Perhaps I didn't make the question clear. You are apparently quite wrong Mr Martin.

It's disturbing when a member of the sencha support team gives misleading advice.

What I am asking about is called "shrink wrapping".

There is a reference to it here:

http://www.sencha.com/blog/ext-js-4-1-performance

But one of the take-home lessons of that article is just how much thought and research must go into these things. So I know I have a long way to go before I know how to "shrink wrap" intelligently.

I'm still unsure how to effect what I need, but at least I now know the framework does it, despite what the support rep says here ;)

scottmartin
20 Jun 2012, 8:55 AM
What I was asking for was more information about what you were trying to achieve. Granted I do not have much experience in video aspects, but your comment is a bit out of bounds.

With this in mind, you have a nice day.

Scott.

stewardsencha
22 Jun 2012, 7:46 AM
If you are adding them, then you will have to do the math.

I see. Sorry but that did not strike me as a request for more information.

Shrink wrapping is new in 4.1 and there are some bug fixes in 4.2 (June 9). Nothing in the docs yet. You can't know everything.

I'm often slightly wrong, quite wrong and dead stupid wrong. If that's a boundary we should move it ;)

Let's hope it gets some documentation this year. Otherwise it will wait until I am smart enough to absorb the code. That could be a real long time.