summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sortable/constants.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/sortable/constants.js')
-rw-r--r--app/assets/javascripts/sortable/constants.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/sortable/constants.js b/app/assets/javascripts/sortable/constants.js
new file mode 100644
index 00000000000..7fddac00ab2
--- /dev/null
+++ b/app/assets/javascripts/sortable/constants.js
@@ -0,0 +1,19 @@
+/**
+ * Default config options for sortablejs.
+ * @type {object}
+ *
+ * @example
+ * import Sortable from 'sortablejs';
+ *
+ * const sortable = Sortable.create(el, {
+ * ...defaultSortableOptions,
+ * });
+ */
+export const defaultSortableOptions = {
+ animation: 200,
+ forceFallback: true,
+ fallbackClass: 'is-dragging',
+ fallbackOnBody: true,
+ ghostClass: 'is-ghost',
+ fallbackTolerance: 1,
+};