From 1eec5c3fe420ada558804fc44138f53ebe8fd5a9 Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Tue, 23 Jan 2024 15:33:27 +0000 Subject: [PATCH] Rename GesturesReferencePoint to GestureReferencePoint --- .../appyx/interactions/core/AppyxInteractionsContainer.kt | 8 ++++---- .../navigation/composable/AppyxNavigationContainer.kt | 4 ++-- .../bumble/appyx/demos/incompletedrag/IncompleteDrag.kt | 4 ++-- .../kotlin/com/bumble/appyx/demos/sample1/Sample1.kt | 4 ++-- .../kotlin/com/bumble/appyx/demos/sample2/Sample2.kt | 4 ++-- .../kotlin/com/bumble/appyx/demos/sample3/Sample3.kt | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/AppyxInteractionsContainer.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/AppyxInteractionsContainer.kt index d0f7c5fa9..f27eed8ff 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/AppyxInteractionsContainer.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/AppyxInteractionsContainer.kt @@ -50,7 +50,7 @@ import com.bumble.appyx.interactions.core.ui.property.motionPropertyRenderValue private val defaultExtraTouch = 48f.dp -enum class GesturesReferencePoint { +enum class GestureReferencePoint { Container, Element } @@ -65,7 +65,7 @@ fun AppyxInteractionsContainer( clipToBounds: Boolean = false, gestureValidator: GestureValidator = defaultValidator, gestureExtraTouchArea: Dp = defaultExtraTouch, - gestureRelativeTo: GesturesReferencePoint = GesturesReferencePoint.Container, + gestureRelativeTo: GestureReferencePoint = GestureReferencePoint.Container, elementUi: @Composable BoxScope.(Element) -> Unit = { _ -> Text( modifier = Modifier @@ -141,7 +141,7 @@ fun AppyxInteractionsContainer( } } - gestureRelativeTo == GesturesReferencePoint.Element -> + gestureRelativeTo == GestureReferencePoint.Element -> ElementWithGestureTransformedBoundingBox( appyxComponent = appyxComponent, containerSize = containerSize, @@ -151,7 +151,7 @@ fun AppyxInteractionsContainer( elementUi = elementUi ) - gestureRelativeTo == GesturesReferencePoint.Container -> + gestureRelativeTo == GestureReferencePoint.Container -> ElementWithGesture( appyxComponent = appyxComponent, elementUiModel = elementUiModel, diff --git a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/AppyxNavigationContainer.kt b/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/AppyxNavigationContainer.kt index 6c5ddacd1..1b5609f1e 100644 --- a/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/AppyxNavigationContainer.kt +++ b/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/AppyxNavigationContainer.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.bumble.appyx.interactions.core.AppyxInteractionsContainer import com.bumble.appyx.interactions.core.Element -import com.bumble.appyx.interactions.core.GesturesReferencePoint +import com.bumble.appyx.interactions.core.GestureReferencePoint import com.bumble.appyx.interactions.core.gesture.GestureValidator import com.bumble.appyx.interactions.core.model.BaseAppyxComponent import com.bumble.appyx.navigation.integration.LocalScreenSize @@ -26,7 +26,7 @@ fun AppyxNavigationContainer( clipToBounds: Boolean = false, gestureValidator: GestureValidator = GestureValidator.defaultValidator, gestureExtraTouchArea: Dp = defaultExtraTouch, - gestureRelativeTo: GesturesReferencePoint = GesturesReferencePoint.Container, + gestureRelativeTo: GestureReferencePoint = GestureReferencePoint.Container, decorator: @Composable (child: ChildRenderer, element: Element) -> Unit = { child, _ -> child() } diff --git a/demos/mkdocs/appyx-interactions/gestures/incompletedrag/web/src/jsMain/kotlin/com/bumble/appyx/demos/incompletedrag/IncompleteDrag.kt b/demos/mkdocs/appyx-interactions/gestures/incompletedrag/web/src/jsMain/kotlin/com/bumble/appyx/demos/incompletedrag/IncompleteDrag.kt index 49c7b65a6..354cf4289 100644 --- a/demos/mkdocs/appyx-interactions/gestures/incompletedrag/web/src/jsMain/kotlin/com/bumble/appyx/demos/incompletedrag/IncompleteDrag.kt +++ b/demos/mkdocs/appyx-interactions/gestures/incompletedrag/web/src/jsMain/kotlin/com/bumble/appyx/demos/incompletedrag/IncompleteDrag.kt @@ -38,7 +38,7 @@ import com.bumble.appyx.components.internal.testdrive.TestDriveModel.State.Eleme import com.bumble.appyx.components.internal.testdrive.operation.next import com.bumble.appyx.demos.incompletedrag.InteractionTarget.Child1 import com.bumble.appyx.interactions.core.AppyxInteractionsContainer -import com.bumble.appyx.interactions.core.GesturesReferencePoint +import com.bumble.appyx.interactions.core.GestureReferencePoint import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup @@ -147,7 +147,7 @@ fun ModelUi( appyxComponent = testDrive, screenWidthPx = screenWidthPx, screenHeightPx = screenHeightPx, - gestureRelativeTo = GesturesReferencePoint.Element, + gestureRelativeTo = GestureReferencePoint.Element, modifier = modifier ) { diff --git a/demos/mkdocs/appyx-interactions/interactions/sample1/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample1/Sample1.kt b/demos/mkdocs/appyx-interactions/interactions/sample1/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample1/Sample1.kt index 6de0ad26a..761111964 100644 --- a/demos/mkdocs/appyx-interactions/interactions/sample1/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample1/Sample1.kt +++ b/demos/mkdocs/appyx-interactions/interactions/sample1/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample1/Sample1.kt @@ -37,7 +37,7 @@ import com.bumble.appyx.components.internal.testdrive.TestDriveModel.State.Eleme import com.bumble.appyx.components.internal.testdrive.operation.next import com.bumble.appyx.demos.sample1.InteractionTarget.Child1 import com.bumble.appyx.interactions.core.AppyxInteractionsContainer -import com.bumble.appyx.interactions.core.GesturesReferencePoint +import com.bumble.appyx.interactions.core.GestureReferencePoint import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup @@ -144,7 +144,7 @@ fun ModelUi( appyxComponent = testDrive, screenWidthPx = screenWidthPx, screenHeightPx = screenHeightPx, - gestureRelativeTo = GesturesReferencePoint.Element + gestureRelativeTo = GestureReferencePoint.Element ) { Box( modifier = Modifier diff --git a/demos/mkdocs/appyx-interactions/interactions/sample2/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample2/Sample2.kt b/demos/mkdocs/appyx-interactions/interactions/sample2/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample2/Sample2.kt index 2545f2389..2e55d8ca8 100644 --- a/demos/mkdocs/appyx-interactions/interactions/sample2/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample2/Sample2.kt +++ b/demos/mkdocs/appyx-interactions/interactions/sample2/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample2/Sample2.kt @@ -38,7 +38,7 @@ import com.bumble.appyx.components.internal.testdrive.TestDriveModel.State.Eleme import com.bumble.appyx.components.internal.testdrive.operation.next import com.bumble.appyx.demos.sample2.InteractionTarget.Child1 import com.bumble.appyx.interactions.core.AppyxInteractionsContainer -import com.bumble.appyx.interactions.core.GesturesReferencePoint +import com.bumble.appyx.interactions.core.GestureReferencePoint import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup @@ -145,7 +145,7 @@ fun ModelUi( appyxComponent = testDrive, screenWidthPx = screenWidthPx, screenHeightPx = screenHeightPx, - gestureRelativeTo = GesturesReferencePoint.Element + gestureRelativeTo = GestureReferencePoint.Element ) { Box( modifier = Modifier diff --git a/demos/mkdocs/appyx-interactions/interactions/sample3/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample3/Sample3.kt b/demos/mkdocs/appyx-interactions/interactions/sample3/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample3/Sample3.kt index a0aa2babb..69f201c47 100644 --- a/demos/mkdocs/appyx-interactions/interactions/sample3/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample3/Sample3.kt +++ b/demos/mkdocs/appyx-interactions/interactions/sample3/web/src/jsMain/kotlin/com/bumble/appyx/demos/sample3/Sample3.kt @@ -46,7 +46,7 @@ import com.bumble.appyx.components.internal.testdrive.operation.next import com.bumble.appyx.demos.sample3.InteractionTarget.Child1 import com.bumble.appyx.demos.sample3.Sample3Visualisation.Companion.toTargetUiState import com.bumble.appyx.interactions.core.AppyxInteractionsContainer -import com.bumble.appyx.interactions.core.GesturesReferencePoint +import com.bumble.appyx.interactions.core.GestureReferencePoint import com.bumble.appyx.interactions.core.model.transition.Keyframes import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.KEYFRAME @@ -200,7 +200,7 @@ fun ModelUi( appyxComponent = testDrive, screenWidthPx = screenWidthPx, screenHeightPx = screenHeightPx, - gestureRelativeTo = GesturesReferencePoint.Element, + gestureRelativeTo = GestureReferencePoint.Element, modifier = modifier ) { Box(