Changeset 16393 in josm for trunk/src/org
- Timestamp:
- 2020-05-10T07:58:27+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r16253 r16393 1325 1325 boolean initialMoveToNeeded = true; 1326 1326 ArrowPaintHelper drawArrowHelper = null; 1327 double minSegmentLenSq = 0; 1327 1328 if (showOrientation) { 1328 1329 drawArrowHelper = new ArrowPaintHelper(PHI, 10 + line.getLineWidth()); 1330 minSegmentLenSq = Math.pow(drawArrowHelper.getOnLineLength() * 1.3, 2); 1329 1331 } 1330 1332 while (it.hasNext()) { … … 1342 1344 /* draw arrow */ 1343 1345 if (drawArrowHelper != null) { 1344 boolean drawArrow; 1345 // always draw last arrow - no matter how short the segment is 1346 drawArrow = !it.hasNext(); 1347 if (!showHeadArrowOnly) { 1348 // draw arrows in between only if there is enough space 1349 drawArrow = drawArrow || p1.distanceToInView(p2) > drawArrowHelper.getOnLineLength() * 1.3; 1346 final boolean drawArrow; 1347 if (way.isSelected()) { 1348 // always draw last arrow - no matter how short the segment is 1349 drawArrow = !it.hasNext() || p1.distanceToInViewSq(p2) > minSegmentLenSq; 1350 } else { 1351 // not selected: only draw arrow when it fits 1352 drawArrow = (!showHeadArrowOnly || !it.hasNext()) && p1.distanceToInViewSq(p2) > minSegmentLenSq; 1350 1353 } 1351 1354 if (drawArrow) {
Note:
See TracChangeset
for help on using the changeset viewer.