Tuesday, April 30, 2013

Re: How to dynamically fullsize a Canvas to a Dock-center?

Have the parent elements been added to the DOM yet? Until they have been, they have not size. Get everything else into the DOM first, then add the Canvas. If it's there already, use a Scheduler to resize it.

On Sunday, April 28, 2013 10:13:32 AM UTC-4, membersound wrote:
Hi,

I have a canvas within the following layout:
DockLayoutPanel
 center
  ResizeLayoutPanel
   AbsolutePanel
    Canvas


How can I set the coordinateSpace height/width always according to the actual size? How can I get the center size of the dock when creating the canvas?

I thought I could just walk up the parent tree from the canvas and get the clientwidth, but it is always = 0
canvas.getElement().getParentElement().getParentElement().getParentElement().getClientWidth()

What is wrong here?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment