@@ -23,16 +23,14 @@ import androidx.compose.ui.unit.IntSize
2323 * @param initialZoom zoom set initially
2424 * @param minZoom minimum zoom value
2525 * @param maxZoom maximum zoom value
26- * @param flingGestureEnabled when set to true dragging pointer builds up velocity. When last
27- * pointer leaves Composable a movement invoked against friction till velocity drops down
26+ * @param fling when set to true dragging pointer builds up velocity. When last
27+ * pointer leaves Composable a movement invoked against friction till velocity drops below
2828 * to threshold
29- * @param moveToBoundsEnabled when set to true if image zoom is lower than initial zoom or
29+ * @param moveToBounds when set to true if image zoom is lower than initial zoom or
3030 * panned out of image boundaries moves back to bounds with animation.
31- * ##Note
32- * Currently rotating back to borders is not available
33- * @param zoomEnabled when set to true zoom is enabled
34- * @param panEnabled when set to true pan is enabled
35- * @param rotationEnabled when set to true rotation is enabled
31+ * @param zoomable when set to true zoom is enabled
32+ * @param pannable when set to true pan is enabled
33+ * @param rotatable when set to true rotation is enabled
3634 * @param limitPan limits pan to bounds of parent Composable. Using this flag prevents creating
3735 * empty space on sides or edges of parent
3836 */
@@ -42,11 +40,11 @@ fun rememberEnhancedZoomState(
4240 initialZoom : Float = 1f,
4341 minZoom : Float = 1f,
4442 maxZoom : Float = 5f,
45- flingGestureEnabled : Boolean = false,
46- moveToBoundsEnabled : Boolean = true,
47- zoomEnabled : Boolean = true,
48- panEnabled : Boolean = true,
49- rotationEnabled : Boolean = false,
43+ fling : Boolean = false,
44+ moveToBounds : Boolean = true,
45+ zoomable : Boolean = true,
46+ pannable : Boolean = true,
47+ rotatable : Boolean = false,
5048 limitPan : Boolean = false,
5149 key1 : Any? = Unit
5250): EnhancedZoomState {
@@ -56,11 +54,11 @@ fun rememberEnhancedZoomState(
5654 initialZoom = initialZoom,
5755 minZoom = minZoom,
5856 maxZoom = maxZoom,
59- flingGestureEnabled = flingGestureEnabled ,
60- moveToBoundsEnabled = moveToBoundsEnabled ,
61- zoomEnabled = zoomEnabled ,
62- panEnabled = panEnabled ,
63- rotationEnabled = rotationEnabled ,
57+ fling = fling ,
58+ moveToBounds = moveToBounds ,
59+ zoomable = zoomable ,
60+ pannable = pannable ,
61+ rotatable = rotatable ,
6462 limitPan = limitPan
6563 )
6664 }
@@ -84,16 +82,14 @@ fun rememberEnhancedZoomState(
8482 * @param initialZoom zoom set initially
8583 * @param minZoom minimum zoom value
8684 * @param maxZoom maximum zoom value
87- * @param flingGestureEnabled when set to true dragging pointer builds up velocity. When last
88- * pointer leaves Composable a movement invoked against friction till velocity drops down
85+ * @param fling when set to true dragging pointer builds up velocity. When last
86+ * pointer leaves Composable a movement invoked against friction till velocity drops below
8987 * to threshold
90- * @param moveToBoundsEnabled when set to true if image zoom is lower than initial zoom or
88+ * @param moveToBounds when set to true if image zoom is lower than initial zoom or
9189 * panned out of image boundaries moves back to bounds with animation.
92- * ##Note
93- * Currently rotating back to borders is not available
94- * @param zoomEnabled when set to true zoom is enabled
95- * @param panEnabled when set to true pan is enabled
96- * @param rotationEnabled when set to true rotation is enabled
90+ * @param zoomable when set to true zoom is enabled
91+ * @param pannable when set to true pan is enabled
92+ * @param rotatable when set to true rotation is enabled
9793 * @param limitPan limits pan to bounds of parent Composable. Using this flag prevents creating
9894 * empty space on sides or edges of parent
9995 */
@@ -103,11 +99,11 @@ fun rememberEnhancedZoomState(
10399 initialZoom : Float = 1f,
104100 minZoom : Float = 1f,
105101 maxZoom : Float = 5f,
106- flingGestureEnabled : Boolean = false,
107- moveToBoundsEnabled : Boolean = true,
108- zoomEnabled : Boolean = true,
109- panEnabled : Boolean = true,
110- rotationEnabled : Boolean = false,
102+ fling : Boolean = false,
103+ moveToBounds : Boolean = true,
104+ zoomable : Boolean = true,
105+ pannable : Boolean = true,
106+ rotatable : Boolean = false,
111107 limitPan : Boolean = false,
112108 key1 : Any? ,
113109 key2 : Any? ,
@@ -118,11 +114,11 @@ fun rememberEnhancedZoomState(
118114 initialZoom = initialZoom,
119115 minZoom = minZoom,
120116 maxZoom = maxZoom,
121- flingGestureEnabled = flingGestureEnabled ,
122- moveToBoundsEnabled = moveToBoundsEnabled ,
123- zoomEnabled = zoomEnabled ,
124- panEnabled = panEnabled ,
125- rotationEnabled = rotationEnabled ,
117+ fling = fling ,
118+ moveToBounds = moveToBounds ,
119+ zoomable = zoomable ,
120+ pannable = pannable ,
121+ rotatable = rotatable ,
126122 limitPan = limitPan
127123 )
128124 }
@@ -143,16 +139,14 @@ fun rememberEnhancedZoomState(
143139 * @param initialZoom zoom set initially
144140 * @param minZoom minimum zoom value
145141 * @param maxZoom maximum zoom value
146- * @param flingGestureEnabled when set to true dragging pointer builds up velocity. When last
147- * pointer leaves Composable a movement invoked against friction till velocity drops down
142+ * @param fling when set to true dragging pointer builds up velocity. When last
143+ * pointer leaves Composable a movement invoked against friction till velocity drops below
148144 * to threshold
149- * @param moveToBoundsEnabled when set to true if image zoom is lower than initial zoom or
145+ * @param moveToBounds when set to true if image zoom is lower than initial zoom or
150146 * panned out of image boundaries moves back to bounds with animation.
151- * ##Note
152- * Currently rotating back to borders is not available
153- * @param zoomEnabled when set to true zoom is enabled
154- * @param panEnabled when set to true pan is enabled
155- * @param rotationEnabled when set to true rotation is enabled
147+ * @param zoomable when set to true zoom is enabled
148+ * @param pannable when set to true pan is enabled
149+ * @param rotatable when set to true rotation is enabled
156150 * @param limitPan limits pan to bounds of parent Composable. Using this flag prevents creating
157151 * empty space on sides or edges of parent
158152 * @param keys are used to reset remember block to initial calculations. This can be used
@@ -165,11 +159,11 @@ fun rememberEnhancedZoomState(
165159 initialZoom : Float = 1f,
166160 minZoom : Float = 1f,
167161 maxZoom : Float = 5f,
168- flingGestureEnabled : Boolean = false,
169- moveToBoundsEnabled : Boolean = true,
170- zoomEnabled : Boolean = true,
171- panEnabled : Boolean = true,
172- rotationEnabled : Boolean = false,
162+ fling : Boolean = false,
163+ moveToBounds : Boolean = true,
164+ zoomable : Boolean = true,
165+ pannable : Boolean = true,
166+ rotatable : Boolean = false,
173167 limitPan : Boolean = false,
174168 vararg keys : Any?
175169): EnhancedZoomState {
@@ -179,11 +173,11 @@ fun rememberEnhancedZoomState(
179173 initialZoom = initialZoom,
180174 minZoom = minZoom,
181175 maxZoom = maxZoom,
182- flingGestureEnabled = flingGestureEnabled ,
183- moveToBoundsEnabled = moveToBoundsEnabled ,
184- zoomEnabled = zoomEnabled ,
185- panEnabled = panEnabled ,
186- rotationEnabled = rotationEnabled ,
176+ fling = fling ,
177+ moveToBounds = moveToBounds ,
178+ zoomable = zoomable ,
179+ pannable = pannable ,
180+ rotatable = rotatable ,
187181 limitPan = limitPan
188182 )
189183 }
0 commit comments