mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Remove dead branch and mark implementation as temporary
The previous implementation was checking if the `x0` or `x2` anchors were selected to decide on which way to transfer the drawable's scale, but that check actually ends up being always true for corner anchors. To visualise, this is how the corner anchors correspond to `Anchor` flags: x0 x1 x2 | | | y0 -O---O---O- | | | y1 -O---+---O- | | | y2 -O---O---O- | | | The Os indicate where the reference anchors are on a selection box. The first conditional eliminates the middle ones, which makes sense. But after excluding them from further deliberations (marking via X): x0 x1 x2 | | | y0 -O---X---O- | | | y1 -X---+---X- | | | y2 -O---X---O- | | | The remaining anchors always have `x0` or `x2` set. So to avoid confusion, just always transfer one way for now. At some point this should be torn out in favour of an actual implementation of the desired behaviour.
This commit is contained in:
parent
0fa90a80d4
commit
25b1443c50
@ -158,10 +158,8 @@ namespace osu.Game.Skinning.Editor
|
||||
// for now aspect lock scale adjustments that occur at corners.
|
||||
if (!reference.HasFlagFast(Anchor.x1) && !reference.HasFlagFast(Anchor.y1))
|
||||
{
|
||||
if (reference.HasFlagFast(Anchor.x0) || reference.HasFlagFast(Anchor.x2))
|
||||
// TODO: temporary implementation - only dragging the corner handles across the X axis changes size.
|
||||
scale.Y = scale.X;
|
||||
else
|
||||
scale.X = scale.Y;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user