Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredSize.kt +3 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ internal class AnchoredSize( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: IntSize, idleValue: IntSize, ): IntSize { fun anchorSizeIn(content: ContentKey): IntSize { val size = Loading @@ -45,8 +45,8 @@ internal class AnchoredSize( ) return IntSize( width = if (anchorWidth) size.width else value.width, height = if (anchorHeight) size.height else value.height, width = if (anchorWidth) size.width else idleValue.width, height = if (anchorHeight) size.height else idleValue.height, ) } Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredTranslate.kt +3 −3 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ internal class AnchoredTranslate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Offset, idleValue: Offset, ): Offset { fun throwException(content: ContentKey?): Nothing { throwMissingAnchorException( Loading @@ -51,9 +51,9 @@ internal class AnchoredTranslate( val offset = anchorToOffset - anchorFromOffset return if (content == transition.toContent) { Offset(value.x - offset.x, value.y - offset.y) Offset(idleValue.x - offset.x, idleValue.y - offset.y) } else { Offset(value.x + offset.x, value.y + offset.y) Offset(idleValue.x + offset.x, idleValue.y + offset.y) } } } Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/DrawScale.kt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ internal class DrawScale( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Scale, idleValue: Scale, ): Scale { return Scale(scaleX, scaleY, pivot) } Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt +10 −10 Original line number Diff line number Diff line Loading @@ -33,37 +33,37 @@ internal class EdgeTranslate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Offset, idleValue: Offset, ): Offset { val sceneSize = content.targetSize() ?: error("Content ${content.debugName} does not have a target size") val elementSize = element.targetSize(content) ?: return value val elementSize = element.targetSize(content) ?: return idleValue return when (edge.resolve(layoutDirection)) { Edge.Resolved.Top -> if (startsOutsideLayoutBounds) { Offset(value.x, -elementSize.height.toFloat()) Offset(idleValue.x, -elementSize.height.toFloat()) } else { Offset(value.x, 0f) Offset(idleValue.x, 0f) } Edge.Resolved.Left -> if (startsOutsideLayoutBounds) { Offset(-elementSize.width.toFloat(), value.y) Offset(-elementSize.width.toFloat(), idleValue.y) } else { Offset(0f, value.y) Offset(0f, idleValue.y) } Edge.Resolved.Bottom -> if (startsOutsideLayoutBounds) { Offset(value.x, sceneSize.height.toFloat()) Offset(idleValue.x, sceneSize.height.toFloat()) } else { Offset(value.x, (sceneSize.height - elementSize.height).toFloat()) Offset(idleValue.x, (sceneSize.height - elementSize.height).toFloat()) } Edge.Resolved.Right -> if (startsOutsideLayoutBounds) { Offset(sceneSize.width.toFloat(), value.y) Offset(sceneSize.width.toFloat(), idleValue.y) } else { Offset((sceneSize.width - elementSize.width).toFloat(), value.y) Offset((sceneSize.width - elementSize.width).toFloat(), idleValue.y) } } } Loading packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Fade.kt +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ internal class Fade(override val matcher: ElementMatcher) : PropertyTransformati content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Float, idleValue: Float, ): Float { // Return the alpha value of [element] either when it starts fading in or when it finished // fading out, which is `0` in both cases. Loading Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredSize.kt +3 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ internal class AnchoredSize( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: IntSize, idleValue: IntSize, ): IntSize { fun anchorSizeIn(content: ContentKey): IntSize { val size = Loading @@ -45,8 +45,8 @@ internal class AnchoredSize( ) return IntSize( width = if (anchorWidth) size.width else value.width, height = if (anchorHeight) size.height else value.height, width = if (anchorWidth) size.width else idleValue.width, height = if (anchorHeight) size.height else idleValue.height, ) } Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredTranslate.kt +3 −3 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ internal class AnchoredTranslate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Offset, idleValue: Offset, ): Offset { fun throwException(content: ContentKey?): Nothing { throwMissingAnchorException( Loading @@ -51,9 +51,9 @@ internal class AnchoredTranslate( val offset = anchorToOffset - anchorFromOffset return if (content == transition.toContent) { Offset(value.x - offset.x, value.y - offset.y) Offset(idleValue.x - offset.x, idleValue.y - offset.y) } else { Offset(value.x + offset.x, value.y + offset.y) Offset(idleValue.x + offset.x, idleValue.y + offset.y) } } } Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/DrawScale.kt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ internal class DrawScale( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Scale, idleValue: Scale, ): Scale { return Scale(scaleX, scaleY, pivot) } Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt +10 −10 Original line number Diff line number Diff line Loading @@ -33,37 +33,37 @@ internal class EdgeTranslate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Offset, idleValue: Offset, ): Offset { val sceneSize = content.targetSize() ?: error("Content ${content.debugName} does not have a target size") val elementSize = element.targetSize(content) ?: return value val elementSize = element.targetSize(content) ?: return idleValue return when (edge.resolve(layoutDirection)) { Edge.Resolved.Top -> if (startsOutsideLayoutBounds) { Offset(value.x, -elementSize.height.toFloat()) Offset(idleValue.x, -elementSize.height.toFloat()) } else { Offset(value.x, 0f) Offset(idleValue.x, 0f) } Edge.Resolved.Left -> if (startsOutsideLayoutBounds) { Offset(-elementSize.width.toFloat(), value.y) Offset(-elementSize.width.toFloat(), idleValue.y) } else { Offset(0f, value.y) Offset(0f, idleValue.y) } Edge.Resolved.Bottom -> if (startsOutsideLayoutBounds) { Offset(value.x, sceneSize.height.toFloat()) Offset(idleValue.x, sceneSize.height.toFloat()) } else { Offset(value.x, (sceneSize.height - elementSize.height).toFloat()) Offset(idleValue.x, (sceneSize.height - elementSize.height).toFloat()) } Edge.Resolved.Right -> if (startsOutsideLayoutBounds) { Offset(sceneSize.width.toFloat(), value.y) Offset(sceneSize.width.toFloat(), idleValue.y) } else { Offset((sceneSize.width - elementSize.width).toFloat(), value.y) Offset((sceneSize.width - elementSize.width).toFloat(), idleValue.y) } } } Loading
packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Fade.kt +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ internal class Fade(override val matcher: ElementMatcher) : PropertyTransformati content: ContentKey, element: ElementKey, transition: TransitionState.Transition, value: Float, idleValue: Float, ): Float { // Return the alpha value of [element] either when it starts fading in or when it finished // fading out, which is `0` in both cases. Loading