|
@@ -1483,6 +1483,7 @@ namespace bs.Editor
|
|
|
|
|
|
|
|
Vector2 currentRange = Range;
|
|
Vector2 currentRange = Range;
|
|
|
Vector2 newRange = currentRange + zoomedDiff;
|
|
Vector2 newRange = currentRange + zoomedDiff;
|
|
|
|
|
+ newRange.x = Math.Max(0, newRange.x);
|
|
|
Range = newRange;
|
|
Range = newRange;
|
|
|
|
|
|
|
|
// When zooming, make sure to focus on the point provided, so adjust the offset
|
|
// When zooming, make sure to focus on the point provided, so adjust the offset
|
|
@@ -1490,12 +1491,6 @@ namespace bs.Editor
|
|
|
rangeScale.x /= currentRange.x;
|
|
rangeScale.x /= currentRange.x;
|
|
|
rangeScale.y /= currentRange.y;
|
|
rangeScale.y /= currentRange.y;
|
|
|
|
|
|
|
|
- Vector2 relativeCurvePos = curvePos - Offset;
|
|
|
|
|
- Vector2 newCurvePos = relativeCurvePos * rangeScale;
|
|
|
|
|
- Vector2 diff = newCurvePos - relativeCurvePos;
|
|
|
|
|
-
|
|
|
|
|
- Offset -= diff;
|
|
|
|
|
-
|
|
|
|
|
UpdateScrollBarSize();
|
|
UpdateScrollBarSize();
|
|
|
UpdateScrollBarPosition();
|
|
UpdateScrollBarPosition();
|
|
|
}
|
|
}
|