Changeset 27139 in osm for applications
- Timestamp:
- 2011-11-24T10:35:55+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/piclayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/build.xml
r27122 r27139 22 22 --> 23 23 <project name="PicLayer" default="dist" basedir="."> 24 <property name="commit.message" value="PicLayer - toolbar buttons are hidden when layer is not active"/>24 <property name="commit.message" value="PicLayer - selection points are enlarged to 10 px"/> 25 25 <property name="plugin.main.version" value="4549"/> 26 26 <!-- -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
r27120 r27139 515 515 return null; 516 516 517 Point2D selected = null; 517 518 try { 518 519 Point2D pressed = transformPoint(point); 520 double mindist = 10; 519 521 for (Point2D p : transformer.getOriginPoints()) 520 if (p.distance(pressed) <= 4.0) // if user clicked to select some of origin point 521 return p; 522 if (p.distance(pressed) < mindist) { // if user clicked to select some of origin point 523 selected = p; 524 mindist = p.distance(pressed); 525 } 526 return selected; 522 527 } catch (NoninvertibleTransformException e) { 523 528 e.printStackTrace(); 524 529 } 525 return null;530 return selected; 526 531 } 527 532 }
Note:
See TracChangeset
for help on using the changeset viewer.