From f103b71e6225689db51646420e71b53d62003915 Mon Sep 17 00:00:00 2001 From: Shivam Dhuria Date: Sun, 2 Jan 2022 23:58:53 +0530 Subject: [PATCH] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 917ad9a..ec102fd 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Currently Puck supports three behaviours ### FreeForm Freeform makes Composable draggable anywhere in the screen. If the user drags a composable out of screen area, it is coerced within the bounds of the screen.

- +

For adding Freeform behaviour to any composable, do - @@ -116,7 +116,7 @@ FloatingActionButton(onClick = {}, ### Sticky You can also make Composables stick to the edges or corners of the screen. Simple flick the Composable in the direction you want it to stick and it will follow the trajectory and stick there. To use stick you need to pass a parameter (EDGES, CORNERS,VERTICAL EDGsE HORIZONATL EDGES). Puck will automatically make the set parameter "sticky".

- +

```kotlin @@ -135,7 +135,7 @@ We can define gravity points with center and radius. Any composable that falls w Note: The circle isn't actualy drawn as above while using puck. I have shown the circle only for demonstration purposes.

- +

```kotlin @@ -155,7 +155,7 @@ FloatingActionButton(onClick = {}, ## Attributes - isPointsTowardsCenter - Currently this only works for Sticky(Edges) mode. Composable will always point towards center by using rotation animation. When a composable is dragged, the rotation value is set to default (0f), after the drag ends and the commposable sticks to any of the edges, the composable rotates according and points towards center.

- +

- animationDuration - This is time taken in milli seconds for the drag animation. The lesser the time the quicker the animation. (Note: When the behaviour is set to Freeform, a composable is draggable without any animation.)