Select to view content in your preferred language

3.1 ResultAttributes extra newline

1926
2
03-08-2013 02:45 PM
KennyHoran
Regular Contributor
I've been playing with the SearchWidget and noticed that when the InfoWindow scrolls there's extra whitespace at the bottom. I've tracked it down to an extra newline in supportClasses.ResultAttributes

The newline can be removed by truncating "content" after it's built, or by prepending the newline instead.

Truncate example:
// Line 76
if (content.length > 0 && content.charAt(content.length - 1) == "\n")
  content = content.substr(0, -1);
resultAttributes.content = content;


Prepend example:
// Line 154 - 161
if (textDirection && textDirection == "rtl")
{
  content += (content.length > 0 ? "\n" : "") + value + " :" + fieldLabel + "\n";
}
else
{
  content += (content.length > 0 ? "\n" : "") + fieldLabel + ": " + value + "\n";
}


Hope this is handy.
Tags (2)
0 Kudos
2 Replies
BjornSvensson
Esri Regular Contributor
Thanks for the suggestion.  Getting rid of that extra ending newline is a good idea.  We will do something similar to what you suggested. You can keep track of the progress at https://github.com/Esri/arcgis-viewer-flex/issues/84
0 Kudos
BjornSvensson
Esri Regular Contributor
Just wanted to follow up and let you know that this has been fixed and will be part of the 3.2  release (see GitHub Issue #84).

FYI - you can see the exact code change of our "commit" on GitHub:
https://github.com/Esri/arcgis-viewer-flex/commit/11546fcf7d2d598fd44b2eece569fcf2d997c0a0

FYI: if you want to see what other viewer code changes made it into 3.2, look at the 58 closed and verified issues for 3.2:
https://github.com/Esri/arcgis-viewer-flex/issues?labels=verified&milestone=1&state=closed
0 Kudos