|
@@ -93,6 +93,8 @@ class Spline extends AreaItemAbstract with AutoSnapMixin {
|
|
|
feature?.innerPoints.first = args;
|
|
|
break; // 按下立即抬起无事发生
|
|
|
case PointInfoType.touchMove:
|
|
|
+ if (isMoveTargetOutOfRange(args)) return true;
|
|
|
+
|
|
|
isFirstPointNeedOffset = true;
|
|
|
feature?.innerPoints.first = args;
|
|
|
break;
|
|
@@ -101,8 +103,13 @@ class Spline extends AreaItemAbstract with AutoSnapMixin {
|
|
|
}
|
|
|
} else if (state == ItemStates.running) {
|
|
|
if (feature == null) return false;
|
|
|
- DPoint newPoint =
|
|
|
- lastStartPoint.clone().addVector(args - splineTouchStartPoint);
|
|
|
+ PointInfo newPoint = PointInfo.fromOffset(
|
|
|
+ lastStartPoint
|
|
|
+ .clone()
|
|
|
+ .addVector(args - splineTouchStartPoint)
|
|
|
+ .toOffset(),
|
|
|
+ args.pointType);
|
|
|
+ newPoint.hostVisualArea = args.hostVisualArea;
|
|
|
final f = feature!;
|
|
|
if (args.pointType == PointInfoType.touchUp) {
|
|
|
if (!isOtherPointNeedOffset) {
|
|
@@ -120,6 +127,8 @@ class Spline extends AreaItemAbstract with AutoSnapMixin {
|
|
|
f.innerPoints.add(lastStartPoint);
|
|
|
}
|
|
|
if (args.pointType == PointInfoType.touchMove) {
|
|
|
+ if (isMoveTargetOutOfRange(newPoint)) return true;
|
|
|
+
|
|
|
isOtherPointNeedOffset = true;
|
|
|
f.innerPoints.last = newPoint;
|
|
|
}
|