mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[shared] Add forceChangeY parameter to normalize()
Change-Id: Iff5417cd765f3fd09825b81cb41f883530b39233
This commit is contained in:
committed by
LeaNumworks
parent
bd302bb67b
commit
6e9195fafa
@@ -15,8 +15,8 @@ CurveViewRange::CurveViewRange(InteractiveCurveViewRangeDelegate * delegate) :
|
||||
MemoizedCurveViewRange::protectedSetXMin(-k_displayLeftMarginRatio * xMax(), k_lowerMaxFloat, k_upperMaxFloat);
|
||||
}
|
||||
|
||||
void CurveViewRange::normalize() {
|
||||
Shared::InteractiveCurveViewRange::normalize();
|
||||
void CurveViewRange::normalize(bool forceChangeY) {
|
||||
Shared::InteractiveCurveViewRange::normalize(forceChangeY);
|
||||
|
||||
/* The X axis is not supposed to go into the negatives, save for a small
|
||||
* margin. However, after normalizing, it could be the case. We thus shift
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Sequence {
|
||||
class CurveViewRange : public Shared::InteractiveCurveViewRange {
|
||||
public:
|
||||
CurveViewRange(Shared::InteractiveCurveViewRangeDelegate * delegate = nullptr);
|
||||
void normalize() override;
|
||||
void normalize(bool forceChangeY = false) override;
|
||||
private:
|
||||
constexpr static float k_displayLeftMarginRatio = 0.1f;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user