Ignore:
Timestamp:
2011-02-13T20:26:58+01:00 (13 years ago)
Author:
bastiK
Message:

mapcss: small fix

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r3888 r3899  
    4747                RelativeFloat width_rel = c.get(key, null, RelativeFloat.class, true);
    4848                if (width_rel != null)
    49                     return relativeTo + 2*width_rel.val;
     49                    return relativeTo + width_rel.val;
    5050            }
    5151        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java

    r3888 r3899  
    66import java.awt.Color;
    77import java.awt.Font;
     8import org.openstreetmap.josm.data.osm.OsmPrimitive;
     9import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
    810
    911import org.openstreetmap.josm.tools.CheckParameterUtil;
     
    8082    }
    8183
     84    public String getString(OsmPrimitive osm, MapPainter painter) {
     85        if (textKey == null)
     86            return painter.getAreaName(osm);
     87        else
     88            return osm.get(textKey);
     89    }
     90
     91
    8292}
Note: See TracChangeset for help on using the changeset viewer.