diff --git a/ChangeLog b/ChangeLog index 49169f7f3..2a2ec9839 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +09-MAR-2024: 24.0.4 + +- [conf cloud] Fixes copied pages with embed upload macro editing [DID-11003] + 08-MAR-2024: 24.0.3 - [conf cloud] Enables direct editing without custom content diff --git a/VERSION b/VERSION index bef04d148..df7b570e3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.0.3 \ No newline at end of file +24.0.4 \ No newline at end of file diff --git a/src/main/mxgraph/handler/mxEdgeSegmentHandler.js b/src/main/mxgraph/handler/mxEdgeSegmentHandler.js index 7b0db040c..cca0fc20a 100644 --- a/src/main/mxgraph/handler/mxEdgeSegmentHandler.js +++ b/src/main/mxgraph/handler/mxEdgeSegmentHandler.js @@ -296,45 +296,47 @@ mxEdgeSegmentHandler.prototype.start = function(x, y, index) mxEdgeSegmentHandler.prototype.createBends = function() { var bends = []; - - // Source - var bend = this.createHandleShape(0); - this.initBend(bend); - bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE); - bends.push(bend); - var pts = this.getCurrentPoints(); - // Waypoints (segment handles) - if (this.graph.isCellBendable(this.state.cell)) + if (pts != null) { - if (this.points == null) - { - this.points = []; - } + // Source + var bend = this.createHandleShape(0); + this.initBend(bend); + bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE); + bends.push(bend); - for (var i = 0; i < pts.length - 1; i++) + // Waypoints (segment handles) + if (this.graph.isCellBendable(this.state.cell)) { - bend = this.createVirtualBend(); - bends.push(bend); - var horizontal = Math.round(pts[i].x - pts[i + 1].x) == 0; - - // Special case where dy is 0 as well - if (Math.round(pts[i].y - pts[i + 1].y) == 0 && i < pts.length - 2) + if (this.points == null) { - horizontal = Math.round(pts[i].x - pts[i + 2].x) == 0; + this.points = []; + } + + for (var i = 0; i < pts.length - 1; i++) + { + bend = this.createVirtualBend(); + bends.push(bend); + var horizontal = Math.round(pts[i].x - pts[i + 1].x) == 0; + + // Special case where dy is 0 as well + if (Math.round(pts[i].y - pts[i + 1].y) == 0 && i < pts.length - 2) + { + horizontal = Math.round(pts[i].x - pts[i + 2].x) == 0; + } + + bend.setCursor((horizontal) ? 'col-resize' : 'row-resize'); + this.points.push(new mxPoint(0,0)); } - - bend.setCursor((horizontal) ? 'col-resize' : 'row-resize'); - this.points.push(new mxPoint(0,0)); } - } - // Target - var bend = this.createHandleShape(pts.length, null, true); - this.initBend(bend); - bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE); - bends.push(bend); + // Target + var bend = this.createHandleShape(pts.length, null, true); + this.initBend(bend); + bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE); + bends.push(bend); + } return bends; }; diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 827aa8d47..f694b54d3 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -146,7 +146,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -1903,8 +1903,8 @@ l=this.state.absolutePoints;if(0==k.length&&(0==Math.round(e[0].x-e[e.length-1]. g,!1))n=this.graph.getConnectionPoint(g,l),null!=n&&(this.convertPoint(n,!1),k=n.y);k=[new mxPoint(b.x,e),new mxPoint(b.x,k)]}this.points=k;a.view.updateFixedTerminalPoints(a,f,g);a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)}}; mxEdgeSegmentHandler.prototype.connect=function(a,b,c,d,e){var f=this.graph.getModel(),g=f.getGeometry(a),k=null;if(null!=g&&null!=g.points&&0L||!u&&0wa)for(ya=0;ya>wa;ya--)this.model.remove(xa[xa.length+ya-1]);xa=this.model.getChildCells(u[ea],!0);for(ya=0;yawa)for(ya=0;ya>wa;ya--)this.model.remove(xa[xa.length+ya-1]);xa=this.model.getChildCells(u[ea],!0);for(ya=0;yamxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P)&&B.push(P):this.labelChanged(u[E],"")}else{if(this.isTableRow(u[E])&&(P=this.model.getParent(u[E]),0>mxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P))){for(var W=this.model.getChildCells(P,!0),ja=0,ea=0;eav&&m++;q++}t.length"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD, -P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px": -mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? -Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&& -this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style, -mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue; -mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length-5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K= -mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&& -this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale; -return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint= -a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint= -function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E):null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border)); -B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR); -A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&& -mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var E=0;E'); +this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);u=Graph.createTabNode(u);B.insertNode(u);B.setStartAfter(u);B.setEndAfter(u);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(u,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var E=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&& +null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(W){L||E||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):P=!1});(P||E)&&this.graph.cellEditor.setAlign(u)}E||document.execCommand("justify"+u.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var A=[],B=0,E=u.rangeCount;B"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT), +L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight= +mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML= +this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor"; +var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!= +ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width= +160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow= +"auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length- +5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u, +A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style, +mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u? +b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width- +this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E): +null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)|| +(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state); +this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var E=0;E'); Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= Graph.createSvgImage(18,18,'');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,''); HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); @@ -3163,42 +3164,42 @@ G.style.marginLeft="0px";G.style.paddingTop="4px";G.style.paddingBottom="4px";G. rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(z=0;z=za.length||fa[u]!=za[u].node||fa[u]==za[u].node&&fa[u].getAttribute("color")!=za[u].color){za=fa[u].firstChild;if(null!=za&&"A"==za.nodeName&&null==za.nextSibling&&null!=za.firstChild){fa[u].parentNode.insertBefore(za,fa[u]);for(Ia=za.firstChild;null!=Ia;){var A=Ia.nextSibling;fa[u].appendChild(Ia);Ia= -A}za.appendChild(fa[u])}break}}else document.execCommand("forecolor",!1,fa!=mxConstants.NONE?fa:"transparent"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[fa],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:f.shapeForegroundColor,{install:function(fa){V=fa},destroy:function(){V=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(fa){ra.style.display= +f.shapeForegroundColor);ha.style.fontWeight="bold";n=1<=g.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle();n=f.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ka},function(fa){if(mxClient.IS_FF){for(var Ia=f.cellEditor.textarea.getElementsByTagName("font"),Aa=[],u=0;u=Aa.length||fa[u]!=Aa[u].node||fa[u]==Aa[u].node&&fa[u].getAttribute("color")!=Aa[u].color){Aa=fa[u].firstChild;if(null!=Aa&&"A"==Aa.nodeName&&null==Aa.nextSibling&&null!=Aa.firstChild){fa[u].parentNode.insertBefore(Aa,fa[u]);for(Ia=Aa.firstChild;null!=Ia;){var A=Ia.nextSibling;fa[u].appendChild(Ia);Ia= +A}Aa.appendChild(fa[u])}break}}else document.execCommand("forecolor",!1,fa!=mxConstants.NONE?fa:"transparent"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[fa],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:f.shapeForegroundColor,{install:function(fa){V=fa},destroy:function(){V=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(fa){ra.style.display= fa==mxConstants.NONE?"none":"";ha.style.display=ra.style.display},function(fa){fa==mxConstants.NONE?f.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):f.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);f.setCellStyles(mxConstants.STYLE_FONTCOLOR,fa,g.cells);f.updateLabelElements(g.cells,function(Ia){Ia.removeAttribute("color");Ia.style.color=null})},f.shapeForegroundColor);n.style.fontWeight="bold";h.appendChild(n);h.appendChild(ra);f.cellEditor.isContentEditing()||h.appendChild(ha);a.appendChild(h); h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";n=f.filterSelectionCells(mxUtils.bind(this,function(fa){var Ia=f.view.getState(fa);return null==Ia||f.isAutoSizeState(Ia)||f.getModel().isEdge(fa)||!f.isTableRow(fa)&&!f.isTableCell(fa)&&!f.isCellResizable(fa)}));w=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,n);w.style.fontWeight="bold";0"+f.cellEditor.textarea.innerHTML+"

"),za=[f.cellEditor.textarea.firstChild]);for(var u=0;u"+f.cellEditor.textarea.innerHTML+"

"),Aa=[f.cellEditor.textarea.firstChild]);for(var u=0;uz;z++)(function(fa){mxEvent.addListener(l[fa], -"click",function(){b(l[fa],""==l[fa].style.backgroundImage)})})(z);var Xa=mxUtils.bind(this,function(fa,Ia,za){g=e.getSelectionState();fa=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(fa&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1],(fa&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(fa&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);r.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(p,"0"==mxUtils.getValue(g.style, -mxConstants.STYLE_HORIZONTAL,"1"));if(za||document.activeElement!=T)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(fa)?"":fa+" pt";fa=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(C,fa==mxConstants.ALIGN_LEFT);b(F,fa==mxConstants.ALIGN_CENTER);b(D,fa==mxConstants.ALIGN_RIGHT);fa=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(I,fa==mxConstants.ALIGN_TOP);b(J,fa== +"click",function(){b(l[fa],""==l[fa].style.backgroundImage)})})(z);var Xa=mxUtils.bind(this,function(fa,Ia,Aa){g=e.getSelectionState();fa=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(fa&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1],(fa&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(fa&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);r.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(p,"0"==mxUtils.getValue(g.style, +mxConstants.STYLE_HORIZONTAL,"1"));if(Aa||document.activeElement!=T)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(fa)?"":fa+" pt";fa=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(C,fa==mxConstants.ALIGN_LEFT);b(F,fa==mxConstants.ALIGN_CENTER);b(D,fa==mxConstants.ALIGN_RIGHT);fa=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(I,fa==mxConstants.ALIGN_TOP);b(J,fa== mxConstants.ALIGN_MIDDLE);b(O,fa==mxConstants.ALIGN_BOTTOM);fa=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);Ia=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);aa.value=fa==mxConstants.ALIGN_LEFT&&Ia==mxConstants.ALIGN_TOP?"topLeft":fa==mxConstants.ALIGN_CENTER&&Ia==mxConstants.ALIGN_TOP?"top":fa==mxConstants.ALIGN_RIGHT&&Ia==mxConstants.ALIGN_TOP?"topRight":fa==mxConstants.ALIGN_LEFT&&Ia==mxConstants.ALIGN_BOTTOM? "bottomLeft":fa==mxConstants.ALIGN_CENTER&&Ia==mxConstants.ALIGN_BOTTOM?"bottom":fa==mxConstants.ALIGN_RIGHT&&Ia==mxConstants.ALIGN_BOTTOM?"bottomRight":fa==mxConstants.ALIGN_LEFT?"left":fa==mxConstants.ALIGN_RIGHT?"right":"center";fa=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);fa==mxConstants.TEXT_DIRECTION_RTL?la.value="rightToLeft":fa==mxConstants.TEXT_DIRECTION_LTR?la.value="leftToRight":fa!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?fa==mxConstants.TEXT_DIRECTION_VERTICAL_LR? -la.value="vertical-leftToRight":fa==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(la.value="vertical-rightToLeft"):la.value="automatic";if(za||document.activeElement!=Ca)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ca.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=va)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),va.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=Fa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT, -0)),Fa.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=Na)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Na.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=Qa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(fa)?"":fa+" pt"});var hb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var fb=this.installInputHandler(va,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var ib=this.installInputHandler(Fa, +la.value="vertical-leftToRight":fa==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(la.value="vertical-rightToLeft"):la.value="automatic";if(Aa||document.activeElement!=Ca)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ca.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=va)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),va.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Fa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT, +0)),Fa.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Na)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Na.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Qa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(fa)?"":fa+" pt"});var hb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var fb=this.installInputHandler(va,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var ib=this.installInputHandler(Fa, mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var eb=this.installInputHandler(Na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var gb=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(T,Xa);this.addKeyHandler(Ca,Xa);this.addKeyHandler(va,Xa);this.addKeyHandler(Fa,Xa);this.addKeyHandler(Na,Xa);this.addKeyHandler(Qa,Xa);f.getModel().addListener(mxEvent.CHANGE,Xa);this.listeners.push({destroy:function(){f.getModel().removeListener(Xa)}});Xa();if(f.cellEditor.isContentEditing()){var jb= -null,cb=!1;d=mxUtils.bind(this,function(){cb||(cb=!0,window.setTimeout(mxUtils.bind(this,function(){var fa=f.getSelectedEditingElement();if(null!=fa){var Ia=function(xa,Aa){if(null!=xa&&null!=Aa){if(xa==Aa)return!0;if(xa.length>Aa.length+1)return xa.substring(xa.length-Aa.length-1,xa.length)=="-"+Aa}return!1},za=function(xa){if(null!=f.getParentByName(fa,xa,f.cellEditor.textarea))return!0;for(var Aa=fa;null!=Aa&&1==Aa.childNodes.length;)if(Aa=Aa.childNodes[0],Aa.nodeName==xa)return!0;return!1},u= -function(xa){xa=null!=xa?xa.fontSize:null;return null!=xa&&"px"==xa.substring(xa.length-2)?parseFloat(xa):mxConstants.DEFAULT_FONTSIZE},A=function(xa,Aa,wa){return null!=wa.style&&null!=Aa?(Aa=Aa.lineHeight,null!=wa.style.lineHeight&&"%"==wa.style.lineHeight.substring(wa.style.lineHeight.length-1)?parseInt(wa.style.lineHeight)/100:"px"==Aa.substring(Aa.length-2)?parseFloat(Aa)/xa:parseInt(Aa)):""},B=function(xa){for(;null!=xa&&xa!=f.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa; -xa=xa.parentNode}return null},E=mxUtils.getCurrentStyle(fa),L=u(E),P=A(L,E,fa),W=fa.getElementsByTagName("*");if(0za.length+1)return xa.substring(xa.length-za.length-1,xa.length)=="-"+za}return!1},Aa=function(xa){if(null!=f.getParentByName(fa,xa,f.cellEditor.textarea))return!0;for(var za=fa;null!=za&&1==za.childNodes.length;)if(za=za.childNodes[0],za.nodeName==xa)return!0;return!1},u= +function(xa){xa=null!=xa?xa.fontSize:null;return null!=xa&&"px"==xa.substring(xa.length-2)?parseFloat(xa):mxConstants.DEFAULT_FONTSIZE},A=function(xa,za,wa){return null!=wa.style&&null!=za?(za=za.lineHeight,null!=wa.style.lineHeight&&"%"==wa.style.lineHeight.substring(wa.style.lineHeight.length-1)?parseInt(wa.style.lineHeight)/100:"px"==za.substring(za.length-2)?parseFloat(za)/xa:parseInt(za)):""},B=function(xa){for(;null!=xa&&xa!=f.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa; +xa=xa.parentNode}return null},E=mxUtils.getCurrentStyle(fa),L=u(E),P=A(L,E,fa),W=fa.getElementsByTagName("*");if(05*c&&m.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,k));t>8*c&&m.push(new mxConnectionConstraint(new mxPoint(0, @@ -11985,7 +11986,7 @@ N(!0)});aa.className="geBtn gePrimaryBtn";z.appendChild(aa);l.editor.cancelFirst this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else K.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 Q=document.createElement("canvas"),O=new Image;O.onload=function(){try{Q.getContext("2d").drawImage(O,0,0);var l=Q.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6
')))}catch(l){}Editor.prototype.useCanvasForExport= !1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="24.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="24.0.4";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=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=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" "); 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"}}; diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js index 8890c665b..601fa378c 100644 --- a/src/main/webapp/js/grapheditor/Graph.js +++ b/src/main/webapp/js/grapheditor/Graph.js @@ -13287,40 +13287,44 @@ if (typeof mxVertexHandler !== 'undefined') mxCellEditor.prototype.alignText = function(align, evt) { var state = this.graph.getView().getState(this.editingCell); - var dir = mxUtils.getValue(state.style, mxConstants.STYLE_TEXT_DIRECTION, - mxConstants.DEFAULT_TEXT_DIRECTION); - var vertical = dir != null && dir.substring(0, 9) == 'vertical-'; - var shiftPressed = evt != null && mxEvent.isShiftDown(evt); - - if (shiftPressed || (window.getSelection != null && - window.getSelection().containsNode != null)) + + if (state != null) { - var allSelected = true; + var dir = mxUtils.getValue(state.style, mxConstants.STYLE_TEXT_DIRECTION, + mxConstants.DEFAULT_TEXT_DIRECTION); + var vertical = dir != null && dir.substring(0, 9) == 'vertical-'; + var shiftPressed = evt != null && mxEvent.isShiftDown(evt); - this.graph.processElements(this.textarea, function(node) + if (shiftPressed || (window.getSelection != null && + window.getSelection().containsNode != null)) { - if (shiftPressed || vertical || - window.getSelection().containsNode(node, true)) + var allSelected = true; + + this.graph.processElements(this.textarea, function(node) { - node.removeAttribute('align'); - node.style.textAlign = null; - } - else + if (shiftPressed || vertical || + window.getSelection().containsNode(node, true)) + { + node.removeAttribute('align'); + node.style.textAlign = null; + } + else + { + allSelected = false; + } + }); + + if (allSelected || vertical) { - allSelected = false; + this.graph.cellEditor.setAlign(align); } - }); + } - if (allSelected || vertical) + if (!vertical) { - this.graph.cellEditor.setAlign(align); + document.execCommand('justify' + align.toLowerCase(), false, null); } } - - if (!vertical) - { - document.execCommand('justify' + align.toLowerCase(), false, null); - } }; /** @@ -15541,24 +15545,27 @@ if (typeof mxVertexHandler !== 'undefined') tmp.innerHTML = Graph.sanitizeHtml(this.graph.getLabel(this.state.cell)); var anchor = tmp.getElementsByTagName('a')[index]; - if (value == null || value == '') + if (anchor != null) { - var child = anchor.cloneNode(true).firstChild; + if (value == null || value == '') + { + var child = anchor.cloneNode(true).firstChild; - while (child != null) + while (child != null) + { + anchor.parentNode.insertBefore(child.cloneNode(true), anchor); + child = child.nextSibling; + } + + anchor.parentNode.removeChild(anchor); + } + else { - anchor.parentNode.insertBefore(child.cloneNode(true), anchor); - child = child.nextSibling; + anchor.setAttribute('href', value); } - - anchor.parentNode.removeChild(anchor); - } - else - { - anchor.setAttribute('href', value); - } - this.graph.labelChanged(this.state.cell, tmp.innerHTML); + this.graph.labelChanged(this.state.cell, tmp.innerHTML); + } }); mxEvent.addListener(changeLink, 'click', mxUtils.bind(this, function(evt) diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js index 15ee11f0b..08770622c 100644 --- a/src/main/webapp/js/integrate.min.js +++ b/src/main/webapp/js/integrate.min.js @@ -146,7 +146,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -1903,8 +1903,8 @@ l=this.state.absolutePoints;if(0==k.length&&(0==Math.round(e[0].x-e[e.length-1]. g,!1))n=this.graph.getConnectionPoint(g,l),null!=n&&(this.convertPoint(n,!1),k=n.y);k=[new mxPoint(b.x,e),new mxPoint(b.x,k)]}this.points=k;a.view.updateFixedTerminalPoints(a,f,g);a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)}}; mxEdgeSegmentHandler.prototype.connect=function(a,b,c,d,e){var f=this.graph.getModel(),g=f.getGeometry(a),k=null;if(null!=g&&null!=g.points&&0L||!u&&0wa)for(ya=0;ya>wa;ya--)this.model.remove(xa[xa.length+ya-1]);xa=this.model.getChildCells(u[ea],!0);for(ya=0;yawa)for(ya=0;ya>wa;ya--)this.model.remove(xa[xa.length+ya-1]);xa=this.model.getChildCells(u[ea],!0);for(ya=0;yamxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P)&&B.push(P):this.labelChanged(u[E],"")}else{if(this.isTableRow(u[E])&&(P=this.model.getParent(u[E]),0>mxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P))){for(var W=this.model.getChildCells(P,!0),ja=0,ea=0;eav&&m++;q++}t.length"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD, -P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px": -mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? -Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&& -this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style, -mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue; -mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length-5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K= -mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&& -this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale; -return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint= -a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint= -function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E):null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border)); -B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR); -A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&& -mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var E=0;E'); +this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);u=Graph.createTabNode(u);B.insertNode(u);B.setStartAfter(u);B.setEndAfter(u);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(u,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var E=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&& +null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(W){L||E||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):P=!1});(P||E)&&this.graph.cellEditor.setAlign(u)}E||document.execCommand("justify"+u.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var A=[],B=0,E=u.rangeCount;B"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT), +L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight= +mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML= +this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor"; +var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!= +ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width= +160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow= +"auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length- +5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u, +A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style, +mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u? +b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width- +this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E): +null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)|| +(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state); +this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var E=0;E'); Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= Graph.createSvgImage(18,18,'');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,''); HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'',32,20); @@ -3163,42 +3164,42 @@ G.style.marginLeft="0px";G.style.paddingTop="4px";G.style.paddingBottom="4px";G. rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(z=0;z=za.length||fa[u]!=za[u].node||fa[u]==za[u].node&&fa[u].getAttribute("color")!=za[u].color){za=fa[u].firstChild;if(null!=za&&"A"==za.nodeName&&null==za.nextSibling&&null!=za.firstChild){fa[u].parentNode.insertBefore(za,fa[u]);for(Ia=za.firstChild;null!=Ia;){var A=Ia.nextSibling;fa[u].appendChild(Ia);Ia= -A}za.appendChild(fa[u])}break}}else document.execCommand("forecolor",!1,fa!=mxConstants.NONE?fa:"transparent"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[fa],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:f.shapeForegroundColor,{install:function(fa){V=fa},destroy:function(){V=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(fa){ra.style.display= +f.shapeForegroundColor);ha.style.fontWeight="bold";n=1<=g.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle();n=f.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ka},function(fa){if(mxClient.IS_FF){for(var Ia=f.cellEditor.textarea.getElementsByTagName("font"),Aa=[],u=0;u=Aa.length||fa[u]!=Aa[u].node||fa[u]==Aa[u].node&&fa[u].getAttribute("color")!=Aa[u].color){Aa=fa[u].firstChild;if(null!=Aa&&"A"==Aa.nodeName&&null==Aa.nextSibling&&null!=Aa.firstChild){fa[u].parentNode.insertBefore(Aa,fa[u]);for(Ia=Aa.firstChild;null!=Ia;){var A=Ia.nextSibling;fa[u].appendChild(Ia);Ia= +A}Aa.appendChild(fa[u])}break}}else document.execCommand("forecolor",!1,fa!=mxConstants.NONE?fa:"transparent"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[fa],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:f.shapeForegroundColor,{install:function(fa){V=fa},destroy:function(){V=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(fa){ra.style.display= fa==mxConstants.NONE?"none":"";ha.style.display=ra.style.display},function(fa){fa==mxConstants.NONE?f.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):f.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);f.setCellStyles(mxConstants.STYLE_FONTCOLOR,fa,g.cells);f.updateLabelElements(g.cells,function(Ia){Ia.removeAttribute("color");Ia.style.color=null})},f.shapeForegroundColor);n.style.fontWeight="bold";h.appendChild(n);h.appendChild(ra);f.cellEditor.isContentEditing()||h.appendChild(ha);a.appendChild(h); h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";n=f.filterSelectionCells(mxUtils.bind(this,function(fa){var Ia=f.view.getState(fa);return null==Ia||f.isAutoSizeState(Ia)||f.getModel().isEdge(fa)||!f.isTableRow(fa)&&!f.isTableCell(fa)&&!f.isCellResizable(fa)}));w=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,n);w.style.fontWeight="bold";0"+f.cellEditor.textarea.innerHTML+"

