Changeset 12477 in josm


Ignore:
Timestamp:
2017-07-13T23:15:13+02:00 (13 days ago)
Author:
michael2402
Message:

See #15006: Fix sign issue (wrong direction) for text-offset-y on ways/areas

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java

    r12476 r12477  
    111111            return this;
    112112        } else {
    113             return new CompletelyInsideAreaStrategy(offsetX + addToOffset.getX(), offsetY + addToOffset.getY());
     113            return new CompletelyInsideAreaStrategy(offsetX + addToOffset.getX(), offsetY - addToOffset.getY());
    114114        }
    115115    }
     
    145145        CompletelyInsideAreaStrategy other = (CompletelyInsideAreaStrategy) obj;
    146146        return Double.doubleToLongBits(offsetX) == Double.doubleToLongBits(other.offsetX)
    147                 && Double.doubleToLongBits(offsetY) != Double.doubleToLongBits(other.offsetY);
     147                && Double.doubleToLongBits(offsetY) == Double.doubleToLongBits(other.offsetY);
    148148    }
    149149}
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java

    r12476 r12477  
    339339            return this;
    340340        } else {
    341             return new OnLineStrategy(addToOffset.getY() + this.yOffset);
     341            return new OnLineStrategy(this.yOffset - addToOffset.getY());
    342342        }
    343343    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/PartiallyInsideAreaStrategy.java

    r12476 r12477  
    5252            return this;
    5353        } else {
    54             return new PartiallyInsideAreaStrategy(offsetX + addToOffset.getX(), offsetY + addToOffset.getY());
     54            return new PartiallyInsideAreaStrategy(offsetX + addToOffset.getX(), offsetY - addToOffset.getY());
    5555        }
    5656    }
  • trunk/test/data/renderer/area-text/style.mapcss

    r11808 r12477  
    1313}
    1414
     15area[test=C] {
     16        text-offset-x: 5;
     17        text-offset-y: -10.5;
     18}
     19
     20area[test=D] {
     21        text-offset: list(10.2, 20.5);
     22}
     23
    1524area[test=H] {
    1625        text: eval("");
Note: See TracChangeset for help on using the changeset viewer.