|
@@ -177,7 +177,7 @@ var draw_graph = function (graphType, obj) {
|
|
|
$(".leftmains").css({
|
|
|
"right": "-4rem"
|
|
|
})
|
|
|
- var touchfor = e.originalEvent.touches; //for 的手指数组
|
|
|
+ var touchfor = e.originalEvent.changedTouches; //for 的手指数组
|
|
|
//是否横屏
|
|
|
for (var i = 0; i < touchfor.length; i++) {
|
|
|
var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
@@ -195,7 +195,7 @@ var draw_graph = function (graphType, obj) {
|
|
|
|
|
|
//鼠标离开 把蒙版canvas的图片生成到canvas中
|
|
|
var touchend = function (e) {
|
|
|
- var touchfor = e.originalEvent.touches; //for 的手指数组
|
|
|
+ var touchfor = e.originalEvent.changedTouches; //for 的手指数组
|
|
|
//是否横屏
|
|
|
for (var i = 0; i < touchfor.length; i++) {
|
|
|
var acrossWidthX = touchfor[i].pageY * (videoHeight / voheight);
|
|
@@ -218,15 +218,15 @@ var draw_graph = function (graphType, obj) {
|
|
|
|
|
|
// 鼠标移动
|
|
|
var touchmove = function (e) {
|
|
|
- var touchfor = e.originalEvent.touches; //for 的手指数组
|
|
|
+ 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 verticalWidthX = touchfor[i].pageX * (videoWidth / vowidth);
|
|
|
var verticalHeightY = touchfor[i].pageY * (videoHeight / voheight);
|
|
|
var ping = resolving == 0 ?
|
|
|
- { "data": { "action": 2, "count": touchfor[i].length, "id": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
|
|
|
- { "data": { "action": 2, "count": touchfor[i].length, "id": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
|
|
|
+ { "data": { "action": 2, "count": touchfor.length, "id": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
|
|
|
+ { "data": { "action": 2, "count": touchfor.length, "id": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
|
|
|
console.log(ping);
|
|
|
wsss.send(JSON.stringify(ping));
|
|
|
}
|