Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
李勇
/
McuClient
转到一个项目
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-04-28 18:29:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c44ad60883266564ba1f1ea795cd8f74f22cd44e
c44ad608
1 parent
507f50ff
文档模块增加 动态ppt的动画步数
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
47 行增加
和
7 行删除
dist/McuClient.js
src/EngineEntrance.js
src/apes/ApeConsts.js
src/apes/DocApe.js
src/pdus/pro.js
dist/McuClient.js
查看文件 @
c44ad60
此 diff 太大无法显示。
src/EngineEntrance.js
查看文件 @
c44ad60
...
...
@@ -27,7 +27,7 @@ import Server from "config/Server";
import
UTF8
from
'utf-8'
;
let
loger
=
Loger
.
getLoger
(
'McuClient'
);
let
_sdkInfo
=
{
"version"
:
"v1.10.
0.20170427
"
,
"author"
:
"www.3mang.com"
};
let
_sdkInfo
=
{
"version"
:
"v1.10.
2.20170428
"
,
"author"
:
"www.3mang.com"
};
//APE
let
_sass
;
...
...
@@ -169,6 +169,7 @@ export default class MessageEntrance extends Emiter {
this
.
sendDocumentUpload
=
this
.
_sendDocumentUpload
.
bind
(
this
);
//上传文档
this
.
sendDocumentSwitchDoc
=
this
.
_sendDocumentSwitchDoc
.
bind
(
this
);
//切换文档
this
.
sendDocumentSwitchPage
=
this
.
_sendDocumentSwitchPage
.
bind
(
this
);
//翻页
this
.
sendDocumentSwitchAnimation
=
this
.
_sendDocumentSwitchAnimation
.
bind
(
this
);
//切换当前页码的动画步骤
this
.
sendDocumentDelete
=
this
.
_sassDeleteDocument
.
bind
(
this
);
this
.
sendDocBroadcastMsg
=
this
.
_sendDocBroadcastMsg
.
bind
(
this
);
//删除文档,先通过Sass删除,sass删除成功之后再同步mcu
...
...
@@ -1209,7 +1210,16 @@ export default class MessageEntrance extends Emiter {
_doc_ape
.
documentSwitchPage
(
_param
);
}
}
//操作文档(页码上的动画步骤操作)
_sendDocumentSwitchAnimation
(
_param
){
if
(
!
_mcu
.
connected
)
{
loger
.
warn
(
GlobalConfig
.
getCurrentStatus
());
return
;
}
if
(
_doc_ape
)
{
_doc_ape
.
documentSwitchAnimation
(
_param
);
}
}
//操作文档(缩放、滚动...)
_sendDocumentCommand
(
_param
)
{
if
(
!
_mcu
.
connected
)
{
...
...
src/apes/ApeConsts.js
查看文件 @
c44ad60
...
...
@@ -139,7 +139,7 @@ ApeConsts.DOC_ACTION_NORMAL=0;//无操作
ApeConsts
.
DOC_ACTION_SWITCH_DOC
=
1
;
//切换文档
ApeConsts
.
DOC_ACTION_SWITCH_PAGE
=
2
;
//文档翻页
ApeConsts
.
DOC_ACTION_COMMAND
=
3
;
//文档操作:滚动、缩放
ApeConsts
.
DOC_ACTION_SWITCH_ANIMATION
=
4
;
//文档页面上的动画切换
// defs for common session id
ApeConsts
.
CONFERENCE_SESSION_ID
=
11
;
...
...
src/apes/DocApe.js
查看文件 @
c44ad60
...
...
@@ -100,7 +100,7 @@ class DocApe extends Ape {
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
null
;
}
loger
.
log
(
"文档
===
updaterDoc "
,
_docDataModel
);
loger
.
log
(
"文档
->
updaterDoc "
,
_docDataModel
);
let
docDataModelPdu
=
this
.
packPdu
(
_docDataModel
,
_itemIdx
);
let
tableItemPdu
=
new
pdu
[
'RCRegistryTableItemPdu'
];
...
...
@@ -329,7 +329,6 @@ class DocApe extends Ape {
//切换文档
documentSwitchDoc
(
paramInfo
)
{
loger
.
log
(
'切换文档->'
,
paramInfo
);
if
(
GlobalConfig
.
isRecordPlayBack
)
{
loger
.
warn
(
'录制回放状态不允许切换文档'
);
return
;
...
...
@@ -353,6 +352,7 @@ class DocApe extends Ape {
if
(
oldDocModel
)
{
oldDocModel
.
action
=
ApeConsts
.
DOC_ACTION_NORMAL
;
oldDocModel
.
visible
=
false
;
//设置为不可见
oldDocModel
.
animationStep
=
1
;
//切换文档之后动画步数还原
}
}
...
...
@@ -367,6 +367,7 @@ class DocApe extends Ape {
//更新当前选择的文档数据的字段
docDataModel
.
action
=
ApeConsts
.
DOC_ACTION_SWITCH_DOC
;
docDataModel
.
visible
=
paramInfo
.
visible
||
false
;
//默认是false
docDataModel
.
animationStep
=
1
;
//切换文档之后动画步数还原
//loger.log('切换文档,当前文档和上一个显示的文档都需要更新状态');
loger
.
log
({
"oldDoc"
:
oldDocModel
,
"nowDoc"
:
docDataModel
});
...
...
@@ -388,19 +389,46 @@ class DocApe extends Ape {
//console.log(docDataModelPdu);
//console.log(docDataModel);
if
(
docDataModel
==
null
)
{
loger
.
log
(
'文档翻页->
,
文档不存在'
,
paramInfo
);
loger
.
log
(
'文档翻页->文档不存在'
,
paramInfo
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
//更新数据的字段
docDataModel
.
action
=
ApeConsts
.
DOC_ACTION_SWITCH_PAGE
;
docDataModel
.
curPageNo
=
parseInt
(
paramInfo
.
curPageNo
)
||
1
;
docDataModel
.
animationStep
=
1
;
//切换文档之后动画步数还原
if
(
docDataModel
.
curPageNo
<
1
)
{
docDataModel
.
curPageNo
=
1
;
//默认值最小是1
}
this
.
updaterDoc
(
docDataModel
,
docDataModel
.
itemIdx
);
}
//文档动画切换
documentSwitchAnimation
(
paramInfo
)
{
loger
.
log
(
'文档页面动画切换->'
,
paramInfo
);
//获取已经存在的数据
let
docDataModel
=
this
.
docList
[
GlobalConfig
.
activeDocId
];
if
(
docDataModel
==
null
)
{
loger
.
log
(
'文档页面动画切换->文档不存在'
,
GlobalConfig
.
activeDocId
,
paramInfo
);
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
return
;
}
//更新数据的字段
docDataModel
.
action
=
ApeConsts
.
DOC_ACTION_SWITCH_ANIMATION
;
docDataModel
.
animationStep
=
docDataModel
.
animationStep
||
1
;
//最少步骤是1
if
(
paramInfo
&&
paramInfo
.
step
==-
1
){
//上一个
docDataModel
.
animationStep
--
;
}
else
{
//下一个
docDataModel
.
animationStep
++
;
}
if
(
!
docDataModel
.
animationStep
||
docDataModel
.
animationStep
<
1
)
{
docDataModel
.
animationStep
=
1
;
//默认值最小是1
}
this
.
updaterDoc
(
docDataModel
,
docDataModel
.
itemIdx
);
}
//文档切换显示模式
documentSwitchShowModel
(
paramInfo
)
{
loger
.
log
(
'文档切换显示模式'
,
paramInfo
);
...
...
@@ -639,7 +667,7 @@ class DocApe extends Ape {
///////数据的封包和解包/////////////////////////////////////////
packPdu
(
_param
,
_itemIdx
)
{
loger
.
log
(
"文档
===
>packPdu"
);
loger
.
log
(
"文档
-
>packPdu"
);
//验证坐标点集合数组是否合法
if
(
_param
==
null
||
_itemIdx
==
null
)
{
this
.
_emit
(
MessageTypes
.
MCU_ERROR
,
MessageTypes
.
ERR_APE_INTERFACE_PARAM_WRONG
);
...
...
@@ -666,6 +694,7 @@ class DocApe extends Ape {
docModelPdu
.
fileName
=
_param
.
fileName
||
"doc_"
+
_itemIdx
;
//文档的名字
docModelPdu
.
dynamicTS
=
_param
.
dynamicTS
||
"0"
;
//文档上传后返回值中的字段dynamicTransferStatic
docModelPdu
.
showType
=
_param
.
showType
||
0
;
//文档显示模式
docModelPdu
.
animationStep
=
_param
.
animationStep
||
1
;
//当前页面上的动画步数(动态ppt时有这个字段)
//loger.log(docModelPdu);
return
docModelPdu
;
}
...
...
src/pdus/pro.js
查看文件 @
c44ad60
...
...
@@ -733,6 +733,7 @@ message RCDocSendDataModelPdu {
optional
string
dynamic_TS
=
17
;
//"dynamicTransferStatic": "0"
optional
string
md5
=
18
;
//md5
optional
uint32
show_type
=
19
;
//文档显示模式
optional
uint32
animation_step
=
20
[
default
=
1
];
//当前页码的动画步数
}
...
...
请
注册
或
登录
后发表评论