weijiang8410 / cakejs

Automatically exported from code.google.com/p/cakejs
0 stars 0 forks source link

ElementNodes are always on top #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create ElementNode
2. cover it with a Rectangle

What is the expected output? What do you see instead?

Expected ElementNode to be below the rectangle, but the ElementNode is
above the rectangle.

This happens because there is no way to draw HTML elements on the canvas. 

Possible fixes: 
 * hack all the browsers to draw HTML elements on the canvas and get the
patches applied in two-three years
 * port rendering backend to SVG, use foreignObject
 * split the canvas into layers which are canvases themselves. Put the
above-layer canvas above the ElementNodes.

All of the above solutions are rather nasty, but it is a nasty issue.
Layers would be most useful for other stuff, I guess. 

Original issue reported on code.google.com by Ilmari.H...@gmail.com on 21 Mar 2008 at 8:43