ucservice 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ucservice.common.js +7 -7
- package/dist/ucservice.common.js.gz +0 -0
- package/dist/ucservice.common.js.map +1 -1
- package/dist/ucservice.umd.js +7 -7
- package/dist/ucservice.umd.js.gz +0 -0
- package/dist/ucservice.umd.js.map +1 -1
- package/dist/ucservice.umd.min.js +1 -1
- package/dist/ucservice.umd.min.js.gz +0 -0
- package/dist/ucservice.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/scooper.video.js +7 -7
package/package.json
CHANGED
package/src/scooper.video.js
CHANGED
|
@@ -2091,13 +2091,13 @@
|
|
|
2091
2091
|
if(videoHeight * liHeight / videoWidth < liWidth){ //视频横向留白
|
|
2092
2092
|
$(video).css('width', liHeight);
|
|
2093
2093
|
$(video).css('height', 'auto');
|
|
2094
|
-
$(video).css('left', 'calc(' +
|
|
2095
|
-
$(video).css('top', 'calc(-' +
|
|
2094
|
+
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
2095
|
+
$(video).css('top', 'calc(-' + videoHeight * liHeight / videoWidth / 2 + 'px + ' + liHeight + 'px / 2)');
|
|
2096
2096
|
}else { //视频纵向留白
|
|
2097
2097
|
$(video).css('width', 'auto');
|
|
2098
2098
|
$(video).css('height', liWidth);
|
|
2099
|
-
$(video).css('left', 'calc(' + liWidth
|
|
2100
|
-
$(video).css('top', 'calc(
|
|
2099
|
+
$(video).css('left', 'calc(-' + videoWidth * liWidth / videoHeight / 2 + 'px + ' + liWidth + 'px / 2)');
|
|
2100
|
+
$(video).css('top', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
2101
2101
|
}
|
|
2102
2102
|
}else if(rotateIndex == 2){ //2
|
|
2103
2103
|
$(video).attr('class', 'video-box');
|
|
@@ -2119,12 +2119,12 @@
|
|
|
2119
2119
|
$(video).css('width', liHeight);
|
|
2120
2120
|
$(video).css('height', 'auto');
|
|
2121
2121
|
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
2122
|
-
$(video).css('top', 'calc(-' +
|
|
2122
|
+
$(video).css('top', 'calc(-' + videoHeight * liHeight / videoWidth / 2 + 'px + ' + liHeight + 'px / 2)');
|
|
2123
2123
|
}else { //视频纵向留白
|
|
2124
2124
|
$(video).css('width', 'auto');
|
|
2125
2125
|
$(video).css('height', liWidth);
|
|
2126
|
-
$(video).css('left', 'calc(' + liWidth
|
|
2127
|
-
$(video).css('top', 'calc(
|
|
2126
|
+
$(video).css('left', 'calc(-' + videoWidth * liWidth / videoHeight / 2 + 'px + ' + liWidth + 'px / 2)');
|
|
2127
|
+
$(video).css('top', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
2130
|
},
|