diff --git a/ChangeLog b/ChangeLog index 75c5081d..88d495cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +08-AUG-2020: 13.6.2 + +- Fixes origin for online PDF export + 07-AUG-2020: 13.6.1 - Improves Lucidchart importer diff --git a/VERSION b/VERSION index 15655743..cf51d242 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -13.6.1 \ No newline at end of file +13.6.2 \ No newline at end of file diff --git a/etc/build/build.xml b/etc/build/build.xml index 59827dca..1e3cca3d 100644 --- a/etc/build/build.xml +++ b/etc/build/build.xml @@ -446,7 +446,6 @@ - diff --git a/src/main/java/com/mxgraph/online/AbsAuthServlet.java b/src/main/java/com/mxgraph/online/AbsAuthServlet.java index f853aacb..9157aa0c 100644 --- a/src/main/java/com/mxgraph/online/AbsAuthServlet.java +++ b/src/main/java/com/mxgraph/online/AbsAuthServlet.java @@ -120,6 +120,12 @@ abstract public class AbsAuthServlet extends HttpServlet return ""; } + @SuppressWarnings("unchecked") + protected static void putCacheValue(String key, String val) + { + tokens.put(key, val); + } + /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ @@ -132,7 +138,7 @@ abstract public class AbsAuthServlet extends HttpServlet { String state = new BigInteger(256, random).toString(32); String key = new BigInteger(256, random).toString(32); - tokens.put(key, state); + putCacheValue(key, state); // log.log(Level.INFO, "AUTH-SERVLET: [" + request.getRemoteAddr() + "] Added state (" + key + " -> " + state + ")"); response.setStatus(HttpServletResponse.SC_OK); //Chrome blocks this cookie when draw.io is running in an iframe. The cookie is added to parent frame. TODO FIXME diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html index f28a3edc..3e548d06 100644 --- a/src/main/webapp/export3.html +++ b/src/main/webapp/export3.html @@ -676,7 +676,7 @@ { var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT; var scale = data.print? data.scale : 1 / graph.pageScale; - var autoOrigin = data.fit || false; + var autoOrigin = (mxIsElectron && data.fit != null) ? data.fit : false; var border = 0; // Negative coordinates are cropped or shifted if page visible @@ -691,7 +691,7 @@ scale *= printScale; // Starts at first visible page - if (autoOrigin) + if (!mxIsElectron || autoOrigin) { var layout = graph.getPageLayout(); x0 -= layout.x * pf.width; diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index d7365eea..b52c45ee 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -9648,7 +9648,7 @@ m=document.createElement("div");m.style.marginBottom="12px";var oa=PageSetupDial (this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible), this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var F=document.createElement("canvas"),H=new Image;H.onload=function(){try{F.getContext("2d").drawImage(H,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6
')))}catch(I){}})(); (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.6.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL; +(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.6.2";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL; EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron; EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1}, gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&& diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js index 3fff38ff..588f162f 100644 --- a/src/main/webapp/service-worker.js +++ b/src/main/webapp/service-worker.js @@ -6,7 +6,7 @@ if (workbox) workbox.precaching.precacheAndRoute([ { "url": "js/app.min.js", - "revision": "6ccf594dff7b37cf5cd177b8161f66f2" + "revision": "7e7c45bc007776d68602e367c2c1e546" }, { "url": "js/extensions.min.js",