dikalo / lienzo-core

Lienzo Structure Graphics GWT Toolkit
Apache License 2.0
51 stars 58 forks source link

JBPM-6338: [Lienzo] Text wrapping: Pluggable line splitter #187

Closed manstis closed 7 years ago

manstis commented 7 years ago

See https://issues.jboss.org/browse/JBPM-6338

manstis commented 7 years ago

@Christopher-Chianelli Hi.. could you please take a look and let me know what you think.

This takes your "bounds wrapping" change and makes it more generic (I have a need to wrap on line-breaks). IDK where tests etc should/could be added so any feedback you can give would be appreciated.

Christopher-Chianelli commented 7 years ago

@manstis Add tests here: https://github.com/ahome-it/lienzo-tests. A few good tests would be testing wrap boundaries are correct, verify your TextLineBreakWrap works for both network new lines and normal new lines and that the text get drawn correctly. See my existing Text test at https://github.com/ahome-it/lienzo-tests/blob/master/src/test/java/com/ait/lienzo/client/core/shape/wires/WiresTextTest.java to see how you should go about it (note, the test need modifying due to your changes, it needed to modified a private static final variable which has been moved to TextUtils to work).

manstis commented 7 years ago

@Christopher-Chianelli Updated (and bug fixed). Tests in https://github.com/ahome-it/lienzo-tests/pull/16

jomarko commented 7 years ago

@manstis thanks for answers