1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Comments?

This commit is contained in:
smoogipooo 2017-05-16 19:33:56 +09:00
parent bc629d193d
commit 0eba553138

View File

@ -121,11 +121,16 @@ namespace osu.Game.Rulesets.Mania.Timing
/// <summary> /// <summary>
/// A container which always keeps its height and relative coordinate space "auto-sized" to its children. /// A container which always keeps its height and relative coordinate space "auto-sized" to its children.
/// <para>
/// This is used in the case where children are relatively positioned/sized to time values (e.g. notes/bar lines) to keep
/// such children wrapped inside a container, otherwise they would disappear due to container flattening.
/// </para>
/// </summary> /// </summary>
private class AutoTimeRelativeContainer : Container private class AutoTimeRelativeContainer : Container
{ {
public override void InvalidateFromChild(Invalidation invalidation) public override void InvalidateFromChild(Invalidation invalidation)
{ {
// We only want to re-compute our size when a child's size or position has changed
if ((invalidation & Invalidation.Geometry) == 0) if ((invalidation & Invalidation.Geometry) == 0)
{ {
base.InvalidateFromChild(invalidation); base.InvalidateFromChild(invalidation);