|
@@ -97,8 +97,8 @@ public class Model extends Observable
|
|
|
}
|
|
|
|
|
|
System.out.println("index is: " + index);
|
|
|
- if (Math.abs(index - thingies.indexOf(curThingy)) > 1) {}
|
|
|
- else curThingy = thingies.get(index);
|
|
|
+ if (Math.abs(index - thingies.indexOf(curThingy)) > 1) index = thingies.indexOf(curThingy);
|
|
|
+ curThingy = thingies.get(index);
|
|
|
// off by one adjustments if we're at the end of a thingy
|
|
|
if (index > 0 && curThingy.getVisibleLen() == 0 && tempLen > x) curThingy = thingies.get(index - 1);
|
|
|
if (curThingy.getVisibleLen() == curThingy.getPoints().size() && tempLen < x) curThingy = thingies.get(index + 1);
|