askbot-dragon 1.3.71 → 1.3.73
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 +1 -1
- package/src/components/pdfPosition.vue +24 -25
package/package.json
CHANGED
|
@@ -873,29 +873,28 @@ export default {
|
|
|
873
873
|
that.displacement.pageY2 = events2.pageY;
|
|
874
874
|
}
|
|
875
875
|
// 双指缩放比例计算
|
|
876
|
-
let zoom =
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
y: events.pageY
|
|
881
|
-
},
|
|
876
|
+
let zoom = that.getDistance({
|
|
877
|
+
x: events.pageX,
|
|
878
|
+
y: events.pageY
|
|
879
|
+
},
|
|
882
880
|
{
|
|
883
881
|
x: events2.pageX,
|
|
884
882
|
y: events2.pageY
|
|
885
883
|
}
|
|
886
884
|
)
|
|
887
|
-
that.getDistance(
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
);
|
|
885
|
+
// that.getDistance(
|
|
886
|
+
// {
|
|
887
|
+
// x: that.displacement.pageX,
|
|
888
|
+
// y: that.displacement.pageY
|
|
889
|
+
// },
|
|
890
|
+
// {
|
|
891
|
+
// x: that.displacement.pageX2,
|
|
892
|
+
// y: that.displacement.pageY2
|
|
893
|
+
// }
|
|
894
|
+
// );
|
|
897
895
|
// 应用在元素上的缩放比例
|
|
898
896
|
let newScale = that.displacement.originScale * zoom;
|
|
897
|
+
console.log(newScale);
|
|
899
898
|
// 最大缩放比例限制
|
|
900
899
|
if (newScale > 2) {
|
|
901
900
|
newScale = 2;
|
|
@@ -906,15 +905,15 @@ export default {
|
|
|
906
905
|
// 图像应用缩放效果
|
|
907
906
|
that.pages.forEach((item, index) =>{
|
|
908
907
|
if(item.dom) {
|
|
909
|
-
item.dom.children.forEach( childDom =>{
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
}
|
|
908
|
+
// item.dom.children.forEach( childDom =>{
|
|
909
|
+
// if(childDom.getAttribute('react-count')) {
|
|
910
|
+
// childDom.style.transform = "scale(" + newScale + ")";
|
|
911
|
+
// childDom.style.transformOrigin = "0px 0px 0px";
|
|
912
|
+
// } else {
|
|
913
|
+
item.dom = null
|
|
914
|
+
that.startRenderPages(item.pdfPage, null, index)
|
|
915
|
+
// }
|
|
916
|
+
// })
|
|
918
917
|
}
|
|
919
918
|
})
|
|
920
919
|
// console.log(newScale);
|