File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed
Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1919 "build:umd" : " set NODE_ENV=umd&& rollup -c build/umd-build.js" ,
2020 "build:umd:watch" : " set NODE_ENV=umd&& rollup -w -c build/umd-build.js" ,
2121 "build:es" : " set NODE_ENV=es&& rollup -c build/esm-build.js" ,
22+ "build:es:watch" : " set NODE_ENV=es&& rollup -w -c build/esm-build.js" ,
2223 "minify" : " node build/minify.js" ,
2324 "build" : " npm run build:es && npm run build:umd && npm run minify"
2425 },
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import {
1111 getWindowScrollingElement
1212} from '../../src/utils.js' ;
1313
14+ import Sortable from '../../src/Sortable.js' ;
15+
1416import { Edge , IE11OrLess , Safari } from '../../src/BrowserInfo.js' ;
1517
1618let autoScrolls = [ ] ,
Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ function MultiDragPlugin() {
374374 // Do not "unfold" after around dragEl if reverted
375375 if ( ( parentEl [ expando ] . options . sort || parentEl !== rootEl ) && multiDragElements . length > 1 ) {
376376 let dragRect = getRect ( dragEl ) ,
377- multiDragIndex = index ( dragEl , ':not(.' + Sortable . active . options . selectedClass + ')' ) ;
377+ multiDragIndex = index ( dragEl , ':not(.' + this . options . selectedClass + ')' ) ;
378378
379379 if ( ! initialFolding && options . animation ) dragEl . thisAnimationDuration = null ;
380380
Original file line number Diff line number Diff line change @@ -1881,17 +1881,17 @@ Sortable.utils = {
18811881 * @param {...SortablePlugin|SortablePlugin[] } plugins Plugins being mounted
18821882 */
18831883Sortable . mount = function ( ...plugins ) {
1884- if ( plugins [ 0 ] . constructor === Array ) plugins = plugins [ 0 ] ;
1884+ if ( plugins [ 0 ] . constructor === Array ) plugins = plugins [ 0 ] ;
18851885
1886- for ( let i in plugins ) {
1887- let plugin = plugins [ i ] ;
1888- if ( ! plugin . prototype || ! plugin . prototype . constructor ) {
1889- throw `Sortable: Mounted plugin must be a constructor function, not ${ { } . toString . call ( el ) } ` ;
1890- }
1891- if ( plugin . utils ) Sortable . utils = { ...Sortable . utils , ...plugin . utils } ;
1892-
1893- PluginManager . mount ( plugin ) ;
1886+ for ( let i in plugins ) {
1887+ let plugin = plugins [ i ] ;
1888+ if ( ! plugin . prototype || ! plugin . prototype . constructor ) {
1889+ throw `Sortable: Mounted plugin must be a constructor function, not ${ { } . toString . call ( el ) } ` ;
18941890 }
1891+ if ( plugin . utils ) Sortable . utils = { ...Sortable . utils , ...plugin . utils } ;
1892+
1893+ PluginManager . mount ( plugin ) ;
1894+ }
18951895} ;
18961896
18971897
You can’t perform that action at this time.
0 commit comments