junhanqiao / oryx-editor

Automatically exported from code.google.com/p/oryx-editor
Other
0 stars 0 forks source link

automatic word wrapping fails when entering 3 spaces #207

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a shape that has a label with multiple lines
2. edit enough text so that it should be automatically word wrapped and
enter 3 spaces at a position

What is the expected output?
should be wrapped nicely

What do you see instead?
no word wrapping at all

Original issue reported on code.google.com by NicoPete...@gmail.com on 1 Sep 2008 at 10:31

GoogleCodeExporter commented 9 years ago
one problem why word wrapping sometimes fails is that the method
getExtentOfChar(index) of tspan elements does not work reliably. it ignores 
leading
and trailing whitespaces and replaces several intermediate whitespaces with one
whitespace. therefore, it is hard not to use an invalid index. probably other 
methods
of that element have the same bug.

Original comment by NicoPete...@gmail.com on 21 Sep 2008 at 3:38

GoogleCodeExporter commented 9 years ago
the same problem occurs with getSubStringLength(startIndex, endIndex) when 
starting
the string with a whitespace and ending the string with a whitespace, as well 
as when
having more than one whitespace at the beginning or the end of the string.

Original comment by NicoPete...@gmail.com on 21 Sep 2008 at 3:54

GoogleCodeExporter commented 9 years ago
rev1176

Original comment by NicoPete...@gmail.com on 10 Oct 2008 at 7:01

GoogleCodeExporter commented 9 years ago

Original comment by NicoPete...@gmail.com on 20 Oct 2008 at 6:55

GoogleCodeExporter commented 9 years ago

Original comment by NicoPete...@gmail.com on 22 Oct 2008 at 6:32