Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
liveAssistant_web_demo
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
2017-12-05 21:00:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1689ddf38ebc842f712b291d1eea51d7c6b54839
1689ddf3
1 parent
dbb2ef74
add rotate_ext_input
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
16 行增加
和
8 行删除
demo.html
demo.html
查看文件 @
1689ddf
...
...
@@ -369,11 +369,12 @@
var
last_ext_press
=
0
;
function
draw_ext_input
(
px
,
py
,
press
)
{
//x = canvas_width - px * ratio_x;
//y = canvas_height - py * ratio_y;
x
=
px
*
ratio_x
;
y
=
py
*
ratio_y
;
//y = canvas_height - py * ratio_y;
if
(
last_ext_press
==
0
&&
press
==
1
){
ctx
.
beginPath
();
...
...
@@ -832,6 +833,10 @@
ext_input_connecting
=
!
ext_input_connecting
;
}
function
rotateExtInput
()
{
doCmd
(
"rotate_ext_input"
);
}
function
doCmd
(
cmdName
)
{
writeToScreen
(
cmdName
);
var
cmd
=
new
Object
();
...
...
@@ -1076,6 +1081,14 @@
Uint32param
[
0
]
=
1
;
cmd
.
data
=
new
Uint8Array
(
buffer
,
0
,
cmd
.
data_len
);
}
else
if
(
cmdName
==
"rotate_ext_input"
)
{
cmd
.
type
=
57
;
cmd
.
data_len
=
4
;
var
buffer
=
new
ArrayBuffer
(
cmd
.
data_len
);
var
Uint32param
=
new
Uint32Array
(
buffer
,
0
,
1
);
Uint32param
[
0
]
=
2
;
cmd
.
data
=
new
Uint8Array
(
buffer
,
0
,
cmd
.
data_len
);
}
doSendWSCmd
(
cmd
);
}
...
...
@@ -1570,15 +1583,10 @@
</table>
</div>
<div>
<div>
<button
type=
"button"
id=
"mouse"
onclick=
"javascript:onMouseClick(this);"
>
mouse
</button>
<button
type=
"button"
id=
"connect"
onclick=
"javascript:onConnectClick(this);"
>
connect
</button>
<button
type=
"button"
id=
"rotate"
onclick=
"javascript:onRotateClick(this);"
>
rotate
</button>
<button
type=
"button"
id=
"clear"
onclick=
"javascript:onClearClick(this);"
>
clear
</button>
</div>
<div
id=
"page"
>
<div
class=
"header"
>
<a
id=
"new"
class=
"navbtn"
onclick=
"newCanvas()"
>
New
</a>
<a
id=
"rotate_ext_input"
class=
"navbtn"
onclick=
"rotateExtInput()"
>
Rotate
</a>
<div
class=
"title"
>
Sketch Pad
</div>
</div>
<div
id=
"content"
>
...
...
请
注册
或
登录
后发表评论