Skip to content

Commit

Permalink
Added support for configuring the sort helper
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyjb committed Aug 30, 2018
1 parent c940c0c commit 6e64f05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion module/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ export class Gallery {
*/
'preview': 'preview',

/**
* The sortable helper to use in galleries where gallery items
* can be sorted.
*/
'sortableHelper': 'cloneGalleryItem',

/**
* The URL that any file will be uploaded to.
*/
Expand Down Expand Up @@ -309,7 +315,7 @@ export class Gallery {
'grabSelector':
'.mh-file-viewer__handle, .mh-image-viewer__handle',
'grabber': 'selector',
'helper': 'cloneGalleryItem'
'helper': this._options.sortableHelper
}
)
this._sortable.init()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manhattan-assets",
"version": "1.0.0-beta.12",
"version": "1.0.0-beta.13",
"description": "File and image uploads for forms.",
"engines": {
"node": ">=8.9.4"
Expand Down

0 comments on commit 6e64f05

Please sign in to comment.