update to v1.0.8 优化了图片预览逻辑

This commit is contained in:
kohgylw 2018-10-26 18:08:54 +08:00
parent 894f77254b
commit d545fb9ad6
6 changed files with 7 additions and 5 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
filesystem/.DS_Store vendored

Binary file not shown.

View File

@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Fri Oct 26 17:32:46 CST 2018
#Fri Oct 26 18:07:02 CST 2018
version=1.0.7-RELEASE
groupId=kohgylw
m2e.projectName=kiftd

View File

@ -584,5 +584,5 @@
<!-- 音乐播放器 -->
<script type="text/javascript" src="js/APlayer.min.js"></script>
<!-- 页面操作定义 -->
<script type="text/javascript" src="js/home.min.js"></script>
<script type="text/javascript" src="js/home.js"></script>
</html>

View File

@ -1320,15 +1320,16 @@ function showPicture(fileId) {
// 从指定位置开始顺序加载图片
function loadingPreImg() {
console.log("Pre:"+imagesPi);
if(imagesPi >= 0) {
if(pictureViewList[imagesPi].filePath.startsWith("homeController")){
$(imageslist).find('li').eq(imagesPi).find('img').attr('src', pictureViewList[imagesPi].filePath);
}else{
$(imageslist).find('li').eq(imagesPi).find('img').attr('src', "fileblocks/"+pictureViewList[imagesPi].filePath);
}
viewer.update();
$(imageslist).find('li').eq(imagesPi).find('img').get(0).onload=function() {
imagesPi = imagesPi - 1;
imagesNi = imagesNi + 1;
if(imagesNi < pictureViewList.length) {
loadingNexImg();
} else if(imagesPi >= 0) {
@ -1339,15 +1340,16 @@ function loadingPreImg() {
}
function loadingNexImg() {
console.log("Nex:"+imagesNi);
if(imagesNi < pictureViewList.length) {
if(pictureViewList[imagesNi].filePath.startsWith("homeController")){
$(imageslist).find('li').eq(imagesNi).find('img').attr('src', pictureViewList[imagesNi].filePath);
}else{
$(imageslist).find('li').eq(imagesNi).find('img').attr('src', "fileblocks/"+pictureViewList[imagesNi].filePath);
}
viewer.update();
$(imageslist).find('li').eq(imagesNi).find('img').get(0).onload=function() {
imagesNi = imagesNi + 1;
imagesPi = imagesPi - 1;
if(imagesPi >= 0) {
loadingPreImg();
} else if(imagesNi < pictureViewList.length) {

File diff suppressed because one or more lines are too long