On 08/02/2012 15:03, Chris Price wrote:
Another alternative which fixes the root cause of the issue, is to call -

canvas.getCanvasElement().getStyle().setDisplay(Display.BLOCK);

The problem is that the canvas display mode is inline, which causes
strange alignment issues like these (strange that is, unless you want
it to behave as inline element). You can see this in action by adding
a display:block to the canvas element using your browser's dev tools
at http://gwtcanvasdemo.appspot.com/.

Interesting information.
Indeed, I tend to see canvas as a big bloc element, but it behaves like an image, and can be used as small component in the middle of some text, like sparklines, so it makes sense.

Thanks.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to