|
@@ -136,8 +136,9 @@ function doConnectDirectives() {
|
|
|
return;
|
|
|
}
|
|
|
if (result.data.code === 'phoneSizeChange') {
|
|
|
- console.log(result.data);
|
|
|
+ // console.log(result.data);
|
|
|
window.currentPhoneSize = {
|
|
|
+ id: result.data.id,
|
|
|
width: result.data.width,
|
|
|
height: result.data.height,
|
|
|
};
|
|
@@ -176,8 +177,11 @@ function doConnectDirectives() {
|
|
|
return;
|
|
|
}
|
|
|
if (result.type === 'getPhoneSize') {
|
|
|
- console.log(result);
|
|
|
- window.currentPhoneSize = {
|
|
|
+ // console.log(result);
|
|
|
+ const data = window.phoneSizeList.find(function (v) {
|
|
|
+ return v.width === result.data.width && v.height === result.data.height;
|
|
|
+ });
|
|
|
+ window.currentPhoneSize = data || {
|
|
|
width: result.data.width,
|
|
|
height: result.data.height,
|
|
|
};
|
|
@@ -249,9 +253,9 @@ var draw_graph = function (graphType) {
|
|
|
var touchfor = e.originalEvent.changedTouches; //for 的手指数组
|
|
|
//是否横屏
|
|
|
for (var i = 0; i < touchfor.length; i++) {
|
|
|
- var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
- var acrossHeightY =
|
|
|
- videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
+ // var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
+ // var acrossHeightY =
|
|
|
+ // videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
var idx = ongoingTouches.findIndex(function (ele) {
|
|
@@ -286,9 +290,9 @@ var draw_graph = function (graphType) {
|
|
|
var touchfor = e.originalEvent.changedTouches; //for 的手指数组
|
|
|
//是否横屏
|
|
|
for (var i = 0; i < touchfor.length; i++) {
|
|
|
- var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
- var acrossHeightY =
|
|
|
- videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
+ // var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
+ // var acrossHeightY =
|
|
|
+ // videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
var ping =
|
|
@@ -326,9 +330,9 @@ var draw_graph = function (graphType) {
|
|
|
}
|
|
|
var touchfor = e.originalEvent.targetTouches; //for 的手指数组
|
|
|
for (var i = 0; i < touchfor.length; i++) {
|
|
|
- var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
- var acrossHeightY =
|
|
|
- videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
+ // var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
+ // var acrossHeightY =
|
|
|
+ // videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
var ping =
|