1

I would like to use CanvasView to create something similar to stagexl on top of Rikulo.

At this point I have developed scene & node hierarchy for drawing many shapes and have even create a scalable table widget built on top of canvas.

One of the tricks I've used to allow for different input is to overlay an InputElement using absolute positioning in canvas coordinate system contained in a scrollable DIV, thus getting the power of canvas rendering and reuse of the InputElement.

My question is: I see that there is an TextView and CanvasView I could use as base classes. How do I overlay a TextView on top of a scrollable canvas in the canvas coordinate system?

JLK
  • 98
  • 1
  • 7

1 Answers1

0

You can create a View instance as the parent of Canvas and TextBox (I assume you are going to use an input element). Then, both Canvas and TextBox are in the same coordinate of the parent View (they all are absolute positioned). You can apply the trick you mentioned.

new View()
  ..addChild(new Canvas()..profile.text = "width:flex;height:flex")
  ..addChild(new TextBox())
  ..addToDocument();
Tom Yeh
  • 1,987
  • 2
  • 15
  • 23