Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

polish jsdocs with description

Sultan6965306ff41f
diff --git a/app/shared/design-system/components/primitives/numericGestureControl.js b/app/shared/design-system/components/primitives/numericGestureControl.js
index 56baead1f7..972b675d90 100644
--- a/app/shared/design-system/components/primitives/numericGestureControl.js
+++ b/app/shared/design-system/components/primitives/numericGestureControl.js
@@ -1,13 +1,18 @@
-/*
- @example
- numericGestureControl(document.querySelector('input'), {
- onValueChange: (event) => {
- event.preventDefault();
- event.target.value = event.value;
- event.target.select();
- }
- })
-*/
+/**
+ * @description
+ * - detects pointer movements in the specified direction
+ * - avails an appropriate cursor
+ * - dispatches {onValueChange} method while pointermove and pointerdown are active
+ * - dispatched {onValueChange} recieves a new value: old value + accumulation of the pointer move axis
+ * @example
+ * numericGestureControl(document.querySelector('input'), {
+ * onValueChange: (event) => {
+ * event.preventDefault();
+ * event.target.value = event.value;
+ * event.target.select();
+ * }
+ * });
+ */
export const numericGestureControl = (
targetNode,
{ initialValue = 0, direction = "horizontal", onValueChange = ({}) => null }