askbot-dragon 1.3.75 → 1.3.77
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/package.json
CHANGED
|
@@ -602,7 +602,7 @@ export default {
|
|
|
602
602
|
this.loadPdfData(pageIndex)
|
|
603
603
|
},
|
|
604
604
|
pdfScroll (e) {
|
|
605
|
-
if(this.preViewType !== 'pdf' ||
|
|
605
|
+
if(this.preViewType !== 'pdf' || this.isTouchMoved) {
|
|
606
606
|
return
|
|
607
607
|
}
|
|
608
608
|
this.debounceScrollPdf(e, this)
|
|
@@ -895,32 +895,17 @@ export default {
|
|
|
895
895
|
);
|
|
896
896
|
// 应用在元素上的缩放比例
|
|
897
897
|
let newScale = that.displacement.originScale * zoom;
|
|
898
|
-
console.log(zoom, newScale);
|
|
898
|
+
console.log(zoom, newScale , 'newScale');
|
|
899
899
|
// 最大缩放比例限制
|
|
900
900
|
if (newScale > 2) {
|
|
901
901
|
newScale = 2;
|
|
902
902
|
}
|
|
903
903
|
// 记住使用的缩放值
|
|
904
904
|
that.displacement.scale = newScale;
|
|
905
|
-
that.scale = newScale
|
|
906
|
-
// 图像应用缩放效果
|
|
907
|
-
that.pages.forEach((item, index) =>{
|
|
908
|
-
if(item.dom) {
|
|
909
|
-
// item.dom.children.forEach( childDom =>{
|
|
910
|
-
// if(childDom.getAttribute('react-count')) {
|
|
911
|
-
// childDom.style.transform = "scale(" + newScale + ")";
|
|
912
|
-
// childDom.style.transformOrigin = "0px 0px 0px";
|
|
913
|
-
// } else {
|
|
914
|
-
item.dom = null
|
|
915
|
-
that.startRenderPages(item.pdfPage, null, index)
|
|
916
|
-
// }
|
|
917
|
-
// })
|
|
918
|
-
}
|
|
919
|
-
})
|
|
920
905
|
// console.log(newScale);
|
|
921
|
-
|
|
922
|
-
//
|
|
923
|
-
|
|
906
|
+
matrix_box.style.transform = "scale(" + newScale + ")";
|
|
907
|
+
// 设置旋转元素的基点位置
|
|
908
|
+
matrix_box.style.transformOrigin = "0px 0px 0px";
|
|
924
909
|
}
|
|
925
910
|
},{ passive: false });
|
|
926
911
|
document.addEventListener('touchend',function() {
|