You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows users to completely disable horizontal or vertical scrolling on the trackpad by setting the constrain percentage to a negative value.
Updates the documentation to reflect this new functionality.
Copy file name to clipboardExpand all lines: docs/docs/guides/core/components.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,8 +190,10 @@ Trackpad options you can configure include:
190
190
|`disableEasing`|`boolean`|`false`| Disable momentum scrolling/easing when releasing |
191
191
|`xEase`|`ConstrainEase`|`ScrollSpring`| Custom easing for x-axis scrolling |
192
192
|`yEase`|`ConstrainEase`|`ScrollSpring`| Custom easing for y-axis scrolling |
193
-
|`xConstrainPercent`|`number`|`0`| Percentage of overflow allowed when dragging beyond x-axis limit |
194
-
|`yConstrainPercent`|`number`|`0`| Percentage of overflow allowed when dragging beyond y-axis limit |
193
+
|`xConstrainPercent`|`number`|`0`| Percentage of overflow allowed when dragging beyond x-axis limit. Setting this value to a negative number disables x-axis scrolling entirely. |
194
+
195
+
|`yConstrainPercent`|`number`|`0`| Percentage of overflow allowed when dragging beyond y-axis limit. Setting this value to a negative number disables y-axis scrolling entirely. |
196
+
195
197
196
198
These options are passed when creating a `LayoutContainer` or `LayoutView`.
197
199
@@ -207,8 +209,8 @@ const container = new LayoutContainer({
207
209
// Constrain scrolling within bounds
208
210
constrain: true,
209
211
210
-
// No x-axis overflow allowed when dragging beyond bounds
211
-
xConstrainPercent: 0,
212
+
// No x-axis scrolling allowed when dragging beyond bounds
213
+
xConstrainPercent: -1,
212
214
// No y-axis overflow allowed when dragging beyond bounds
0 commit comments