"),za=[f.cellEditor.textarea.firstChild]);for(var u=0;u"+f.cellEditor.textarea.innerHTML+"

"),Aa=[f.cellEditor.textarea.firstChild]);for(var u=0;uz;z++)(function(fa){mxEvent.addListener(l[fa], -"click",function(){b(l[fa],""==l[fa].style.backgroundImage)})})(z);var Xa=mxUtils.bind(this,function(fa,Ia,za){g=e.getSelectionState();fa=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(fa&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1],(fa&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(fa&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);r.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(p,"0"==mxUtils.getValue(g.style, -mxConstants.STYLE_HORIZONTAL,"1"));if(za||document.activeElement!=T)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(fa)?"":fa+" pt";fa=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(C,fa==mxConstants.ALIGN_LEFT);b(F,fa==mxConstants.ALIGN_CENTER);b(D,fa==mxConstants.ALIGN_RIGHT);fa=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(I,fa==mxConstants.ALIGN_TOP);b(J,fa== +"click",function(){b(l[fa],""==l[fa].style.backgroundImage)})})(z);var Xa=mxUtils.bind(this,function(fa,Ia,Aa){g=e.getSelectionState();fa=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(fa&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1],(fa&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(fa&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);r.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(p,"0"==mxUtils.getValue(g.style, +mxConstants.STYLE_HORIZONTAL,"1"));if(Aa||document.activeElement!=T)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(fa)?"":fa+" pt";fa=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(C,fa==mxConstants.ALIGN_LEFT);b(F,fa==mxConstants.ALIGN_CENTER);b(D,fa==mxConstants.ALIGN_RIGHT);fa=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(I,fa==mxConstants.ALIGN_TOP);b(J,fa== mxConstants.ALIGN_MIDDLE);b(O,fa==mxConstants.ALIGN_BOTTOM);fa=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);Ia=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);aa.value=fa==mxConstants.ALIGN_LEFT&&Ia==mxConstants.ALIGN_TOP?"topLeft":fa==mxConstants.ALIGN_CENTER&&Ia==mxConstants.ALIGN_TOP?"top":fa==mxConstants.ALIGN_RIGHT&&Ia==mxConstants.ALIGN_TOP?"topRight":fa==mxConstants.ALIGN_LEFT&&Ia==mxConstants.ALIGN_BOTTOM? "bottomLeft":fa==mxConstants.ALIGN_CENTER&&Ia==mxConstants.ALIGN_BOTTOM?"bottom":fa==mxConstants.ALIGN_RIGHT&&Ia==mxConstants.ALIGN_BOTTOM?"bottomRight":fa==mxConstants.ALIGN_LEFT?"left":fa==mxConstants.ALIGN_RIGHT?"right":"center";fa=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);fa==mxConstants.TEXT_DIRECTION_RTL?la.value="rightToLeft":fa==mxConstants.TEXT_DIRECTION_LTR?la.value="leftToRight":fa!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?fa==mxConstants.TEXT_DIRECTION_VERTICAL_LR? -la.value="vertical-leftToRight":fa==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(la.value="vertical-rightToLeft"):la.value="automatic";if(za||document.activeElement!=Ca)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ca.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=va)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),va.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=Fa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT, -0)),Fa.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=Na)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Na.value=isNaN(fa)?"":fa+" pt";if(za||document.activeElement!=Qa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(fa)?"":fa+" pt"});var hb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var fb=this.installInputHandler(va,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var ib=this.installInputHandler(Fa, +la.value="vertical-leftToRight":fa==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(la.value="vertical-rightToLeft"):la.value="automatic";if(Aa||document.activeElement!=Ca)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ca.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=va)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),va.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Fa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT, +0)),Fa.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Na)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Na.value=isNaN(fa)?"":fa+" pt";if(Aa||document.activeElement!=Qa)fa=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Qa.value=isNaN(fa)?"":fa+" pt"});var hb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING,2,-999,999," pt");var fb=this.installInputHandler(va,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var ib=this.installInputHandler(Fa, mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var eb=this.installInputHandler(Na,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var gb=this.installInputHandler(Qa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(T,Xa);this.addKeyHandler(Ca,Xa);this.addKeyHandler(va,Xa);this.addKeyHandler(Fa,Xa);this.addKeyHandler(Na,Xa);this.addKeyHandler(Qa,Xa);f.getModel().addListener(mxEvent.CHANGE,Xa);this.listeners.push({destroy:function(){f.getModel().removeListener(Xa)}});Xa();if(f.cellEditor.isContentEditing()){var jb= -null,cb=!1;d=mxUtils.bind(this,function(){cb||(cb=!0,window.setTimeout(mxUtils.bind(this,function(){var fa=f.getSelectedEditingElement();if(null!=fa){var Ia=function(xa,Aa){if(null!=xa&&null!=Aa){if(xa==Aa)return!0;if(xa.length>Aa.length+1)return xa.substring(xa.length-Aa.length-1,xa.length)=="-"+Aa}return!1},za=function(xa){if(null!=f.getParentByName(fa,xa,f.cellEditor.textarea))return!0;for(var Aa=fa;null!=Aa&&1==Aa.childNodes.length;)if(Aa=Aa.childNodes[0],Aa.nodeName==xa)return!0;return!1},u= -function(xa){xa=null!=xa?xa.fontSize:null;return null!=xa&&"px"==xa.substring(xa.length-2)?parseFloat(xa):mxConstants.DEFAULT_FONTSIZE},A=function(xa,Aa,wa){return null!=wa.style&&null!=Aa?(Aa=Aa.lineHeight,null!=wa.style.lineHeight&&"%"==wa.style.lineHeight.substring(wa.style.lineHeight.length-1)?parseInt(wa.style.lineHeight)/100:"px"==Aa.substring(Aa.length-2)?parseFloat(Aa)/xa:parseInt(Aa)):""},B=function(xa){for(;null!=xa&&xa!=f.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa; -xa=xa.parentNode}return null},E=mxUtils.getCurrentStyle(fa),L=u(E),P=A(L,E,fa),W=fa.getElementsByTagName("*");if(0za.length+1)return xa.substring(xa.length-za.length-1,xa.length)=="-"+za}return!1},Aa=function(xa){if(null!=f.getParentByName(fa,xa,f.cellEditor.textarea))return!0;for(var za=fa;null!=za&&1==za.childNodes.length;)if(za=za.childNodes[0],za.nodeName==xa)return!0;return!1},u= +function(xa){xa=null!=xa?xa.fontSize:null;return null!=xa&&"px"==xa.substring(xa.length-2)?parseFloat(xa):mxConstants.DEFAULT_FONTSIZE},A=function(xa,za,wa){return null!=wa.style&&null!=za?(za=za.lineHeight,null!=wa.style.lineHeight&&"%"==wa.style.lineHeight.substring(wa.style.lineHeight.length-1)?parseInt(wa.style.lineHeight)/100:"px"==za.substring(za.length-2)?parseFloat(za)/xa:parseInt(za)):""},B=function(xa){for(;null!=xa&&xa!=f.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa; +xa=xa.parentNode}return null},E=mxUtils.getCurrentStyle(fa),L=u(E),P=A(L,E,fa),W=fa.getElementsByTagName("*");if(05*c&&m.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,k));t>8*c&&m.push(new mxConnectionConstraint(new mxPoint(0, @@ -11985,7 +11986,7 @@ J(!0)});ba.className="geBtn gePrimaryBtn";x.appendChild(ba);g.editor.cancelFirst this.page.viewState.backgroundImage=g}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else G.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 I=document.createElement("canvas"),K=new Image;K.onload=function(){try{I.getContext("2d").drawImage(K,0,0);var g=I.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=g&&6
')))}catch(g){}Editor.prototype.useCanvasForExport= !1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="24.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="24.0.4";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=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=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" "); 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"}}; diff --git a/src/main/webapp/js/open.js b/src/main/webapp/js/open.js index 15e8c3670..0dd999bd9 100644 --- a/src/main/webapp/js/open.js +++ b/src/main/webapp/js/open.js @@ -1,8 +1,6 @@ // Handles form-submit by preparing to process response function handleSubmit() { - var form = window.openForm || document.getElementById('openForm'); - if (window.parent.openNew && window.parent.baseUrl != null) { window.parent.openFile.setConsumer(null); @@ -182,7 +180,10 @@ function main() { window.parent.openBrowserFile(k, function(data) { - window.parent.openFile.setData(data, k); + if (window.parent != null) + { + window.parent.openFile.setData(data, k); + } }, function() { //TODO add error diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js index 961f9feca..5a5ece13f 100644 --- a/src/main/webapp/js/viewer-static.min.js +++ b/src/main/webapp/js/viewer-static.min.js @@ -112,7 +112,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -1869,8 +1869,8 @@ l=this.state.absolutePoints;if(0==k.length&&(0==Math.round(e[0].x-e[e.length-1]. g,!1))n=this.graph.getConnectionPoint(g,l),null!=n&&(this.convertPoint(n,!1),k=n.y);k=[new mxPoint(b.x,e),new mxPoint(b.x,k)]}this.points=k;a.view.updateFixedTerminalPoints(a,f,g);a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)}}; mxEdgeSegmentHandler.prototype.connect=function(a,b,c,d,e){var f=this.graph.getModel(),g=f.getGeometry(a),k=null;if(null!=g&&null!=g.points&&0=wa.x&&this.model.remove(Aa[K]);var Ma=this.model.getTe K,Q){if(K||Q)R.apply(this,arguments);else{var Y=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(va){if(null!=this.view.getState(va)&&(this.model.isVertex(va)||this.model.isEdge(va)))if(ka.push(va),va==Y)ia=ka.length-1;else if(t&&null==Y&&0ia||!t&&0Qa)for(La=0;La>Qa;La--)this.model.remove(Ua[Ua.length+La-1]);Ua=this.model.getChildCells(t[sa],!0);for(La=0;LaQa)for(La=0;La>Qa;La--)this.model.remove(Ua[Ua.length+La-1]);Ua=this.model.getChildCells(t[sa],!0);for(La=0;LamxUtils.indexOf(t,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(t[Y],"")}else{if(this.isTableRow(t[Y])&&(ka=this.model.getParent(t[Y]), 0>mxUtils.indexOf(t,ka)&&0>mxUtils.indexOf(Q,ka))){for(var oa=this.model.getChildCells(ka,!0),va=0,sa=0;saD&&p++;v++}x.length5*d&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*d&&p.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,m));x>15*d&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};Q.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints; @@ -3498,9 +3498,9 @@ jb.width=Math.ceil(jb.width*oa);jb.height=Math.ceil(jb.height*oa);nb*=oa;!rb&&ab mxClient.NO_FO=x;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:p.className="geDisableMathJax";return p}}pb=null;cb=M.shapeForegroundColor;rb=M.shapeBackgroundColor;jb=M.enableFlowAnimation;M.enableFlowAnimation=!1;null!=M.themes&&"darkTheme"==M.defaultThemeName&&(pb=M.stylesheet,M.stylesheet=M.getDefaultStylesheet(),M.shapeForegroundColor="#000000",M.shapeBackgroundColor="#ffffff",M.refresh());bb.open(null,null,wb,!0,lb);M.enableFlowAnimation=jb;null!=pb&&(M.shapeForegroundColor=cb, M.shapeBackgroundColor=rb,M.stylesheet=pb,M.refresh())}else{jb=ab.background;if(null==jb||""==jb||jb==mxConstants.NONE)jb="#ffffff";bb.backgroundColor=jb;bb.autoOrigin=rb;bb.appendGraph(ab,nb,pb,cb,wb,!0,lb);wb=ab.getCustomFonts();if(null!=bb.wnd)for(pb=0;pb'):(bb.wnd.document.writeln('"))}ob&&(ab.useCssTransforms=ob,ab.currentTranslate=hb,ab.currentScale=vb,ab.view.translate=xb,ab.view.scale=qb);return bb}var oa=parseInt(Y.value)/100;isNaN(oa)&&(oa=1,Y.value="100 %");mxClient.IS_SF&&(oa*=.75);var va=null,sa=M.shapeForegroundColor,wa=M.shapeBackgroundColor;null!=M.themes&&"darkTheme"==M.defaultThemeName&&(va=M.stylesheet,M.stylesheet=M.getDefaultStylesheet(),M.shapeForegroundColor= -"#000000",M.shapeBackgroundColor="#ffffff",M.refresh());var Aa=pa.value,Ma=xa.value,Ra=!ra.checked,Ua=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(k,ra.checked,Aa,Ma,ta.checked,t.value,K.value,parseInt(Pa.value)/100,parseInt(Y.value)/100,Q.get());else{Ra&&(Ra=Ba.checked||Aa==ma&&Ma==ma);if(!Ra&&null!=k.pages&&k.pages.length){var Za=0;Ra=k.pages.length-1;ra.checked||(Za=parseInt(Aa)-1,Ra=parseInt(Ma)-1);for(var Qa=Za;Qa<=Ra;Qa++){var La=k.pages[Qa];Aa=La==k.currentPage?M:null;if(null== -Aa){Aa=k.createTemporaryGraph(M.stylesheet);Aa.shapeForegroundColor=M.shapeForegroundColor;Aa.shapeBackgroundColor=M.shapeBackgroundColor;Ma=!0;Za=!1;var kb=null,db=null;null==La.viewState&&null==La.root&&k.updatePageRoot(La);null!=La.viewState&&(Ma=La.viewState.pageVisible,Za=La.viewState.mathEnabled,kb=La.viewState.background,db=La.viewState.backgroundImage,Aa.extFonts=La.viewState.extFonts);null!=db&&null!=db.originalSrc&&(db=k.createImageForPageLink(db.originalSrc,La));Aa.background=kb;Aa.backgroundImage= -null!=db?new mxImage(db.src,db.width,db.height,db.x,db.y):null;Aa.pageVisible=Ma;Aa.mathEnabled=Za;var eb=Aa.getGraphBounds;Aa.getGraphBounds=function(){var ab=eb.apply(this,arguments),bb=this.backgroundImage;if(null!=bb&&null!=bb.width&&null!=bb.height){var wb=this.view.translate,lb=this.view.scale;ab=mxRectangle.fromRectangle(ab);ab.add(new mxRectangle((wb.x+bb.x)*lb,(wb.y+bb.y)*lb,bb.width*lb,bb.height*lb))}return ab};var ib=Aa.getGlobalVariable;Aa.getGlobalVariable=function(ab){return"page"== +"#000000",M.shapeBackgroundColor="#ffffff",M.refresh());var Aa=pa.value,Ma=xa.value,Ra=!ra.checked,Ua=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(k,ra.checked,Aa,Ma,ta.checked,t.value,K.value,parseInt(Pa.value)/100,parseInt(Y.value)/100,Q.get());else{Ra&&(Ra=Ba.checked||Aa==ma&&Ma==ma);if(!Ra&&null!=k.pages&&k.pages.length){var Ya=0;Ra=k.pages.length-1;ra.checked||(Ya=parseInt(Aa)-1,Ra=parseInt(Ma)-1);for(var Qa=Ya;Qa<=Ra;Qa++){var La=k.pages[Qa];Aa=La==k.currentPage?M:null;if(null== +Aa){Aa=k.createTemporaryGraph(M.stylesheet);Aa.shapeForegroundColor=M.shapeForegroundColor;Aa.shapeBackgroundColor=M.shapeBackgroundColor;Ma=!0;Ya=!1;var kb=null,db=null;null==La.viewState&&null==La.root&&k.updatePageRoot(La);null!=La.viewState&&(Ma=La.viewState.pageVisible,Ya=La.viewState.mathEnabled,kb=La.viewState.background,db=La.viewState.backgroundImage,Aa.extFonts=La.viewState.extFonts);null!=db&&null!=db.originalSrc&&(db=k.createImageForPageLink(db.originalSrc,La));Aa.background=kb;Aa.backgroundImage= +null!=db?new mxImage(db.src,db.width,db.height,db.x,db.y):null;Aa.pageVisible=Ma;Aa.mathEnabled=Ya;var eb=Aa.getGraphBounds;Aa.getGraphBounds=function(){var ab=eb.apply(this,arguments),bb=this.backgroundImage;if(null!=bb&&null!=bb.width&&null!=bb.height){var wb=this.view.translate,lb=this.view.scale;ab=mxRectangle.fromRectangle(ab);ab.add(new mxRectangle((wb.x+bb.x)*lb,(wb.y+bb.y)*lb,bb.width*lb,bb.height*lb))}return ab};var ib=Aa.getGlobalVariable;Aa.getGlobalVariable=function(ab){return"page"== ab?La.getName():"pagenumber"==ab?Qa+1:"pagecount"==ab?null!=k.pages?k.pages.length:1:ib.apply(this,arguments)};document.body.appendChild(Aa.container);k.updatePageRoot(La);Aa.model.setRoot(La.root)}Ua=ka(Aa,Ua,Qa!=Ra,La.getId());Aa!=M&&Aa.container.parentNode.removeChild(Aa.container)}}else Ua=ka(M);null==Ua||null==Ua.wnd?k.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ua.mathEnabled&&(Ra=Ua.wnd.document,ia&&(Ua.wnd.IMMEDIATE_PRINT=!0),Ra.writeln('