tmp debug
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
93a600a0a8
commit
9e0feb0b64
@ -585,8 +585,8 @@ class InputModel {
|
||||
late final dynamic evtValue;
|
||||
if (type == 'pan_update') {
|
||||
evtValue = {
|
||||
'x': '${x.toInt()}',
|
||||
'y': '${y.toInt()}',
|
||||
'x': x.toInt(),
|
||||
'y': y.toInt(),
|
||||
};
|
||||
} else {
|
||||
final isMoveTypes = ['pan_start', 'pan_end'];
|
||||
@ -601,8 +601,8 @@ class InputModel {
|
||||
return;
|
||||
}
|
||||
evtValue = {
|
||||
'x': '${pos.x}',
|
||||
'y': '${pos.y}',
|
||||
'x': pos.x,
|
||||
'y': pos.y,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1179,30 +1179,29 @@ pub fn session_send_pointer(session_id: SessionID, msg: String) {
|
||||
let command = m.get("command").is_some();
|
||||
match (m.get("k"), m.get("v")) {
|
||||
(Some(k), Some(v)) => match k.as_str() {
|
||||
Some("touch") => match v.as_str() {
|
||||
Some("scale") => match v.get("v") {
|
||||
Some("touch") => match v.get("t").and_then(|t| t.as_str()) {
|
||||
Some("scale") => match v.get("v").and_then(|s| s.as_i64()) {
|
||||
Some(scale) => {
|
||||
if let Some(scale) = scale.as_i64() {
|
||||
if let Some(session) = SESSIONS.read().unwrap().get(&session_id) {
|
||||
session.send_touch_scale(scale as _, alt, ctrl, shift, command);
|
||||
}
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
},
|
||||
Some(pan_event) => match (v.get("x"), v.get("y")) {
|
||||
Some(pan_event) => match v.get("v") {
|
||||
Some(v) => match (
|
||||
v.get("x").and_then(|x| x.as_i64()),
|
||||
v.get("y").and_then(|y| y.as_i64()),
|
||||
) {
|
||||
(Some(x), Some(y)) => {
|
||||
if let Some(x) = x.as_i64() {
|
||||
if let Some(y) = y.as_i64() {
|
||||
if let Some(session) = SESSIONS.read().unwrap().get(&session_id)
|
||||
{
|
||||
if let Some(session) = SESSIONS.read().unwrap().get(&session_id) {
|
||||
session.send_touch_pan_event(
|
||||
pan_event, x as _, y as _, alt, ctrl, shift, command,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
_ => {}
|
||||
},
|
||||
_ => {}
|
||||
|
Loading…
Reference in New Issue
Block a user