正在显示
5 个修改的文件
包含
47 行增加
和
7 行删除
此 diff 太大无法显示。
| @@ -27,7 +27,7 @@ import Server from "config/Server"; | @@ -27,7 +27,7 @@ import Server from "config/Server"; | ||
| 27 | import UTF8 from 'utf-8'; | 27 | import UTF8 from 'utf-8'; |
| 28 | 28 | ||
| 29 | let loger = Loger.getLoger('McuClient'); | 29 | let loger = Loger.getLoger('McuClient'); |
| 30 | -let _sdkInfo = {"version": "v1.10.0.20170427", "author": "www.3mang.com"}; | 30 | +let _sdkInfo = {"version": "v1.10.2.20170428", "author": "www.3mang.com"}; |
| 31 | 31 | ||
| 32 | //APE | 32 | //APE |
| 33 | let _sass; | 33 | let _sass; |
| @@ -169,6 +169,7 @@ export default class MessageEntrance extends Emiter { | @@ -169,6 +169,7 @@ export default class MessageEntrance extends Emiter { | ||
| 169 | this.sendDocumentUpload = this._sendDocumentUpload.bind(this);//上传文档 | 169 | this.sendDocumentUpload = this._sendDocumentUpload.bind(this);//上传文档 |
| 170 | this.sendDocumentSwitchDoc = this._sendDocumentSwitchDoc.bind(this); //切换文档 | 170 | this.sendDocumentSwitchDoc = this._sendDocumentSwitchDoc.bind(this); //切换文档 |
| 171 | this.sendDocumentSwitchPage = this._sendDocumentSwitchPage.bind(this);//翻页 | 171 | this.sendDocumentSwitchPage = this._sendDocumentSwitchPage.bind(this);//翻页 |
| 172 | + this.sendDocumentSwitchAnimation=this._sendDocumentSwitchAnimation.bind(this);//切换当前页码的动画步骤 | ||
| 172 | this.sendDocumentDelete = this._sassDeleteDocument.bind(this); | 173 | this.sendDocumentDelete = this._sassDeleteDocument.bind(this); |
| 173 | this.sendDocBroadcastMsg = this._sendDocBroadcastMsg.bind(this); | 174 | this.sendDocBroadcastMsg = this._sendDocBroadcastMsg.bind(this); |
| 174 | //删除文档,先通过Sass删除,sass删除成功之后再同步mcu | 175 | //删除文档,先通过Sass删除,sass删除成功之后再同步mcu |
| @@ -1209,7 +1210,16 @@ export default class MessageEntrance extends Emiter { | @@ -1209,7 +1210,16 @@ export default class MessageEntrance extends Emiter { | ||
| 1209 | _doc_ape.documentSwitchPage(_param); | 1210 | _doc_ape.documentSwitchPage(_param); |
| 1210 | } | 1211 | } |
| 1211 | } | 1212 | } |
| 1212 | - | 1213 | + //操作文档(页码上的动画步骤操作) |
| 1214 | + _sendDocumentSwitchAnimation(_param){ | ||
| 1215 | + if (!_mcu.connected) { | ||
| 1216 | + loger.warn(GlobalConfig.getCurrentStatus()); | ||
| 1217 | + return; | ||
| 1218 | + } | ||
| 1219 | + if (_doc_ape) { | ||
| 1220 | + _doc_ape.documentSwitchAnimation(_param); | ||
| 1221 | + } | ||
| 1222 | + } | ||
| 1213 | //操作文档(缩放、滚动...) | 1223 | //操作文档(缩放、滚动...) |
| 1214 | _sendDocumentCommand(_param) { | 1224 | _sendDocumentCommand(_param) { |
| 1215 | if (!_mcu.connected) { | 1225 | if (!_mcu.connected) { |
| @@ -139,7 +139,7 @@ ApeConsts.DOC_ACTION_NORMAL=0;//无操作 | @@ -139,7 +139,7 @@ ApeConsts.DOC_ACTION_NORMAL=0;//无操作 | ||
| 139 | ApeConsts.DOC_ACTION_SWITCH_DOC=1;//切换文档 | 139 | ApeConsts.DOC_ACTION_SWITCH_DOC=1;//切换文档 |
| 140 | ApeConsts.DOC_ACTION_SWITCH_PAGE=2;//文档翻页 | 140 | ApeConsts.DOC_ACTION_SWITCH_PAGE=2;//文档翻页 |
| 141 | ApeConsts.DOC_ACTION_COMMAND=3;//文档操作:滚动、缩放 | 141 | ApeConsts.DOC_ACTION_COMMAND=3;//文档操作:滚动、缩放 |
| 142 | - | 142 | +ApeConsts.DOC_ACTION_SWITCH_ANIMATION=4;//文档页面上的动画切换 |
| 143 | 143 | ||
| 144 | // defs for common session id | 144 | // defs for common session id |
| 145 | ApeConsts.CONFERENCE_SESSION_ID = 11; | 145 | ApeConsts.CONFERENCE_SESSION_ID = 11; |
| @@ -100,7 +100,7 @@ class DocApe extends Ape { | @@ -100,7 +100,7 @@ class DocApe extends Ape { | ||
| 100 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | 100 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); |
| 101 | return null; | 101 | return null; |
| 102 | } | 102 | } |
| 103 | - loger.log("文档===updaterDoc ", _docDataModel); | 103 | + loger.log("文档->updaterDoc ", _docDataModel); |
| 104 | 104 | ||
| 105 | let docDataModelPdu = this.packPdu(_docDataModel, _itemIdx); | 105 | let docDataModelPdu = this.packPdu(_docDataModel, _itemIdx); |
| 106 | let tableItemPdu = new pdu['RCRegistryTableItemPdu']; | 106 | let tableItemPdu = new pdu['RCRegistryTableItemPdu']; |
| @@ -329,7 +329,6 @@ class DocApe extends Ape { | @@ -329,7 +329,6 @@ class DocApe extends Ape { | ||
| 329 | //切换文档 | 329 | //切换文档 |
| 330 | documentSwitchDoc(paramInfo) { | 330 | documentSwitchDoc(paramInfo) { |
| 331 | loger.log('切换文档->', paramInfo); | 331 | loger.log('切换文档->', paramInfo); |
| 332 | - | ||
| 333 | if (GlobalConfig.isRecordPlayBack) { | 332 | if (GlobalConfig.isRecordPlayBack) { |
| 334 | loger.warn('录制回放状态不允许切换文档'); | 333 | loger.warn('录制回放状态不允许切换文档'); |
| 335 | return; | 334 | return; |
| @@ -353,6 +352,7 @@ class DocApe extends Ape { | @@ -353,6 +352,7 @@ class DocApe extends Ape { | ||
| 353 | if (oldDocModel) { | 352 | if (oldDocModel) { |
| 354 | oldDocModel.action = ApeConsts.DOC_ACTION_NORMAL; | 353 | oldDocModel.action = ApeConsts.DOC_ACTION_NORMAL; |
| 355 | oldDocModel.visible = false;//设置为不可见 | 354 | oldDocModel.visible = false;//设置为不可见 |
| 355 | + oldDocModel.animationStep=1;//切换文档之后动画步数还原 | ||
| 356 | } | 356 | } |
| 357 | } | 357 | } |
| 358 | 358 | ||
| @@ -367,6 +367,7 @@ class DocApe extends Ape { | @@ -367,6 +367,7 @@ class DocApe extends Ape { | ||
| 367 | //更新当前选择的文档数据的字段 | 367 | //更新当前选择的文档数据的字段 |
| 368 | docDataModel.action = ApeConsts.DOC_ACTION_SWITCH_DOC; | 368 | docDataModel.action = ApeConsts.DOC_ACTION_SWITCH_DOC; |
| 369 | docDataModel.visible = paramInfo.visible || false;//默认是false | 369 | docDataModel.visible = paramInfo.visible || false;//默认是false |
| 370 | + docDataModel.animationStep=1;//切换文档之后动画步数还原 | ||
| 370 | 371 | ||
| 371 | //loger.log('切换文档,当前文档和上一个显示的文档都需要更新状态'); | 372 | //loger.log('切换文档,当前文档和上一个显示的文档都需要更新状态'); |
| 372 | loger.log({"oldDoc": oldDocModel, "nowDoc": docDataModel}); | 373 | loger.log({"oldDoc": oldDocModel, "nowDoc": docDataModel}); |
| @@ -388,19 +389,46 @@ class DocApe extends Ape { | @@ -388,19 +389,46 @@ class DocApe extends Ape { | ||
| 388 | //console.log(docDataModelPdu); | 389 | //console.log(docDataModelPdu); |
| 389 | //console.log(docDataModel); | 390 | //console.log(docDataModel); |
| 390 | if (docDataModel == null) { | 391 | if (docDataModel == null) { |
| 391 | - loger.log('文档翻页->,文档不存在', paramInfo); | 392 | + loger.log('文档翻页->文档不存在', paramInfo); |
| 392 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | 393 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); |
| 393 | return; | 394 | return; |
| 394 | } | 395 | } |
| 395 | //更新数据的字段 | 396 | //更新数据的字段 |
| 396 | docDataModel.action = ApeConsts.DOC_ACTION_SWITCH_PAGE; | 397 | docDataModel.action = ApeConsts.DOC_ACTION_SWITCH_PAGE; |
| 397 | docDataModel.curPageNo = parseInt(paramInfo.curPageNo) || 1; | 398 | docDataModel.curPageNo = parseInt(paramInfo.curPageNo) || 1; |
| 399 | + docDataModel.animationStep=1;//切换文档之后动画步数还原 | ||
| 398 | if (docDataModel.curPageNo < 1) { | 400 | if (docDataModel.curPageNo < 1) { |
| 399 | docDataModel.curPageNo = 1;//默认值最小是1 | 401 | docDataModel.curPageNo = 1;//默认值最小是1 |
| 400 | } | 402 | } |
| 401 | this.updaterDoc(docDataModel, docDataModel.itemIdx); | 403 | this.updaterDoc(docDataModel, docDataModel.itemIdx); |
| 402 | } | 404 | } |
| 403 | 405 | ||
| 406 | + //文档动画切换 | ||
| 407 | + documentSwitchAnimation(paramInfo) { | ||
| 408 | + loger.log('文档页面动画切换->',paramInfo); | ||
| 409 | + //获取已经存在的数据 | ||
| 410 | + let docDataModel = this.docList[GlobalConfig.activeDocId]; | ||
| 411 | + if (docDataModel == null) { | ||
| 412 | + loger.log('文档页面动画切换->文档不存在',GlobalConfig.activeDocId, paramInfo); | ||
| 413 | + this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | ||
| 414 | + return; | ||
| 415 | + } | ||
| 416 | + //更新数据的字段 | ||
| 417 | + docDataModel.action = ApeConsts.DOC_ACTION_SWITCH_ANIMATION; | ||
| 418 | + docDataModel.animationStep=docDataModel.animationStep||1;//最少步骤是1 | ||
| 419 | + if(paramInfo&¶mInfo.step==-1){ | ||
| 420 | + //上一个 | ||
| 421 | + docDataModel.animationStep--; | ||
| 422 | + }else{ | ||
| 423 | + //下一个 | ||
| 424 | + docDataModel.animationStep++; | ||
| 425 | + } | ||
| 426 | + if (!docDataModel.animationStep||docDataModel.animationStep < 1) { | ||
| 427 | + docDataModel.animationStep = 1;//默认值最小是1 | ||
| 428 | + } | ||
| 429 | + this.updaterDoc(docDataModel, docDataModel.itemIdx); | ||
| 430 | + } | ||
| 431 | + | ||
| 404 | //文档切换显示模式 | 432 | //文档切换显示模式 |
| 405 | documentSwitchShowModel(paramInfo) { | 433 | documentSwitchShowModel(paramInfo) { |
| 406 | loger.log('文档切换显示模式', paramInfo); | 434 | loger.log('文档切换显示模式', paramInfo); |
| @@ -639,7 +667,7 @@ class DocApe extends Ape { | @@ -639,7 +667,7 @@ class DocApe extends Ape { | ||
| 639 | 667 | ||
| 640 | ///////数据的封包和解包///////////////////////////////////////// | 668 | ///////数据的封包和解包///////////////////////////////////////// |
| 641 | packPdu(_param, _itemIdx) { | 669 | packPdu(_param, _itemIdx) { |
| 642 | - loger.log("文档===>packPdu"); | 670 | + loger.log("文档->packPdu"); |
| 643 | //验证坐标点集合数组是否合法 | 671 | //验证坐标点集合数组是否合法 |
| 644 | if (_param == null || _itemIdx == null) { | 672 | if (_param == null || _itemIdx == null) { |
| 645 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | 673 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); |
| @@ -666,6 +694,7 @@ class DocApe extends Ape { | @@ -666,6 +694,7 @@ class DocApe extends Ape { | ||
| 666 | docModelPdu.fileName = _param.fileName || "doc_" + _itemIdx;//文档的名字 | 694 | docModelPdu.fileName = _param.fileName || "doc_" + _itemIdx;//文档的名字 |
| 667 | docModelPdu.dynamicTS = _param.dynamicTS || "0";//文档上传后返回值中的字段dynamicTransferStatic | 695 | docModelPdu.dynamicTS = _param.dynamicTS || "0";//文档上传后返回值中的字段dynamicTransferStatic |
| 668 | docModelPdu.showType = _param.showType || 0;//文档显示模式 | 696 | docModelPdu.showType = _param.showType || 0;//文档显示模式 |
| 697 | + docModelPdu.animationStep=_param.animationStep || 1;//当前页面上的动画步数(动态ppt时有这个字段) | ||
| 669 | //loger.log(docModelPdu); | 698 | //loger.log(docModelPdu); |
| 670 | return docModelPdu; | 699 | return docModelPdu; |
| 671 | } | 700 | } |
| @@ -733,6 +733,7 @@ message RCDocSendDataModelPdu { | @@ -733,6 +733,7 @@ message RCDocSendDataModelPdu { | ||
| 733 | optional string dynamic_TS=17;//"dynamicTransferStatic": "0" | 733 | optional string dynamic_TS=17;//"dynamicTransferStatic": "0" |
| 734 | optional string md5=18;//md5 | 734 | optional string md5=18;//md5 |
| 735 | optional uint32 show_type=19;//文档显示模式 | 735 | optional uint32 show_type=19;//文档显示模式 |
| 736 | + optional uint32 animation_step=20 [default =1];//当前页码的动画步数 | ||
| 736 | 737 | ||
| 737 | } | 738 | } |
| 738 | 739 |
-
请 注册 或 登录 后发表评论