|
@@ -36,7 +36,6 @@ public class Model extends Observable
|
|
// resize curthingy to it's visible length
|
|
// resize curthingy to it's visible length
|
|
ArrayList<Point> temp = (ArrayList<Point>)curThingy.getPoints().subList(0, curThingy.getVisibleLen());
|
|
ArrayList<Point> temp = (ArrayList<Point>)curThingy.getPoints().subList(0, curThingy.getVisibleLen());
|
|
curThingy.setPoints(temp);
|
|
curThingy.setPoints(temp);
|
|
- //curThingy.points.addAll(temp);
|
|
|
|
// reset total length to total visible length
|
|
// reset total length to total visible length
|
|
totalLen = totalVisibleLen;
|
|
totalLen = totalVisibleLen;
|
|
// delete extra nodes in thingies
|
|
// delete extra nodes in thingies
|
|
@@ -90,11 +89,14 @@ public class Model extends Observable
|
|
tempLen += thingies.get(i).getVisibleLen();
|
|
tempLen += thingies.get(i).getVisibleLen();
|
|
index = i;
|
|
index = i;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// off by one adjustments if we're at the end of a thingy
|
|
// off by one adjustments if we're at the end of a thingy
|
|
- if (curThingy.getVisibleLen() == 0 && tempLen > x) curThingy = thingies.get(index - 1);
|
|
|
|
- if (curThingy.getVisibleLen() == curThingy.getPoints().size() && tempLen < x) curThingy = thingies.get(index + 1);
|
|
|
|
|
|
+ //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);
|
|
|
|
|
|
|
|
+ System.out.println("index is: " + index);
|
|
|
|
+ System.out.println("curthing is: " + thingies.indexOf(curThingy));
|
|
|
|
+ curThingy = thingies.get(index);
|
|
// now modify tempThingy
|
|
// now modify tempThingy
|
|
// if we want to go back in time
|
|
// if we want to go back in time
|
|
if (tempLen > x)
|
|
if (tempLen > x)
|