diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD index b1a6a13..57345e4 100644 --- a/CONTRIBUTING.MD +++ b/CONTRIBUTING.MD @@ -1,6 +1,6 @@ -# Contributing to allonsh.js +# Contributing to Allonsh.js -First off, thank you for considering contributing to allonsh.js! We welcome improvements, bug fixes, documentation updates, and ideas. +First off, thank you for considering contributing to Allonsh.js! We welcome improvements, bug fixes, documentation updates, and ideas. ## How to Contribute @@ -83,4 +83,4 @@ Be respectful and courteous. We aim for an inclusive and welcoming community. --- -Thank you for contributing to allonsh.js! +Thank you for contributing to Allonsh.js! diff --git a/docs/allonsh.md b/docs/allonsh.md index 82def73..bb28958 100644 --- a/docs/allonsh.md +++ b/docs/allonsh.md @@ -1,4 +1,4 @@ -# Allonsh Docs +# Allonsh.js Docs Create dynamic drag-and-drop interfaces with customizable behaviors like restricted dropzones, element stacking, and ghost visuals for seamless user interaction. @@ -16,12 +16,15 @@ Creates a new Allonsh instance. - `draggableSelector` (string, **required**) — CSS class name for draggable elements. - `dropzoneSelector` (string, optional) — CSS class name for dropzone elements. - `playAreaSelector` (string, optional) — CSS class name for the play area container. Defaults to `document.body`. - - `restrictToDropzones` (boolean, optional) — If `true`, dragging outside dropzones will return element to origin. Default: `false`. + - `restrictToDropzones` (boolean, optional) — If `true`, elements snap back to their origin if dropped outside any dropzone. Default: `false`. - `enableStacking` (boolean, optional) — Enables stacking layout in dropzones. Default: `false`. - `stackDirection` (string, optional) — `'horizontal'` or `'vertical'` stacking direction. Default: `'horizontal'`. - `stackSpacing` (number, optional) — Space in pixels between stacked elements. Default: `5`. - `useGhostEffect` (boolean, optional) — Uses a semi-transparent clone as a "ghost" while dragging. Default: `false`. +**Note:** The `draggableSelector`, `dropzoneSelector`, and `playAreaSelector` options expect class names, not CSS selectors (omit the leading '.'). +For example, if the class is `.draggable`, pass `'draggable'` (without the dot). + --- ## Methods