embla-carousel-vue
Advanced tools
Comparing version 8.0.0-rc08 to 8.0.0-rc09
@@ -1223,3 +1223,3 @@ (function (global, factory) { | ||
slides: null, | ||
containScroll: null, | ||
containScroll: 'trimSnaps', | ||
direction: 'ltr', | ||
@@ -1319,2 +1319,12 @@ slidesToScroll: 1, | ||
} | ||
function createEngine(options, animations) { | ||
const engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler, animations); | ||
if (options.loop && !engine.slideLooper.canLoop()) { | ||
const optionsWithoutLoop = Object.assign({}, options, { | ||
loop: false | ||
}); | ||
return createEngine(optionsWithoutLoop, animations); | ||
} | ||
return engine; | ||
} | ||
function activate(withOptions, withPlugins) { | ||
@@ -1329,3 +1339,3 @@ if (destroyed) return; | ||
storeElements(); | ||
engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler, animations); | ||
engine = createEngine(options, animations); | ||
optionsMediaQueries([optionsBase, ...pluginList.map(({ | ||
@@ -1342,15 +1352,3 @@ options | ||
}); | ||
if (options.loop) { | ||
if (!engine.slideLooper.canLoop()) { | ||
deActivate(); | ||
activate({ | ||
loop: false | ||
}, withPlugins); | ||
optionsBase = mergeOptions(optionsBase, { | ||
loop: true | ||
}); | ||
return; | ||
} | ||
engine.slideLooper.loop(); | ||
} | ||
if (engine.options.loop) engine.slideLooper.loop(); | ||
if (container.offsetParent && slides.length) { | ||
@@ -1357,0 +1355,0 @@ engine.dragHandler.init(self, options.watchDrag); |
{ | ||
"name": "embla-carousel-vue", | ||
"version": "8.0.0-rc08", | ||
"version": "8.0.0-rc09", | ||
"author": "David Jerleke", | ||
@@ -59,4 +59,4 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision", | ||
"dependencies": { | ||
"embla-carousel": "8.0.0-rc08", | ||
"embla-carousel-reactive-utils": "8.0.0-rc08" | ||
"embla-carousel": "8.0.0-rc09", | ||
"embla-carousel-reactive-utils": "8.0.0-rc09" | ||
}, | ||
@@ -63,0 +63,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56752
1600
+ Addedembla-carousel@8.0.0-rc09(transitive)
+ Addedembla-carousel-reactive-utils@8.0.0-rc09(transitive)
+ Addedmagic-string@0.30.14(transitive)
+ Addednanoid@3.3.8(transitive)
- Removedembla-carousel@8.0.0-rc08(transitive)
- Removedembla-carousel-reactive-utils@8.0.0-rc08(transitive)
- Removedmagic-string@0.30.13(transitive)
- Removednanoid@3.3.7(transitive)
Updatedembla-carousel@8.0.0-rc09