李勇

1.白板模块增加删除当前页所有标注和撤销上一步操作的两个接口

... ... @@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ }
/******/ var hotApplyOnUpdate = true;
/******/ var hotCurrentHash = "a8ff19203f3da9a01be5"; // eslint-disable-line no-unused-vars
/******/ var hotCurrentHash = "105140c15a6ca24bd951"; // eslint-disable-line no-unused-vars
/******/ var hotCurrentModuleData = {};
/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
... ... @@ -829,6 +829,7 @@ return /******/ (function(modules) { // webpackBootstrap
_this.sendInsertAnnotaion = _this._sendInsertAnnotaion;
//this.sendDeleteAnnotaion=this._sendDeleteAnnotaion;
_this.sendDeleteAllAnnotation = _this._sendDeleteAllAnnotation;
_this.sendDeleteCurPageAnnotation = _this._sendDeleteCurPageAnnotation;
_this.sendGotoPrev = _this._sendGotoPrev;
//DocApe
... ... @@ -1272,6 +1273,15 @@ return /******/ (function(modules) { // webpackBootstrap
_whiteboard_ape.sendDeleteAnnotaion(_param);
}
}
//删除当前页面上的所有标注
}, {
key: '_sendDeleteCurPageAnnotation',
value: function _sendDeleteCurPageAnnotation(_param) {
if (_whiteboard_ape) {
_whiteboard_ape.sendDeleteCurPageAnnotation(_param);
}
}
//删除所有标注
}, {
... ... @@ -1287,7 +1297,7 @@ return /******/ (function(modules) { // webpackBootstrap
key: '_sendGotoPrev',
value: function _sendGotoPrev(_param) {
if (_whiteboard_ape) {
_whiteboard_ape.gotoPrev(_param);
_whiteboard_ape.sendGotoPrev(_param);
}
}
... ... @@ -17300,8 +17310,8 @@ return /******/ (function(modules) { // webpackBootstrap
//撤销上一步
}, {
key: 'gotoPrev',
value: function gotoPrev() {
key: 'sendGotoPrev',
value: function sendGotoPrev() {
loger.log("白板返回上一步");
if (this.insertHistory == null || this.insertHistory.length < 1) {
loger.warn("无法继续上一步操作,已经没有可以撤销的数据");
... ... @@ -17310,14 +17320,25 @@ return /******/ (function(modules) { // webpackBootstrap
console.log(this.insertHistory);
this.sendDeleteAnnotaion(this.insertHistory.pop());
}
//删除当前页码的所有标注
}, {
key: 'sendDeleteCurPageAnnotation',
value: function sendDeleteCurPageAnnotation(_param) {
for (var key in this.annoInfos) {
var item = this.annoInfos[key];
if (item && item.parentId == _GlobalConfig2.default.activeDocId && item.curPageNo == _GlobalConfig2.default.activeDocCurPage) {
loger.log("sendDeleteCurPageAnnotation 删除当前页面上的标注", key);
this.sendDeleteAnnotaion({ "itemIdx": key });
}
}
}
//删除所有标注
}, {
key: 'sendDeleteAllAnnotation',
value: function sendDeleteAllAnnotation(_param) {
for (var key in this.annoInfos) {
//console.log("key:"+key);
console.log("删除白板数据,itemIdx:" + key);
this.sendDeleteAnnotaion({ "itemIdx": key });
}
}
... ... @@ -17571,7 +17592,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* whiteBoardModelPdu.parentId=_param.parentId||0;
whiteBoardModelPdu.curPage=_param.curPage||1;*/
whiteBoardModelPdu.parentId = _GlobalConfig2.default.activeDocId; //当前激活的文档id
whiteBoardModelPdu.parentId = GlobalCoig.activeDocId; //当前激活的文档id
whiteBoardModelPdu.curPageNo = _GlobalConfig2.default.activeDocCurPage; //当前激活的文档页码
whiteBoardModelPdu.pointGroup = _EngineUtils2.default.arrayToJsonString(_param.pointGroup);
... ...
... ... @@ -116,6 +116,7 @@ export default class MessageEntrance extends Emiter {
this.sendInsertAnnotaion=this._sendInsertAnnotaion;
//this.sendDeleteAnnotaion=this._sendDeleteAnnotaion;
this.sendDeleteAllAnnotation=this._sendDeleteAllAnnotation;
this.sendDeleteCurPageAnnotation=this._sendDeleteCurPageAnnotation;
this.sendGotoPrev=this._sendGotoPrev;
//DocApe
... ... @@ -498,6 +499,12 @@ export default class MessageEntrance extends Emiter {
_whiteboard_ape.sendDeleteAnnotaion(_param);
}
}
//删除当前页面上的所有标注
_sendDeleteCurPageAnnotation(_param){
if(_whiteboard_ape){
_whiteboard_ape.sendDeleteCurPageAnnotation(_param);
}
}
//删除所有标注
_sendDeleteAllAnnotation(_param){
if(_whiteboard_ape){
... ... @@ -507,7 +514,7 @@ export default class MessageEntrance extends Emiter {
//返回上一步标注
_sendGotoPrev(_param){
if(_whiteboard_ape){
_whiteboard_ape.gotoPrev(_param);
_whiteboard_ape.sendGotoPrev(_param);
}
}
... ...
... ... @@ -112,7 +112,7 @@ class WhiteBoardApe extends Ape {
this.sendUniform(adapterPdu,true);
}
//撤销上一步
gotoPrev(){
sendGotoPrev(){
loger.log("白板返回上一步");
if(this.insertHistory==null||this.insertHistory.length<1){
loger.warn("无法继续上一步操作,已经没有可以撤销的数据");
... ... @@ -121,11 +121,19 @@ class WhiteBoardApe extends Ape {
console.log(this.insertHistory);
this.sendDeleteAnnotaion(this.insertHistory.pop());
}
//删除当前页码的所有标注
sendDeleteCurPageAnnotation(_param){
for (let key in this.annoInfos){
let item=this.annoInfos[key];
if(item&&item.parentId==GlobalConfig.activeDocId&&item.curPageNo==GlobalConfig.activeDocCurPage){
loger.log("sendDeleteCurPageAnnotation 删除当前页面上的标注",key);
this.sendDeleteAnnotaion({"itemIdx":key});
}
}
}
//删除所有标注
sendDeleteAllAnnotation(_param){
for (let key in this.annoInfos){
//console.log("key:"+key);
console.log("删除白板数据,itemIdx:"+key);
this.sendDeleteAnnotaion({"itemIdx":key});
}
}
... ... @@ -356,7 +364,7 @@ class WhiteBoardApe extends Ape {
/* whiteBoardModelPdu.parentId=_param.parentId||0;
whiteBoardModelPdu.curPage=_param.curPage||1;*/
whiteBoardModelPdu.parentId=GlobalConfig.activeDocId;//当前激活的文档id
whiteBoardModelPdu.parentId=GlobalCoig.activeDocId;//当前激活的文档id
whiteBoardModelPdu.curPageNo=GlobalConfig.activeDocCurPage;//当前激活的文档页码
whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString(_param.pointGroup);
... ...