[mapguide-users] FYI Properties Pane Rounding
RichBauer
rdbauer at gmail.com
Fri Jul 27 16:11:35 EDT 2007
FYI
I have searched the forum and have not been able to find the answer to the
question of "how to round the properties pane numbers". Therefore, I did it
myself and will post the code for everyone to enjoy.
C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles\propertyctrl.templ
under
function SetProperties(count, properties) {
change:
for(var i=0; i < properties.length; i++)
{
if(isNaN(properties[i].value) == true)
{
code += '<tr class="GridCell"><td> ' + properties[i].name +
'</td><td></td><td>' + properties[i].value + '</td></tr>';
}
to
for(var i=0; i < properties.length; i++)
{
if(isNaN(properties[i].value) == true)
{
code += '<tr class="GridCell"><td> ' + properties[i].name +
'</td><td></td><td>' + properties[i].value + '</td></tr>';
}
else
{
var propValue;
propValue = properties[i].value;
propValue = Math.round(propValue);
code += '<tr class="GridCell"><td> ' + properties[i].name +
'</td><td></td><td>' + propValue + '</td></tr>';
}
}
Hope it helps someone in the future.
Rich
P.S. I am using MGOS 1.1 and when you upgrade, you will have to modify the
file again.
--
View this message in context: http://www.nabble.com/FYI-Properties-Pane-Rounding-tf4159916s16610.html#a11835931
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list