embla-carousel-svelte
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-svelte", | ||
"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
56366
1587
+ Addedembla-carousel@8.0.0-rc09(transitive)
+ Addedembla-carousel-reactive-utils@8.0.0-rc09(transitive)
- Removedembla-carousel@8.0.0-rc08(transitive)
- Removedembla-carousel-reactive-utils@8.0.0-rc08(transitive)
Updatedembla-carousel@8.0.0-rc09