13.9.4 release
This commit is contained in:
parent
5747ec349c
commit
a63aa6f009
19 changed files with 3366 additions and 3099 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
11-NOV-2020: 13.9.4
|
||||
|
||||
- Adds descriptor to JSON load message
|
||||
- Uses mxGraph 4.2.3 beta 4
|
||||
|
||||
10-NOV-2020: 13.9.3
|
||||
|
||||
- Internal release to update conf cloud manifest
|
||||
|
||||
04-NOV-2020: 13.9.2
|
||||
|
||||
- Improves Lucidchart import
|
||||
- Uses mxGraph 4.2.3 beta 3
|
||||
|
||||
04-NOV-2020: 13.9.1
|
||||
|
||||
- Improves Lucidchart import
|
||||
|
@ -5,12 +19,12 @@
|
|||
04-NOV-2020: 13.9.0
|
||||
|
||||
- Disables Trello in IE11
|
||||
- Uses mxGraph 4.2.1 beta 24
|
||||
- Uses mxGraph 4.2.3 beta 2
|
||||
|
||||
03-NOV-2020: 13.8.9
|
||||
|
||||
- Adds block overflow cell style
|
||||
- Uses mxGraph 4.2.1 beta 23
|
||||
- Uses mxGraph 4.2.3 beta 1
|
||||
|
||||
30-OCT-2020: 13.8.8
|
||||
|
||||
|
@ -24,6 +38,7 @@
|
|||
|
||||
28-OCT-2020: 13.8.6
|
||||
|
||||
- Uses mxGraph 4.2.2
|
||||
- Performance improvements for Jira Cloud
|
||||
- MS teams integration
|
||||
|
||||
|
|
|
@ -4,11 +4,9 @@ About
|
|||
-----
|
||||
[diagrams.net](https://app.diagrams.net), [previously draw.io](https://www.diagrams.net/blog/move-diagrams-net), is an online diagramming web site that delivers the source in this project.
|
||||
|
||||
diagrams.net uses the [mxGraph library](https://github.com/jgraph/mxgraph) as the base of the stack, with the [GraphEditor example](https://github.com/jgraph/mxgraph/tree/master/javascript/examples/grapheditor) from mxGraph as the base of the application part. The mxGraph library build used is stored under /etc/mxgraph/mxClient.js.
|
||||
|
||||
License
|
||||
-------
|
||||
diagrams.net is licensed under the Apache v2.
|
||||
The source code in this repo is licensed under the Apache v2.
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
13.9.1
|
||||
13.9.4
|
|
@ -1,4 +1,4 @@
|
|||
var mxClient={VERSION:"4.2.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
|
||||
var mxClient={VERSION:"4.2.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),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),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>
|
||||
navigator.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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=
|
||||
|
@ -116,25 +116,26 @@ mxMouseEvent.prototype.consume=function(a){(a=null!=a?a:null!=this.evt.touches||
|
|||
mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};
|
||||
mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
|
||||
mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=[b,a],d=0;d<this.eventListeners.length;d+=2){var e=this.eventListeners[d];null!=e&&e!=a.getName()||this.eventListeners[d+1].apply(this,c)}}};
|
||||
var mxEvent={addListener:function(){return window.addEventListener?function(a,b,c){a.addEventListener(b,c,!1);null==a.mxListenerList&&(a.mxListenerList=[]);a.mxListenerList.push({name:b,f:c})}:function(a,b,c){a.attachEvent("on"+b,c);null==a.mxListenerList&&(a.mxListenerList=[]);a.mxListenerList.push({name:b,f:c})}}(),removeListener:function(){var a=function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var b=0;b<c;b++)if(a.mxListenerList[b].f==d){a.mxListenerList.splice(b,1);break}0==
|
||||
a.mxListenerList.length&&(a.mxListenerList=null)}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointermove":
|
||||
"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointerup":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",b);null!=c&&mxEvent.removeListener(a,mxClient.IS_POINTER?"pointermove":"mousemove",c);null!=d&&mxEvent.removeListener(a,
|
||||
mxClient.IS_POINTER?"pointerup":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var k=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,k(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||
|
||||
b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,k(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,k(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=k(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){try{if(null!=a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,
|
||||
b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(a){mxEvent.consume(a);c=1});mxEvent.addListener(b,"gesturechange",function(b){mxEvent.consume(b);var d=c-b.scale;.2<Math.abs(d)&&(a(b,0>d,!0),c=b.scale)});mxEvent.addListener(b,"gestureend",function(a){mxEvent.consume(a)})}else{var d=[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)||null==a.pointerId||d.push(a)}),mxUtils.bind(this,
|
||||
function(b){if(!mxEvent.isMouseEvent(b)&&2==d.length){for(var c=0;c<d.length;c++)if(b.pointerId==d[c].pointerId){d[c]=b;break}b=Math.abs(d[0].clientX-d[1].clientX);var c=Math.abs(d[0].clientY-d[1].clientY),g=Math.abs(b-e),m=Math.abs(c-f);if(g>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],g>m?b>e:c>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=b,f=c}}),mxUtils.bind(this,function(a){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(b){null==
|
||||
b&&(b=window.event);b.ctrlKey&&b.preventDefault();(.5<Math.abs(b.deltaX)||.5<Math.abs(b.deltaY))&&a(b,0==b.deltaY?0<-b.deltaX:0<-b.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(a){a.preventDefault&&a.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:
|
||||
null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?
|
||||
1==a.mozInputSource:0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&
|
||||
!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},
|
||||
getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",
|
||||
MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",
|
||||
ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",
|
||||
MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",
|
||||
CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}
|
||||
mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};
|
||||
mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};
|
||||
mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
|
||||
var mxEvent={addListener:function(){if(window.addEventListener){var a=!1;try{document.addEventListener("test",function(){},Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){a=!0}}))}catch(b){}return function(b,c,d){b.addEventListener(c,d,a?{passive:!1}:!1);null==b.mxListenerList&&(b.mxListenerList=[]);b.mxListenerList.push({name:c,f:d})}}return function(a,c,d){a.attachEvent("on"+c,d);null==a.mxListenerList&&(a.mxListenerList=[]);a.mxListenerList.push({name:c,f:d})}}(),removeListener:function(){var a=
|
||||
function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var b=0;b<c;b++)if(a.mxListenerList[b].f==d){a.mxListenerList.splice(b,1);break}0==a.mxListenerList.length&&(a.mxListenerList=null)}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,
|
||||
b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointermove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointerup":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?
|
||||
"pointerdown":"mousedown",b);null!=c&&mxEvent.removeListener(a,mxClient.IS_POINTER?"pointermove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"pointerup":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var k=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,
|
||||
function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,k(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,k(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,k(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=k(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){try{if(null!=
|
||||
a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(a){mxEvent.consume(a);c=1});mxEvent.addListener(b,"gesturechange",function(b){mxEvent.consume(b);var d=c-b.scale;.2<Math.abs(d)&&(a(b,0>d,!0),c=b.scale)});mxEvent.addListener(b,"gestureend",function(a){mxEvent.consume(a)})}else{var d=
|
||||
[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)||null==a.pointerId||d.push(a)}),mxUtils.bind(this,function(b){if(!mxEvent.isMouseEvent(b)&&2==d.length){for(var c=0;c<d.length;c++)if(b.pointerId==d[c].pointerId){d[c]=b;break}b=Math.abs(d[0].clientX-d[1].clientX);var c=Math.abs(d[0].clientY-d[1].clientY),g=Math.abs(b-e),m=Math.abs(c-f);if(g>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],g>m?b>e:c>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/
|
||||
2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=b,f=c}}),mxUtils.bind(this,function(a){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(b){null==b&&(b=window.event);b.ctrlKey&&b.preventDefault();(.5<Math.abs(b.deltaX)||.5<Math.abs(b.deltaY))&&a(b,0==b.deltaY?0<-b.deltaX:0<-b.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(a){a.preventDefault&&a.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=
|
||||
a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},
|
||||
isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?1==a.mozInputSource:0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||
|
||||
mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&
|
||||
(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",
|
||||
ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",
|
||||
SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",
|
||||
UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",
|
||||
CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};
|
||||
function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;
|
||||
mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};
|
||||
mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
|
||||
mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
|
||||
mxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials="true"),!mxClient.IS_QUIRKS&&(null==document.documentMode||9<document.documentMode)&&
|
||||
window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
|
||||
mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";for(var e=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),f=0;f<e.length;f++){var g=e[f].indexOf("=");if(0<g){var k=e[f].substring(0,g),g=e[f].substring(g+
|
||||
|
@ -507,7 +508,7 @@ mxText.prototype.redrawHtmlShape=function(){if(mxClient.IS_SVG)this.redrawHtmlSh
|
|||
mxText.prototype.redrawHtmlShapeWithCss3=function(){var a=Math.max(0,Math.round(this.bounds.width/this.scale)),b=Math.max(0,Math.round(this.bounds.height/this.scale)),c="position: absolute; left: "+Math.round(this.bounds.x)+"px; top: "+Math.round(this.bounds.y)+"px; pointer-events: none; ",d=this.getTextCss();mxSvgCanvas2D.createCss(a+2,b,this.align,this.valign,this.wrap,this.overflow,this.clipped,null!=this.background?mxUtils.htmlEntities(this.background):null,null!=this.border?mxUtils.htmlEntities(this.border):
|
||||
null,c,d,this.scale,mxUtils.bind(this,function(a,c,d,k,l,m){a=this.getTextRotation();a=(1!=this.scale?"scale("+this.scale+") ":"")+(0!=a?"rotate("+a+"deg) ":"")+(0!=this.margin.x||0!=this.margin.y?"translate("+100*this.margin.x+"%,"+100*this.margin.y+"%)":"");""!=a&&(a="transform-origin: 0 0; transform: "+a+"; ");"block"==this.overflow&&this.valign==mxConstants.ALIGN_MIDDLE&&(a+="max-height: "+(b+1)+"px;");""==m?(d+=k,k="display:inline-block; min-width: 100%; "+a):(k+=a,mxClient.IS_SF&&(k+="-webkit-clip-path: content-box;"));
|
||||
"block"==this.overflow&&(k+="width: 100%; ");100>this.opacity&&(l+="opacity: "+this.opacity/100+"; ");this.node.setAttribute("style",d);d=mxUtils.isNode(this.value)?this.value.outerHTML:this.getHtmlValue();null==this.node.firstChild&&(this.node.innerHTML="<div><div>"+d+"</div></div>",mxClient.IS_IE11&&this.fixFlexboxForIe11(this.node));this.node.firstChild.firstChild.setAttribute("style",l);this.node.firstChild.setAttribute("style",k)}))};
|
||||
mxText.prototype.fixFlexboxForIe11=function(a){for(var b=a.querySelectorAll('div[style*="display: flex; justify-content: flex-end;"]'),c=0;c<b.length;c++)b[c].style.justifyContent="flex-start",b[c].style.flexDirection="row-reverse";b=a.querySelectorAll('div[style*="display: flex; justify-content: center;"]');a=-window.innerWidth;for(c=0;c<b.length;c++)b[c].style.display="block",b[c].style.textAlign="center",b[c].style.marginLeft=a+"px",b[c].style.marginRight=a+"px"};
|
||||
mxText.prototype.fixFlexboxForIe11=function(a){for(var b=a.querySelectorAll('div[style*="display: flex; justify-content: flex-end;"]'),c=0;c<b.length;c++)b[c].style.justifyContent="flex-start",b[c].style.flexDirection="row-reverse";if(!this.wrap)for(b=a.querySelectorAll('div[style*="display: flex; justify-content: center;"]'),a=-window.innerWidth,c=0;c<b.length;c++)b[c].style.marginLeft=a+"px",b[c].style.marginRight=a+"px"};
|
||||
mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%) scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+") translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x-
|
||||
Math.ceil(c*("fill"!=this.overflow&&"width"!=this.overflow?3:1)))+"px";b.top=Math.round(this.bounds.y-d*("fill"!=this.overflow?3:1))+"px";b.opacity=100>this.opacity?this.opacity/100:""};
|
||||
mxText.prototype.updateInnerHtml=function(a){if(mxUtils.isNode(this.value))a.innerHTML=this.value.outerHTML;else{var b=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=mxUtils.htmlEntities(b,!1));b=mxUtils.replaceTrailingNewlines(b,"<div> </div>");b=this.replaceLinefeeds?b.replace(/\n/g,"<br/>"):b;a.innerHTML='<div style="display:inline-block;_display:inline;">'+b+"</div>"}};
|
||||
|
@ -1057,8 +1058,8 @@ mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0]
|
|||
Math.max(1,m-k)}};
|
||||
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
|
||||
f.x+m*e+((0==g?0:l/g)*d+c)*this.scale;d=f.y+l*e-((0==g?0:m/g)*d-k)*this.scale}}return new mxPoint(c,d)};
|
||||
mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],k=a.absolutePoints[1],l=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),m=0,n=0,p=0,q=2;q<e;q++)n+=f[q-2],k=a.absolutePoints[q],g=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),g<=l&&(l=g,m=q-1,p=n),g=k;e=f[m];g=a.absolutePoints[m];k=a.absolutePoints[m+1];l=k.x;f=k.y;a=g.x-l;m=g.y-f;l=a-(b-l);f=
|
||||
m-(c-f);f=l*a+f*m;a=Math.sqrt(0>=f?0:f*f/(a*a+m*m));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,b,c)&&(e=-e);return new mxPoint((d/2-p-a)/d*-2,e/this.scale)}}return new mxPoint};
|
||||
mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],k=a.absolutePoints[1],l=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),m=0,n=0,p=0,q=2;q<e;q++)g=k,k=a.absolutePoints[q],g=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),p+=f[q-2],g<=l&&(l=g,n=q-1,m=p);e=f[n];g=a.absolutePoints[n];k=a.absolutePoints[n+1];l=k.x;f=k.y;a=g.x-l;n=g.y-f;l=a-(b-l);f=
|
||||
n-(c-f);f=l*a+f*n;a=Math.sqrt(0>=f?0:f*f/(a*a+n*n));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,b,c)&&(e=-e);return new mxPoint((d/2-m-a)/d*-2,e/this.scale)}}return new mxPoint};
|
||||
mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{var d=b[0],e=b[b.length-1];if(null!=d&&null!=e){var b=e.x-d.x,f=e.y-d.y,g=e=0,c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
|
||||
mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)&&(null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a)));return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
|
||||
mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
|
||||
|
@ -1229,7 +1230,7 @@ this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1
|
|||
a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
|
||||
mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
|
||||
mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=2*this.getBorder(),g=this.container.clientWidth-f,f=this.container.clientHeight-f,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?g-k.width:0,p=b?f-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>g&&(n=0),b>f&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=
|
||||
(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
|
||||
(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x/m+n*c/m):l.x,b?Math.floor(l.y-k.y/m+p*d/m):l.y)};
|
||||
mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(this.view.scale*a*100)/100,d=this.view.getState(this.getSelectionCell());a=c/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(d=mxUtils.hasScrollbars(this.container),b&&!d){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/
|
||||
(2*c),d=d*-f,e=e*-f;else f=(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else{var f=this.view.translate.x,g=this.view.translate.y,k=this.container.scrollLeft,l=this.container.scrollTop;this.view.setScale(c);d&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=(this.view.translate.x-f)*this.view.scale+Math.round(k*a+d),this.container.scrollTop=(this.view.translate.y-
|
||||
g)*this.view.scale+Math.round(l*a+e))}};
|
||||
|
|
3398
src/main/webapp/js/app.min.js
vendored
3398
src/main/webapp/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -307,7 +307,8 @@ App.startTime = new Date();
|
|||
App.pluginRegistry = {'4xAKTrabTpTzahoLthkwPNUn': '/plugins/explore.js',
|
||||
'ex': '/plugins/explore.js', 'p1': '/plugins/p1.js',
|
||||
'ac': '/plugins/connect.js', 'acj': '/plugins/connectJira.js',
|
||||
'ac148': '/plugins/cConf-1-4-8.js', 'ac148cmnt': '/plugins/cConf-comments.js',
|
||||
'ac148': '/plugins/cConf-1-4-8.js', 'ac148cmnt': '/plugins/cConf-comments.js',
|
||||
'ac148lic': '/plugins/cConf-license.js',
|
||||
'voice': '/plugins/voice.js',
|
||||
'tips': '/plugins/tooltips.js', 'svgdata': '/plugins/svgdata.js',
|
||||
'electron': 'plugins/electron.js',
|
||||
|
@ -2817,10 +2818,14 @@ App.prototype.start = function()
|
|||
|
||||
window.onerror = function(message, url, linenumber, colno, err)
|
||||
{
|
||||
EditorUi.logError('Uncaught: ' + ((message != null) ? message : ''),
|
||||
url, linenumber, colno, err, null, true);
|
||||
ui.handleError({message: message}, mxResources.get('unknownError'),
|
||||
null, null, null, null, true);
|
||||
// Ignores Grammarly error [1344]
|
||||
if (message != 'ResizeObserver loop limit exceeded')
|
||||
{
|
||||
EditorUi.logError('Uncaught: ' + ((message != null) ? message : ''),
|
||||
url, linenumber, colno, err, null, true);
|
||||
ui.handleError({message: message}, mxResources.get('unknownError'),
|
||||
null, null, null, null, true);
|
||||
}
|
||||
};
|
||||
|
||||
// Listens to changes of the hash if not in embed or client mode
|
||||
|
@ -2885,8 +2890,24 @@ App.prototype.start = function()
|
|||
}));
|
||||
}
|
||||
|
||||
// Descriptor for CSV import
|
||||
if ((window.location.hash == null || window.location.hash.length <= 1) && urlParams['desc'] != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.loadDescriptor(JSON.parse(Graph.decompress(urlParams['desc'])),
|
||||
null, mxUtils.bind(this, function(e)
|
||||
{
|
||||
this.handleError(e, mxResources.get('errorLoadingFile'));
|
||||
}));
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
this.handleError(e, mxResources.get('errorLoadingFile'));
|
||||
}
|
||||
}
|
||||
// Redirects old url URL parameter to new #U format
|
||||
if ((window.location.hash == null || window.location.hash.length <= 1) && urlParams['url'] != null)
|
||||
else if ((window.location.hash == null || window.location.hash.length <= 1) && urlParams['url'] != null)
|
||||
{
|
||||
this.loadFile('U' + urlParams['url'], true);
|
||||
}
|
||||
|
@ -4762,18 +4783,10 @@ App.prototype.loadFile = function(id, sameWindow, file, success, force)
|
|||
{
|
||||
this.spinner.stop();
|
||||
|
||||
try
|
||||
this.alert('[Deprecation] #S is no longer supportd, go to https://www.draw.io/?desc=' + id.substring(1).substring(0, 10) + '...', mxUtils.bind(this, function()
|
||||
{
|
||||
this.loadDescriptor(JSON.parse(Graph.decompress(id.substring(1))),
|
||||
success, mxUtils.bind(this, function(e)
|
||||
{
|
||||
this.handleError(e, mxResources.get('errorLoadingFile'));
|
||||
}));
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
this.handleError(e, mxResources.get('errorLoadingFile'));
|
||||
}
|
||||
window.location.href = 'https://www.draw.io/?desc=' + id.substring(1);
|
||||
}));
|
||||
}
|
||||
else if (id.charAt(0) == 'R')
|
||||
{
|
||||
|
|
|
@ -2764,6 +2764,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
|
|||
var templateXml = null;
|
||||
var selectedElt = null;
|
||||
var templateExtUrl = null;
|
||||
var templateRealUrl = null;
|
||||
var templateInfoObj = null;
|
||||
|
||||
function create()
|
||||
|
@ -2784,7 +2785,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
|
|||
editorUi.hideDialog();
|
||||
}
|
||||
|
||||
callback(templateXml, nameInput.value);
|
||||
callback(templateXml, nameInput.value, templateRealUrl, templateLibs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2826,7 +2827,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
|
|||
var w = 140;
|
||||
var h = 140;
|
||||
|
||||
function selectElement(elt, xml, libs, extUrl, infoObj, clibs)
|
||||
function selectElement(elt, xml, libs, extUrl, infoObj, clibs, realUrl)
|
||||
{
|
||||
if (selectedElt != null)
|
||||
{
|
||||
|
@ -2841,6 +2842,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
|
|||
templateClibs = clibs;
|
||||
selectedElt = elt;
|
||||
templateExtUrl = extUrl;
|
||||
templateRealUrl = realUrl;
|
||||
templateInfoObj = infoObj;
|
||||
|
||||
selectedElt.style.backgroundColor = rightHighlight;
|
||||
|
@ -2927,7 +2929,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
|
|||
|
||||
if (req.getStatus() >= 200 && req.getStatus() <= 299)
|
||||
{
|
||||
selectElement(elt, req.getText(), libs, null, null, clibs);
|
||||
selectElement(elt, req.getText(), libs, null, null, clibs, realUrl);
|
||||
|
||||
if (createIt)
|
||||
{
|
||||
|
|
|
@ -2196,15 +2196,9 @@
|
|||
|
||||
if (desc.url != null && desc.url.length > 0)
|
||||
{
|
||||
var realUrl = desc.url;
|
||||
|
||||
if ((/^https?:\/\//.test(realUrl)) && !this.editor.isCorsEnabledForUrl(realUrl))
|
||||
{
|
||||
realUrl = PROXY_URL + '?url=' + encodeURIComponent(realUrl);
|
||||
}
|
||||
|
||||
// Cannot use proxy here as it will block unknown text content
|
||||
// LATER: Remove cache-control header
|
||||
this.editor.loadUrl(realUrl, mxUtils.bind(this, function(data)
|
||||
this.editor.loadUrl(desc.url, mxUtils.bind(this, function(data)
|
||||
{
|
||||
loadData(data);
|
||||
}), mxUtils.bind(this, function(err)
|
||||
|
@ -9268,14 +9262,21 @@
|
|||
|
||||
if (evt.dataTransfer.files.length > 0)
|
||||
{
|
||||
if (mxEvent.isAltDown(evt))
|
||||
{
|
||||
x = null;
|
||||
y = null;
|
||||
}
|
||||
|
||||
this.importFiles(evt.dataTransfer.files, x, y, this.maxImageSize, null, null, null, null,
|
||||
mxEvent.isControlDown(evt), null, null, mxEvent.isShiftDown(evt));
|
||||
if (mxEvent.isControlDown(evt) || (mxClient.IS_MAC && mxEvent.isMetaDown(evt)))
|
||||
{
|
||||
this.openFiles(evt.dataTransfer.files, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mxEvent.isAltDown(evt))
|
||||
{
|
||||
x = null;
|
||||
y = null;
|
||||
}
|
||||
|
||||
this.importFiles(evt.dataTransfer.files, x, y, this.maxImageSize, null, null, null, null,
|
||||
mxEvent.isControlDown(evt), null, null, mxEvent.isShiftDown(evt));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -11101,8 +11102,8 @@
|
|||
var enableSearchDocs = data.enableSearch == 1;
|
||||
var enableCustomTemp = data.enableCustomTemp == 1;
|
||||
|
||||
var dlg = new NewDialog(this, false, data.callback != null,
|
||||
mxUtils.bind(this, function(xml, name)
|
||||
var dlg = new NewDialog(this, false, data.templatesOnly? false : data.callback != null,
|
||||
mxUtils.bind(this, function(xml, name, url, libs)
|
||||
{
|
||||
xml = xml || this.emptyDiagramXml;
|
||||
|
||||
|
@ -11111,6 +11112,7 @@
|
|||
{
|
||||
parent.postMessage(JSON.stringify({event: 'template', xml: xml,
|
||||
blank: xml == this.emptyDiagramXml, name: name,
|
||||
tempUrl: url, libs: libs, builtIn: true,
|
||||
message: data}), '*');
|
||||
}
|
||||
else
|
||||
|
@ -11492,14 +11494,27 @@
|
|||
this.embedFilenameSpan = tmp;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (data.libs)
|
||||
{
|
||||
this.sidebar.showEntries(data.libs);
|
||||
}
|
||||
}
|
||||
catch(e){}
|
||||
|
||||
if (data.xmlpng != null)
|
||||
{
|
||||
data = this.extractGraphModelFromPng(data.xmlpng);
|
||||
}
|
||||
else if (data.descriptor != null)
|
||||
{
|
||||
data = data.descriptor;
|
||||
}
|
||||
else
|
||||
{
|
||||
data = data.xml;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (data.action == 'merge')
|
||||
{
|
||||
|
@ -11552,6 +11567,12 @@
|
|||
this.handleError(e);
|
||||
}
|
||||
}
|
||||
|
||||
var getData = mxUtils.bind(this, function()
|
||||
{
|
||||
return (urlParams['pages'] != '0' || (this.pages != null && this.pages.length > 1)) ?
|
||||
this.getFileData(true): mxUtils.getXml(this.editor.getGraphXml());
|
||||
});;
|
||||
|
||||
var doLoad = mxUtils.bind(this, function(data, evt)
|
||||
{
|
||||
|
@ -11570,13 +11591,7 @@
|
|||
{
|
||||
this.editor.setStatus('');
|
||||
}
|
||||
|
||||
var getData = mxUtils.bind(this, function()
|
||||
{
|
||||
return (urlParams['pages'] != '0' || (this.pages != null && this.pages.length > 1)) ?
|
||||
this.getFileData(true): mxUtils.getXml(this.editor.getGraphXml());
|
||||
});;
|
||||
|
||||
|
||||
lastData = getData();
|
||||
|
||||
if (autosave && changeListener == null)
|
||||
|
@ -11624,7 +11639,17 @@
|
|||
}
|
||||
});
|
||||
|
||||
if (data != null && typeof data.substring === 'function' && data.substring(0, 34) == 'data:application/vnd.visio;base64,')
|
||||
if (typeof data === 'object')
|
||||
{
|
||||
this.loadDescriptor(data, mxUtils.bind(this, function(e)
|
||||
{
|
||||
doLoad(getData(), evt);
|
||||
}), mxUtils.bind(this, function(e)
|
||||
{
|
||||
this.handleError(e, mxResources.get('errorLoadingFile'));
|
||||
}));
|
||||
}
|
||||
else if (data != null && typeof data.substring === 'function' && data.substring(0, 34) == 'data:application/vnd.visio;base64,')
|
||||
{
|
||||
// Checks VND binary magic number in base64
|
||||
var filename = (data.substring(34, 45) == '0M8R4KGxGuE') ? 'raw.vsd' : 'raw.vsdx';
|
||||
|
|
|
@ -80,7 +80,7 @@ LucidImporter = {};
|
|||
'DecisionBlock': 'rhombus',
|
||||
'TerminatorBlock': 'rounded=1;arcSize=50',
|
||||
'PredefinedProcessBlock': 'shape=process',
|
||||
'DocumentBlock': 'shape=document',
|
||||
'DocumentBlock': 'shape=document;boundedLbl=1',
|
||||
'MultiDocumentBlock': s + 'flowchart.multi-document',
|
||||
'ManualInputBlock': 'shape=manualInput;size=15',
|
||||
'PreparationBlock': 'shape=hexagon;perimeter=hexagonPerimeter2',
|
||||
|
@ -3772,7 +3772,7 @@ LucidImporter = {};
|
|||
function convertTxt2Html(txt, srcM)
|
||||
{
|
||||
var blockStyles = {'a': true, 'il': true, 'ir': true, 'mt': true, 'mb': true, 'p': true, 't': true, 'l': true};
|
||||
var nonBlockStyles = {'lk': true, 's': true, 'c': true, 'b': true, 'fc': true, 'i': true, 'u': true};
|
||||
var nonBlockStyles = {'lk': true, 's': true, 'c': true, 'b': true, 'fc': true, 'i': true, 'u': true, 'k': true};
|
||||
|
||||
srcM.sort(function(a, b)
|
||||
{
|
||||
|
@ -3834,7 +3834,7 @@ LucidImporter = {};
|
|||
var i = 0, j = 0, k = 0, curStyles = {}, curBlockStyles = {}, openTags = [], openTagsCount = [],
|
||||
openBlockTags = [], blockActive = false, listActive = false, listType;
|
||||
|
||||
function startBlockTag(styles)
|
||||
function startBlockTag(styles, nonBlockStyles)
|
||||
{
|
||||
var str = '';
|
||||
var t = styles['t'];
|
||||
|
@ -3914,7 +3914,25 @@ LucidImporter = {};
|
|||
|
||||
if (t != null)
|
||||
{
|
||||
str += '<li style="text-align:' + (styles['a']? styles['a'].v : 'center') + '">';
|
||||
str += '<li style="text-align:' + (styles['a']? styles['a'].v : 'center') + ';';
|
||||
|
||||
if (nonBlockStyles != null && nonBlockStyles['c'])
|
||||
{
|
||||
var v = nonBlockStyles['c'].v;
|
||||
|
||||
if (v != null)
|
||||
{
|
||||
if (v.charAt(0) != '#')
|
||||
{
|
||||
v = '#' + v;
|
||||
}
|
||||
|
||||
v = v.substring(0, 7);
|
||||
str += 'color:' + v + ';';
|
||||
}
|
||||
}
|
||||
|
||||
str += '">';
|
||||
openBlockTags.push('li');
|
||||
str += '<span style="';
|
||||
openBlockTags.push('span');
|
||||
|
@ -3933,7 +3951,8 @@ LucidImporter = {};
|
|||
{
|
||||
jc = 'flex-end';
|
||||
}
|
||||
str += 'display: flex; font-size: 0; line-height: 1; align-items: baseline; justify-content: ' + jc + '; text-align: ' + tmp + ';';
|
||||
|
||||
str += 'display: flex; justify-content: ' + jc + '; text-align: ' + tmp + '; align-items: baseline; font-size: 0; line-height: 1;';
|
||||
}
|
||||
|
||||
if (styles['il'])
|
||||
|
@ -4018,12 +4037,24 @@ LucidImporter = {};
|
|||
{
|
||||
str += 'font-style: italic;';
|
||||
}
|
||||
|
||||
var td = [];
|
||||
|
||||
if (styles['u'] && styles['u'].v)
|
||||
{
|
||||
str += 'text-decoration: underline;';
|
||||
td.push('underline');
|
||||
}
|
||||
|
||||
if (styles['k'] && styles['k'].v)
|
||||
{
|
||||
td.push('line-through');
|
||||
}
|
||||
|
||||
if (td.length > 0)
|
||||
{
|
||||
str += 'text-decoration: ' + td.join(' ') + ';';
|
||||
}
|
||||
|
||||
str += '">'
|
||||
openTagsCount.push(tagCount);
|
||||
|
||||
|
@ -4111,7 +4142,7 @@ LucidImporter = {};
|
|||
maxE = txt.length;
|
||||
}
|
||||
|
||||
html += startBlockTag(curBlockStyles);
|
||||
html += startBlockTag(curBlockStyles, curStyles);
|
||||
|
||||
if (blockActive)
|
||||
{
|
||||
|
@ -10016,7 +10047,6 @@ LucidImporter = {};
|
|||
v.style += 'strokeColor=none;fillColor=none;';
|
||||
|
||||
var edgeStyle = 'edgeStyle=none;endArrow=none;part=1;';
|
||||
edgeStyle.style += addAllStyles(edgeStyle.style, p, a, edgeStyle);
|
||||
|
||||
var fc = getStrokeColor(p, a);
|
||||
|
||||
|
@ -10061,7 +10091,6 @@ LucidImporter = {};
|
|||
v.style += 'strokeColor=none;fillColor=none;';
|
||||
|
||||
var edgeStyle = 'edgeStyle=none;endArrow=none;part=1;';
|
||||
edgeStyle.style += addAllStyles(edgeStyle.style, p, a, edgeStyle);
|
||||
|
||||
var fc = getStrokeColor(p, a);
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
this.addDataEntry(dt, 180, 160, 'Table 1', '7Zhvb5swEMY/DW8nwCNr3kL/aGomTW33AdxwAUuOTW2nkH36ncEkaihqooSQVZWI5DufL/bvCY8CHkmW1Z2iRf5LpsA9cuORRElpmtGySoBzL/RZ6pFrLwx9/Hjhbc9sUM/6BVUgzD4LwmbBK+UraDJP9JlDk9VmzV1W57SwQ1PPklgbqswj+2tzxMfEXApDmQCFiaCOOaeFZnV5k8kZT2d0LVembdRG8YJVkD7IUrtaJcsZNrOhbb7A5o9uM3aacpYJHM/xlPYbYwUa9zKj2rgKdyxQBqpeNHXKcbkDuQSj1lhSstTkruKqwefnwLK8XTZxSaqbRLZZuyWNAwf7ffCkA76XOW7ZMMofYG6oyGr8b+laRKmSxRNVGRiXKCSzcG5e8bgbjozzRHJpRRJS2E5GFm6Sw6Jd+yyNkctWC3fyTdP61FGMF3JI/G+RF+F2E4yDbYyXLVcmkUIbhT8N2wNQoRKsSvspFL6v0NoxdDp8JBg5gV7fO3r9vj9MMSFsuFXsYDH8HTF27wqJMBdclhjmLE1B7EuZfHgfkIGoRh2qfwR7WcHP65HZtg7T1Ma6oHMmslmzcrIDPxoAftX/E48GEmPyX1jSrlKXZUmTM1rSjyP1OvlNAylr+x3lR5PR/OiqgxT/lGAiuHQ7OjXrEexn+mU/R9vP9Iz2E/if1X+mo/lPEPQY0NhohzOgHtgjGFDQfRj+cqBDHSgIz2lBxz5FX6wFBT2Uz+FB3UfdxoPIp/WgPtrDmxCG25d99dybd4H/AA=='),
|
||||
this.addDataEntry(dt, 180, 160, 'Table 2', '7ZjRbpswFIafhtsJ48KaW1jbi2bS1PYF3OCAJcdGtlvInn7H2CRLE9RECYFOk4jkc3x8Yn9/+BUIcLZqHhSpyp8ypzzAdwHOlJTGjVZNRjkPopDlAf4RRFEInyC675lF7WxYEUWFOWZB5Ba8E/5GXeaFvHLqstqsuc/qklR2aNpZnGpDlHlmv20Oh5BYSGEIE1RBArUx56TSrC13mZLxfE7W8s10jbooXbKG5k+y1r5WyXoOzWxomy+h+bPfjJ0mnBUCxgs4pf3GVFENe5kTbXyFPxZVhja9aNqU5/JA5YoatYaSmuWm9BW3Dl9YUlaU3bLEJ4l2iWKzdksaBh72YfB4D3wvc9iyYYQ/0YUhomjx79K1iHIlqxeiCmp8opLMwrl7h+NuODLOM8mlFUlIYTsZWflJTpfd2ldpjFz5QPmTb5q2p45TuIBDFn6Lgxi2m0GMtjFctlyZTAptFPw0bA8KCtXUqnScQtFhhdaeodfhM8HwBfS62dPr1yOc9v4RnaabEDbc6na2JB/vDQlIl1zWEJYsz6k4ljX+9G5IBmIb77EFK4DE2Gg7m3G1qa7Igoli7lYmH9jHA7Bvdrn//TuPBtIi+RK+hCbtS4f0GsqXvvf50om6TdeXktF86bbHl8ZGez1f6mE/gi/NvoQvTfv/0uyKvoTCMwW7+F1Dc9b1O8uPZqP5EUI9hoSnbkiXhj2CAaH9R+X/DnSqA23UuYoFnfuMPVkLQj2Ur+FB+w/CzoNu/lkP6qM9vAlBuH0V2M7tvCn8Aw=='),
|
||||
this.addDataEntry(dt, 180, 30, 'Table Row 1', 'xVXbboMwDP0aXicKY9oz7PLSvbT7gYy4EC2NUeIWuq+fQ0JZd9EqbdMkkHJObGOfAyHJq+1wb0XXPqAEneS3SV5ZRAqr7VCB1kmWKpnkN0mWpXwn2d0Xu4txN+2EBUPnJGQhYS/0DgITCEcHHQnXis4vSTx5qnQkLK3Vi+dSxjUaEsqAZbwYsdaic2qMDkyrtFyKA+5oqjOhcqMGkCvsXYy12C+5mIvFN1x8HXvxWGjVGF7XPJ9/YmnBcStL4SgWcGTxGSrU6BsyaGB8itbvqDg4WILhS/FGKip3D7gFsgcO6ZWkNkZcB4HTFlTTxrQ8csIF3BxTZyt4Ed343Jn8fGe4Y1JCr6AmYZrRpFMTvHLSYvcobAMUiQ6V1/B2z9Me5f6oE2EXNzVsptwnJMJtBDYOfiw6Tl2UfLEOVXpRJAW3WzFezJgvH26pQsOe8RvkawAb2YM38zyDsv8z6PKHBhnj4WzQj7UHqaZ6/kNAlm6jsWfYKinBnKtp/q2m+R9JWnyQlE+Gf1Z1OnFCbOk6USvTLEPm1R/oPJzq+fZVLn5Hd4bzH2bcO/kBvQI='),
|
||||
this.addDataEntry(dt, 180, 30, 'Table Row 2', 'xVXbTsMwDP2avqKupYjnljEhxguDDwir10ZkcUm8tePrcZpsYxsTQ9ykVMo5sV37nF6itJh3IyOa+g5LUFE6jNLCIJLfzbsClIqSWJZRehUlScxXlFwfOR30p3EjDGg6JSHxCUuhFuAZT1haqUDYWjRuS+LJUbklYWgiXx0XM56iJiE1GMaDHislGiv7aM/UUpVjscIFreusUT6THZT32NoQa7AdczEbis+4+CT04rBQstK8n/J87o65AcutjIWlUMCSwWcoUKFrSKOG/i5K7VFhcDAE3VHxeiooNwKcA5kVh7SypDpEXHqB4xpkVYe0NHDCelxtUrdW8Ca48bEz6enOcMckhbqHKQld9SbtmuCUKw02D8JUQIFoUDoNh0uediP3oU6ETThUMFvnPiERzgMwYfBN0X7qLOfFOhTxWRZl3G7BeLDFvFy4oQI1e8ZPkKsBbGQLzszTDEr+z6DzA4Oub79mkdYObi36tvr7bwuyejOFLcNaliXoU2VNP5U1/SVVswNVH7V8WcDN1T9ru/7y+NjcNmIqdTX2mRd/IH63K/L7Rzz7GTMYbv88/dnOj+kN'),
|
||||
this.addDataEntry(dt, 180, 30, 'Table Row 3', 'xVXbTsMwDP2avqKupYjnloEQQ0IMPiCsXhuRxSXxaMfX4zTpriCGxISUSjkntmuf00uUFovuxoimvscSVJSOo7QwiOR3i64ApaIklmWUXkVJEvMVJdffnI7607gRBjQdk5D4hHehluAZT1haqUDYWjRuS+LFUbklYWgqPxwXM56hJiE1GMajHislGiv7aM/UUpUTscIlDXUGlM9lB+UjtjbEGmwnXMyG4nMuPg29OCyUrDTvZzyfu2NuwHIrE2EpFLBk8BUKVOga0qihv4tSe1QYHAxB9614PRWUuwFcAJkVh7SypDpEXHqB4xpkVYe0NHDCelytUzdW8Ca48bUz6fHOcMckhXqEGQld9SbtmuCUKw02T8JUQIFoUDoNx+887VruQ50Im3CoYD7kviARLgbLwuDrov3UWc6LdSjisyzKuN2C8WiDeblwQwVq9oyfIFcD2MgWnJnHGZT8n0HnBwY93P3OIq0d3Fj0a/XjPfW33xbnDLJ6c4Utw1qWJehjZU1/lDU9karZgarPWr4t4fbqn7Udvjw+NreNmEldTXzmxZ742QnE73ZF3n7Es78xg+Hmz9Of7fyYPgE='),
|
||||
this.addDataEntry(dt + ' fk pk foreign key primary', 180, 30, 'Table Row 2', 'xVXbTsMwDP2avqKupYjnljEhxguDDwir10ZkcUm8tePrcZpsYxsTQ9ykVMo5sV37nF6itJh3IyOa+g5LUFE6jNLCIJLfzbsClIqSWJZRehUlScxXlFwfOR30p3EjDGg6JSHxCUuhFuAZT1haqUDYWjRuS+LJUbklYWgiXx0XM56iJiE1GMaDHislGiv7aM/UUpVjscIFreusUT6THZT32NoQa7AdczEbis+4+CT04rBQstK8n/J87o65AcutjIWlUMCSwWcoUKFrSKOG/i5K7VFhcDAE3VHxeiooNwKcA5kVh7SypDpEXHqB4xpkVYe0NHDCelxtUrdW8Ca48bEz6enOcMckhbqHKQld9SbtmuCUKw02D8JUQIFoUDoNh0uediP3oU6ETThUMFvnPiERzgMwYfBN0X7qLOfFOhTxWRZl3G7BeLDFvFy4oQI1e8ZPkKsBbGQLzszTDEr+z6DzA4Oub79mkdYObi36tvr7bwuyejOFLcNaliXoU2VNP5U1/SVVswNVH7V8WcDN1T9ru/7y+NjcNmIqdTX2mRd/IH63K/L7Rzz7GTMYbv88/dnOj+kN'),
|
||||
this.addDataEntry(dt + ' fk pk foreign key primary', 180, 30, 'Table Row 3', 'xVXbTsMwDP2avqKupYjnloEQQ0IMPiCsXhuRxSXxaMfX4zTpriCGxISUSjkntmuf00uUFovuxoimvscSVJSOo7QwiOR3i64ApaIklmWUXkVJEvMVJdffnI7607gRBjQdk5D4hHehluAZT1haqUDYWjRuS+LFUbklYWgqPxwXM56hJiE1GMajHislGiv7aM/UUpUTscIlDXUGlM9lB+UjtjbEGmwnXMyG4nMuPg29OCyUrDTvZzyfu2NuwHIrE2EpFLBk8BUKVOga0qihv4tSe1QYHAxB9614PRWUuwFcAJkVh7SypDpEXHqB4xpkVYe0NHDCelytUzdW8Ca48bUz6fHOcMckhXqEGQld9SbtmuCUKw02T8JUQIFoUDoNx+887VruQ50Im3CoYD7kviARLgbLwuDrov3UWc6LdSjisyzKuN2C8WiDeblwQwVq9oyfIFcD2MgWnJnHGZT8n0HnBwY93P3OIq0d3Fj0a/XjPfW33xbnDLJ6c4Utw1qWJehjZU1/lDU9karZgarPWr4t4fbqn7Udvjw+NreNmEldTXzmxZ742QnE73ZF3n7Es78xg+Hmz9Of7fyYPgE='),
|
||||
this.addEntry(dt + ' list', function()
|
||||
{
|
||||
var cell = new mxCell('List', new mxGeometry(0, 0, 160, 110),
|
||||
|
|
|
@ -1327,7 +1327,7 @@
|
|||
r * 0.45, r * 0.5, '', 'Virtual Network Gateways', null, null, this.getTagsForStencil(gn, 'vpn gateway gateways virtual private network', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(s + 'Virtual_Network.svg;',
|
||||
r * 0.5, r * 0.28, '', 'Virtual Networks', null, null, this.getTagsForStencil(gn, 'virtual network networks', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(s + 'aspect=fixed;html=1;perimeter=none;align=center;shadow=0;dashed=0;image;fontSize=12;image=img/lib/mscae/Virtual_WANs.svg;',
|
||||
this.createVertexTemplateEntry(s + 'Virtual_WANs.svg;',
|
||||
r * 0.5, r * 0.5, '', 'Virtual WANs', null, null, this.getTagsForStencil(gn, 'virtual wans wan wide area network networks', dt).join(' '))
|
||||
];
|
||||
|
||||
|
|
477
src/main/webapp/js/extensions.min.js
vendored
477
src/main/webapp/js/extensions.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -6761,9 +6761,8 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
|
||||
if (rows.length > 0)
|
||||
{
|
||||
var cell = (clone) ? this.cloneCell(cells[i]) : cells[i];
|
||||
|
||||
var sourceCols = this.model.getChildCells(cell, true);
|
||||
cells[i] = (clone) ? this.cloneCell(cells[i]) : cells[i];
|
||||
var sourceCols = this.model.getChildCells(cells[i], true);
|
||||
var cols = this.model.getChildCells(rows[0], true);
|
||||
var count = cols.length - sourceCols.length;
|
||||
|
||||
|
@ -6777,7 +6776,7 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
{
|
||||
col.value = '';
|
||||
|
||||
this.model.add(cell, col);
|
||||
this.model.add(cells[i], col);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6790,7 +6789,7 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
}
|
||||
|
||||
// Updates column widths
|
||||
sourceCols = this.model.getChildCells(cell, true);
|
||||
sourceCols = this.model.getChildCells(cells[i], true);
|
||||
|
||||
for (var j = 0; j < cols.length; j++)
|
||||
{
|
||||
|
|
1056
src/main/webapp/js/viewer-static.min.js
vendored
1056
src/main/webapp/js/viewer-static.min.js
vendored
File diff suppressed because it is too large
Load diff
1056
src/main/webapp/js/viewer.min.js
vendored
1056
src/main/webapp/js/viewer.min.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -83,6 +83,109 @@ Draw.loadPlugin(function(ui)
|
|||
}
|
||||
};
|
||||
|
||||
var xdm_e = decodeURIComponent(urlParams['site']);
|
||||
var license = urlParams['atlas-lic'];
|
||||
|
||||
ui.checkConfLicense(license, xdm_e, function(licenseValid)
|
||||
{
|
||||
if (!licenseValid)
|
||||
{
|
||||
ui.menus.get('file').funct = function(menu, parent)
|
||||
{
|
||||
menu.addItem(mxResources.get('licenseRequired'), null, function()
|
||||
{
|
||||
// do nothing
|
||||
}, parent, null, false);
|
||||
}
|
||||
|
||||
ui.menus.get('insertAdvanced').funct = function(menu, parent)
|
||||
{
|
||||
menu.addItem(mxResources.get('licenseRequired'), null, function()
|
||||
{
|
||||
// do nothing
|
||||
}, parent, null, false);
|
||||
}
|
||||
|
||||
if (typeof(MathJax) !== 'undefined')
|
||||
{
|
||||
ui.actions.get('mathematicalTypesetting').funct = function()
|
||||
{
|
||||
ui.alert(mxResources.get('licenseRequired'));
|
||||
};
|
||||
}
|
||||
|
||||
EditorUi.prototype.insertPage = function(page, index)
|
||||
{
|
||||
this.alert(mxResources.get('licenseRequired'));
|
||||
};
|
||||
|
||||
Sidebar.prototype.searchEntries = function(searchTerms, count, page, success, error)
|
||||
{
|
||||
success();
|
||||
};
|
||||
|
||||
Sidebar.prototype.insertSearchHint = function(div, searchTerm, count, page, results, len, more, terms)
|
||||
{
|
||||
var link = document.createElement('div');
|
||||
link.className = 'geTitle';
|
||||
link.style.cssText = 'background-color:#ffd350;border-radius:6px;color:black;' +
|
||||
'border:1px solid black !important;text-align:center;white-space:normal;' +
|
||||
'padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;font-size:12px;';
|
||||
mxUtils.write(link, mxResources.get('licenseRequired'));
|
||||
div.appendChild(link);
|
||||
};
|
||||
|
||||
ui.actions.addAction('support...', function()
|
||||
{
|
||||
ui.remoteInvoke('getPageInfo', [true], null, function(info)
|
||||
{
|
||||
var url = info.url;
|
||||
|
||||
if (url != null)
|
||||
{
|
||||
var wikiPos = url.indexOf('/wiki/');
|
||||
|
||||
if (wikiPos > -1)
|
||||
{
|
||||
url = url.substring(0, wikiPos);
|
||||
}
|
||||
|
||||
ui.openLink(url + '/wiki/plugins/servlet/ac/com.mxgraph.confluence.plugins.diagramly/support');
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.openLink('https://about.draw.io/support/');
|
||||
}
|
||||
}, function()
|
||||
{
|
||||
ui.openLink('https://about.draw.io/support/');
|
||||
});
|
||||
});
|
||||
|
||||
DrawioFileSync.prototype.fileChangedNotify = function()
|
||||
{
|
||||
//Disable RT syncing
|
||||
};
|
||||
|
||||
ui.importFiles = function()
|
||||
{
|
||||
//Disable DnD and file import
|
||||
ui.alert(mxResources.get('licenseRequired'));
|
||||
}
|
||||
|
||||
//Disable comments
|
||||
ui.getComments = function(success, error)
|
||||
{
|
||||
error({message: mxResources.get('licenseRequired')});
|
||||
}
|
||||
|
||||
ui.addComment = function(comment, success, error)
|
||||
{
|
||||
error();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
renameAction.funct = function()
|
||||
{
|
||||
var dlg = new FilenameDialog(ui, macroData.diagramDisplayName || "",
|
||||
|
@ -1150,7 +1253,8 @@ Draw.loadPlugin(function(ui)
|
|||
var actArgs = arguments;
|
||||
var curFile = ui.getCurrentFile();
|
||||
var desc = curFile.getDescriptor();
|
||||
|
||||
var isNewFile = desc == null || desc.key == null;
|
||||
|
||||
if (exit)
|
||||
{
|
||||
//Prevent stpping the spinner early by creating our own spinner
|
||||
|
@ -1168,7 +1272,11 @@ Draw.loadPlugin(function(ui)
|
|||
zIndex: 2e9 // The z-index (defaults to 2000000000)
|
||||
});
|
||||
|
||||
spinner.spin(document.body);
|
||||
if (!isNewFile)
|
||||
{
|
||||
spinner.spin(document.body);
|
||||
}
|
||||
|
||||
allowAutoSave = false;
|
||||
|
||||
if (desc != null)
|
||||
|
@ -1221,7 +1329,7 @@ Draw.loadPlugin(function(ui)
|
|||
}
|
||||
};
|
||||
|
||||
if (desc == null || desc.key == null)
|
||||
if (isNewFile)
|
||||
{
|
||||
//New files are saved directly and descriptor is added during publishing after creating the custom content
|
||||
doActions();
|
||||
|
|
|
@ -245,7 +245,7 @@ Draw.loadPlugin(function(ui)
|
|||
|
||||
ui.addComment = function(comment, success, error)
|
||||
{
|
||||
if (commentsVer == null)
|
||||
if (commentsVer == null || !comment.content)
|
||||
{
|
||||
error();
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ Draw.loadPlugin(function(ui)
|
|||
|
||||
DrawioComment.prototype.addReply = function(reply, success, error, doResolve, doReopen)
|
||||
{
|
||||
if (commentsVer == null)
|
||||
if (commentsVer == null || !reply.content)
|
||||
{
|
||||
error();
|
||||
}
|
||||
|
|
72
src/main/webapp/plugins/cConf-license.js
Normal file
72
src/main/webapp/plugins/cConf-license.js
Normal file
|
@ -0,0 +1,72 @@
|
|||
/**
|
||||
* Plugin for Confluence Cloud to get the license
|
||||
*/
|
||||
Draw.loadPlugin(function(ui)
|
||||
{
|
||||
ui.checkConfLicense = function(license, xdm_e, callback)
|
||||
{
|
||||
//Exclude dev domain
|
||||
if (location.host == 'test.draw.io')
|
||||
{
|
||||
callback(true);
|
||||
return;
|
||||
}
|
||||
|
||||
var licenseValid = true;
|
||||
|
||||
if (license != null && xdm_e != null && license == 'none')
|
||||
{
|
||||
var hostParse = document.createElement('a');
|
||||
hostParse.href = xdm_e;
|
||||
var hostname = hostParse.hostname;
|
||||
|
||||
if (hostname != null)
|
||||
{
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.onreadystatechange = function()
|
||||
{
|
||||
if (xhr.readyState == XMLHttpRequest.DONE)
|
||||
{
|
||||
if (xhr.status >= 200 && xhr.status <= 299)
|
||||
{
|
||||
var resp = xhr.responseText;
|
||||
|
||||
if (resp != null && resp.length > 0)
|
||||
{
|
||||
var lic = JSON.parse(resp);
|
||||
|
||||
if (lic.atlasCloudLic != 'blocked')
|
||||
{
|
||||
licenseValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
licenseValid = false;
|
||||
}
|
||||
}
|
||||
else if (resp != null && resp.length == 0)
|
||||
{
|
||||
// JSON parse fails on empty response
|
||||
licenseValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
callback(licenseValid);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.open('POST', '/license?domain=' + hostname, true);
|
||||
xhr.send(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback(licenseValid);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
callback(licenseValid);
|
||||
}
|
||||
};
|
||||
});
|
|
@ -6,11 +6,11 @@ if (workbox)
|
|||
workbox.precaching.precacheAndRoute([
|
||||
{
|
||||
"url": "js/app.min.js",
|
||||
"revision": "00e7d3bcbea2b3811e7253c2e9c7a7c0"
|
||||
"revision": "a87e550a0b63acad9cbce46bf868ac41"
|
||||
},
|
||||
{
|
||||
"url": "js/extensions.min.js",
|
||||
"revision": "00af9ac1f18b4323620b8bb9aaf405cd"
|
||||
"revision": "c2c9c58a0546e7778478a1c776522371"
|
||||
},
|
||||
{
|
||||
"url": "js/stencils.min.js",
|
||||
|
@ -58,7 +58,7 @@ if (workbox)
|
|||
},
|
||||
{
|
||||
"url": "js/viewer-static.min.js",
|
||||
"revision": "c50a79694590279c568e710816bdf755"
|
||||
"revision": "a5ddc3d436695ead0b667108603fe0b8"
|
||||
},
|
||||
{
|
||||
"url": "connect/jira/editor-1-3-3.html",
|
||||
|
@ -98,15 +98,15 @@ if (workbox)
|
|||
},
|
||||
{
|
||||
"url": "plugins/cConf-comments.js",
|
||||
"revision": "dc57594d2cefbe35c15962a3ec356d24"
|
||||
"revision": "c787357209cff2986dcca567b599e2ef"
|
||||
},
|
||||
{
|
||||
"url": "plugins/cConf-1-4-8.js",
|
||||
"revision": "5f51c9102e55474da1f3012c011d6191"
|
||||
"revision": "d4b6949adc409b03e1d5b59a86097c2c"
|
||||
},
|
||||
{
|
||||
"url": "connect/confluence/connectUtils-1-4-8.js",
|
||||
"revision": "d54d62f9176629eca20430ebd4971e44"
|
||||
"revision": "e8f43aacb75e2c30255d54f1ec6aa329"
|
||||
},
|
||||
{
|
||||
"url": "connect/new_common/cac.js",
|
||||
|
@ -126,11 +126,11 @@ if (workbox)
|
|||
},
|
||||
{
|
||||
"url": "connect/confluence/viewer.js",
|
||||
"revision": "0723f9accfc7b551a4479ad5949f2674"
|
||||
"revision": "d7fccec24c1f564fe1bf5bcbf90e995c"
|
||||
},
|
||||
{
|
||||
"url": "connect/confluence/viewer-1-4-42.html",
|
||||
"revision": "0e9ad57d31303c201f285b2739f34169"
|
||||
"revision": "41d092d7582c7f7883ebba7e99cc3b16"
|
||||
},
|
||||
{
|
||||
"url": "connect/confluence/macroEditor-1-4-8.html",
|
||||
|
@ -138,7 +138,7 @@ if (workbox)
|
|||
},
|
||||
{
|
||||
"url": "connect/confluence/macro-editor.js",
|
||||
"revision": "d9cdbf5e25fa38f36673b1f9d508c6f3"
|
||||
"revision": "26a726d518d3927274cfc35eff079e5f"
|
||||
},
|
||||
{
|
||||
"url": "math/MathJax.js",
|
||||
|
|
Loading…
Reference in a new issue