Merge branch '2.x' into dev
This commit is contained in:
+3
-3
@@ -136,7 +136,7 @@ export default createComponent({
|
||||
currentPosition = Math.min(currentPosition, -minOffset.value);
|
||||
}
|
||||
|
||||
let targetOffset = Math.round(offset - currentPosition);
|
||||
let targetOffset = offset - currentPosition;
|
||||
if (!props.loop) {
|
||||
targetOffset = range(targetOffset, minOffset.value, 0);
|
||||
}
|
||||
@@ -242,8 +242,8 @@ export default createComponent({
|
||||
state.rect = rect;
|
||||
state.swiping = true;
|
||||
state.active = active;
|
||||
state.width = Math.floor(+props.width || rect.width);
|
||||
state.height = Math.floor(+props.height || rect.height);
|
||||
state.width = +props.width || rect.width;
|
||||
state.height = +props.height || rect.height;
|
||||
state.offset = getTargetOffset(active);
|
||||
children.forEach((swipe) => {
|
||||
swipe.setOffset(0);
|
||||
|
||||
Reference in New Issue
Block a user