1

Do you have an idea how to create a multiline label with draw2d's draw2d.shape.basic.Label

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100

2 Answers2

1

This library is using the HTML5 Canvas API. In order to draw text it is using the fillText() method which does not have multi-line support out of the box. In order to achieve such the text needs to be broken down into multiple labels, which I don't think this library has support for.

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100
  • is it using Canvas API? From what I know, it uses SVG/VML, since it is based on Raphael. And, as @alexander-stefanov says, it can be done programatically, I've actually tried that - it inserts two `` elements in the `` – zaboco Feb 27 '14 at 15:49
  • What do you mean by "it can be done programatically". Can you please post an example? How can I "break it down into multiple labels"? – user3142695 Jul 11 '14 at 21:31
1

Actually, you can make a multiline label (at least visually) by setting label's text programatically with '\n' in it. Like label.setText('Some \n text'). But you can't do it 'manually', since you're typing in an <input type="text">