Revision: 20558 http://sourceforge.net/p/jmol/code/20558 Author: hansonr Date: 2015-06-07 01:01:28 +0000 (Sun, 07 Jun 2015) Log Message: ----------- Jmol.___JmolVersion="14.2.14_2015.06.06"
bug fix: dragging labels not working properly Modified Paths: -------------- branches/v14_2/Jmol/src/org/jmol/shape/Labels.java Modified: branches/v14_2/Jmol/src/org/jmol/shape/Labels.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/shape/Labels.java 2015-06-07 00:54:37 UTC (rev 20557) +++ branches/v14_2/Jmol/src/org/jmol/shape/Labels.java 2015-06-07 01:01:28 UTC (rev 20558) @@ -652,9 +652,6 @@ pickedY = y; pickedOffset = (offsets == null || pickedAtom >= offsets.length ? JC.LABEL_DEFAULT_OFFSET : offsets[pickedAtom]); - - System.out.println("LABEL OFFSET=" + pickedOffset); - return true; } return false; @@ -676,12 +673,13 @@ float dmin = Float.MAX_VALUE; int imin = -1; float zmin = Float.MAX_VALUE; + float afactor = (vwr.antialiased ? 2 : 1); for (Map.Entry<Integer, float[]> entry : labelBoxes.entrySet()) { if (!atoms[entry.getKey().intValue()].isVisible(vf | Atom.ATOM_INFRAME_NOTHIDDEN)) continue; float[] boxXY = entry.getValue(); - float dx = x - boxXY[0]; - float dy = y - boxXY[1]; + float dx = (x - boxXY[0])*afactor; + float dy = (y - boxXY[1])*afactor; if (dx <= 0 || dy <= 0 || dx >= boxXY[2] || dy >= boxXY[3] || boxXY[4] > zmin) continue; zmin = boxXY[4]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits