图像滚动问题解决
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
dd3d738eed
commit
d30c9a5f3b
|
|
@ -40,10 +40,10 @@
|
||||||
<div v-if="series" class="right-bottom-text">
|
<div v-if="series" class="right-bottom-text">
|
||||||
<div v-show="imageInfo.location">Location: {{
|
<div v-show="imageInfo.location">Location: {{
|
||||||
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
||||||
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orientation-top">
|
<div class="orientation-top">
|
||||||
|
|
@ -190,10 +190,10 @@ export default {
|
||||||
const totalImages = this.imageInfo.total;
|
const totalImages = this.imageInfo.total;
|
||||||
|
|
||||||
// 手动实现循环逻辑
|
// 手动实现循环逻辑
|
||||||
if (currentImageIdIndex >= totalImages - 1) {
|
if (currentImageIdIndex >= totalImages - 1 && e.wheelDeltaY < 0) {
|
||||||
// 滚动到最后一张时跳回第一张
|
// 滚动到最后一张时跳回第一张
|
||||||
csUtils.jumpToSlice(viewport.element, { imageIndex: 0 });
|
csUtils.jumpToSlice(viewport.element, { imageIndex: 0 });
|
||||||
} else if (currentImageIdIndex <= 0) {
|
} else if (currentImageIdIndex <= 0 && e.wheelDeltaY > 0) {
|
||||||
// 滚动到第一张时跳回最后一张
|
// 滚动到第一张时跳回最后一张
|
||||||
csUtils.jumpToSlice(viewport.element, { imageIndex: totalImages - 1 });
|
csUtils.jumpToSlice(viewport.element, { imageIndex: totalImages - 1 });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -188,10 +188,10 @@ export default {
|
||||||
const totalImages = this.imageInfo.total;
|
const totalImages = this.imageInfo.total;
|
||||||
|
|
||||||
// 手动实现循环逻辑
|
// 手动实现循环逻辑
|
||||||
if (currentImageIdIndex >= totalImages - 1) {
|
if (currentImageIdIndex >= totalImages - 1 && e.wheelDeltaY < 0) {
|
||||||
// 滚动到最后一张时跳回第一张
|
// 滚动到最后一张时跳回第一张
|
||||||
csUtils.jumpToSlice(viewport.element, { imageIndex: 0 });
|
csUtils.jumpToSlice(viewport.element, { imageIndex: 0 });
|
||||||
} else if (currentImageIdIndex <= 0) {
|
} else if (currentImageIdIndex <= 0 && e.wheelDeltaY > 0) {
|
||||||
// 滚动到第一张时跳回最后一张
|
// 滚动到第一张时跳回最后一张
|
||||||
csUtils.jumpToSlice(viewport.element, { imageIndex: totalImages - 1 });
|
csUtils.jumpToSlice(viewport.element, { imageIndex: totalImages - 1 });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue