diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index b252226d4de6baf332ded59473797f6213f3ae7a..7cdba0a8754a8e8e21cb0a6ee1cc667b5a78702a 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 10/25/2019 01:44 PM +# 10/25/2019 02:01 PM app.html index.html?offline=1 diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 648ca6f8a0f3d74945c82fb6007d6cb170041e73..4469f2e76fe2e0a31f87d802230e8db64b0bafc9 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -8724,8 +8724,8 @@ null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.setti ("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFileSync=function(a){mxEventSource.call(this);this.lastActivity=new Date;this.clientId=Editor.guid();this.ui=a.ui;this.file=a;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener); this.activityListener=mxUtils.bind(this,function(a){this.lastActivity=new Date;this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.pusherErrorListener= mxUtils.bind(this,function(a){null!=a.error&&null!=a.error.data&&4004===a.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected()){if(!this.announced){var a=this.file.getCurrentUser(),b={a:"join"};null!=a&&(b.name=a.displayName,b.uid=a.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(b)))); -this.file.stats.msgSent++;this.announced=!0}this.fileChangedNotify()}});this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var b=this.stringToObject("x"+a);null!=b&&(EditorUi.debug("Sync.message",[this],b,a.length,"bytes"),b.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):b.v===DrawioFileSync.PROTOCOL&&null!=b.d&&this.handleMessageData(b.d))}catch(d){EditorUi.logError("Protocol Error in Client "+ -this.clientId,null,"Protocol_"+DrawioFileSync.PROTOCOL,d.message),null!=window.console&&console.log(d)}})};DrawioFileSync.PROTOCOL=6;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15; +this.file.stats.msgSent++;this.announced=!0}this.fileChangedNotify()}});this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var b=this.stringToObject(a);null!=b&&(EditorUi.debug("Sync.message",[this],b,a.length,"bytes"),b.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):b.v===DrawioFileSync.PROTOCOL&&null!=b.d&&this.handleMessageData(b.d))}catch(d){EditorUi.logError("Protocol Error in Client "+ +this.clientId,null,"protocol_"+DrawioFileSync.PROTOCOL,d.message),null!=window.console&&console.log(d)}})};DrawioFileSync.PROTOCOL=6;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15; DrawioFileSync.prototype.maxCacheReadyRetries=2;DrawioFileSync.prototype.cacheReadyDelay=500;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null; DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(a){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("Sync.start", [this])}catch(a){}this.installListeners()}window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=new Date;this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0))}};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1}; diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js index 44481b21b3bd13f844c61cebe77687e62c24434c..8369d5de53b3d4123966b11c1f3458be8a94d64c 100644 --- a/src/main/webapp/js/diagramly/DrawioFileSync.js +++ b/src/main/webapp/js/diagramly/DrawioFileSync.js @@ -113,7 +113,7 @@ DrawioFileSync = function(file) { try { - var msg = this.stringToObject('x'+data); + var msg = this.stringToObject(data); if (msg != null) { @@ -141,7 +141,7 @@ DrawioFileSync = function(file) // // Callback adds cancel option // }), e.message); EditorUi.logError('Protocol Error in Client ' + this.clientId, - null, 'Protocol_' + DrawioFileSync.PROTOCOL, + null, 'protocol_' + DrawioFileSync.PROTOCOL, e.message); if (window.console != null)