Changeset 12477 in josm for trunk/src/org/openstreetmap


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

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

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement
Files:
3 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    }
Note: See TracChangeset for help on using the changeset viewer.