12.9.14 release
This commit is contained in:
parent
247767c8e1
commit
b648bc0c32
12 changed files with 199 additions and 158 deletions
|
@ -1,3 +1,7 @@
|
|||
16-APR-2020: 12.9.14
|
||||
|
||||
- renamed jscolor to mxJSColor to avoid clash
|
||||
|
||||
15-APR-2020: 12.9.13
|
||||
|
||||
- Adds file properties dialog
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
12.9.13
|
||||
12.9.14
|
|
@ -126,6 +126,7 @@ const redirectMap = new Map([
|
|||
['/features/examples/', 'https://drawio-app.com/'],
|
||||
['/features/training-material/', 'https://drawio-app.com/tutorials/'],
|
||||
['/terms-conditions/', 'https://seibert-media.com/general-terms/'],
|
||||
['/support/', 'https://github.com/jgraph/drawio/wiki/Getting-Support'],
|
||||
['/', 'https://drawio-app.com/']
|
||||
])],
|
||||
['blog.draw.io', new Map([
|
||||
|
|
|
@ -949,6 +949,7 @@
|
|||
{
|
||||
var isPng = fileInfo.mimeType == 'image/png';
|
||||
var timestamp = new Date(fileInfo.modifiedDate).getTime();
|
||||
viewer.updateTitle(fileInfo.title);
|
||||
|
||||
AC.getAttachmentInfo(id, name, function(info)
|
||||
{
|
||||
|
@ -986,6 +987,7 @@
|
|||
{
|
||||
var isPng = fileInfo.file.mimeType == 'image/png';
|
||||
var timestamp = new Date(fileInfo.lastModifiedDateTime).getTime();
|
||||
viewer.updateTitle(fileInfo.name);
|
||||
|
||||
AC.getAttachmentInfo(id, name, function(info)
|
||||
{
|
||||
|
|
|
@ -336,26 +336,35 @@
|
|||
'width:' + tileWidthCss + ';height:' + tileWidthCss + ';border:1px solid transparent;overflow: hidden;';
|
||||
container.className = 'loading';
|
||||
|
||||
//Find displayName
|
||||
value.displayName = value.filename || value.displayName || value.diagramName;
|
||||
|
||||
// Adds filename and ID to side panel
|
||||
var title = document.createElement('div');
|
||||
var title = document.createElement('div'), createDate = null;
|
||||
|
||||
if (value.createDate != null)
|
||||
function setTitle()
|
||||
{
|
||||
var createDate = value.createDate.toLocaleString();
|
||||
mxUtils.write(title, value.filename + ' (' + createDate + ')');
|
||||
var displayName = value.author != null ? value.author.displayName : '';
|
||||
title.setAttribute('title', value.filename + ' (' + createDate + ') - ' + displayName +
|
||||
' [ID: ' + value.id + ']');
|
||||
}
|
||||
else
|
||||
{
|
||||
var t = value.displayName || value.diagramName;
|
||||
mxUtils.write(title, t);
|
||||
var modifiedDate = value.modifiedDate? ' (' + new Date(value.modifiedDate).toLocaleString() + ')' : '';
|
||||
title.setAttribute('title', t + modifiedDate + (value.createdBy? ' - ' + value.createdBy : '') +
|
||||
(value.lastModifiedBy? ' [Last Modified By: ' + value.lastModifiedBy + ']' : ''));
|
||||
}
|
||||
title.innerHTML = '';
|
||||
|
||||
if (value.createDate != null)
|
||||
{
|
||||
createDate = value.createDate.toLocaleString();
|
||||
mxUtils.write(title, value.filename + ' (' + createDate + ')');
|
||||
var displayName = value.author != null ? value.author.displayName : '';
|
||||
title.setAttribute('title', value.filename + ' (' + createDate + ') - ' + displayName +
|
||||
' [ID: ' + value.id + ']');
|
||||
}
|
||||
else
|
||||
{
|
||||
var t = value.displayName || value.diagramName;
|
||||
mxUtils.write(title, t);
|
||||
var modifiedDate = value.modifiedDate? ' (' + new Date(value.modifiedDate).toLocaleString() + ')' : '';
|
||||
title.setAttribute('title', t + modifiedDate + (value.createdBy? ' - ' + value.createdBy : '') +
|
||||
(value.lastModifiedBy? ' [Last Modified By: ' + value.lastModifiedBy + ']' : ''));
|
||||
}
|
||||
};
|
||||
|
||||
setTitle();
|
||||
title.style.cssText = 'position:relative;box-sizing:border-box;width:' + tileWidthCss + ';padding: 6px 0 0 3px;height:' + tbHeight +
|
||||
'px;margin-bottom:-' + tbHeight + 'px;text-align:left;white-space:nowrap;cursor:pointer;overflow:hidden;';
|
||||
tile.appendChild(title);
|
||||
|
@ -414,7 +423,7 @@
|
|||
}},
|
||||
'remove': {title: mxResources.get('delete'), image: removeImage, handler: function()
|
||||
{
|
||||
if (confirm(mxResources.get('removeIt', [value.filename || value.displayName || value.diagramName]) + '?'))
|
||||
if (confirm(mxResources.get('removeIt', [value.displayName]) + '?'))
|
||||
{
|
||||
if (value.diagramUrl != null || value.service != null)
|
||||
{
|
||||
|
@ -595,7 +604,7 @@
|
|||
'toolbar-position': 'top', toolbar: (value.diagramUrl != null || value.service != null? '' : 'edit ') +
|
||||
'pages layers lightbox remove', border: 8, 'auto-fit': true, resize: false,
|
||||
pageId: pageId, layerIds: layerIds,
|
||||
nav: true, title: value.filename || value.displayName || value.diagramName, 'toolbar-buttons': btnDefs});
|
||||
nav: true, title: value.displayName, 'toolbar-buttons': btnDefs});
|
||||
|
||||
// Handles resize of iframe after zoom
|
||||
var graphDoResizeContainer = viewer.graph.doResizeContainer;
|
||||
|
@ -633,11 +642,11 @@
|
|||
|
||||
AP.dialog.create(
|
||||
{
|
||||
header: value.diagramUrl != null || value.service != null? (value.displayName || value.diagramName) : value.filename + ' (' + createDate + ')',
|
||||
header: value.displayName + (createDate? ' (' + createDate + ')' : ''),
|
||||
key: 'drawioFullScreenViewer',
|
||||
size: 'fullscreen',
|
||||
chrome: true,
|
||||
customData: {diagramUrl: value.diagramUrl, diagramName: value.filename || value.displayName || value.diagramName,
|
||||
customData: {diagramUrl: value.diagramUrl, diagramName: value.displayName,
|
||||
diagramId: value.id || attId, pageId: pageId, layerIds: layerIds, diagInfo: value}
|
||||
});
|
||||
};
|
||||
|
@ -759,6 +768,8 @@
|
|||
{
|
||||
var prefix = new Date(fileInfo.modifiedDate).getTime() + '_';
|
||||
var postfix = 'G' + fileInfo.id;
|
||||
value.displayName = fileInfo.title;
|
||||
setTitle();
|
||||
|
||||
tryCachedFile(prefix, postfix, value.nameDiff, function()
|
||||
{
|
||||
|
@ -802,6 +813,8 @@
|
|||
{
|
||||
var prefix = new Date(fileInfo.lastModifiedDateTime).getTime() + '_';
|
||||
var postfix = 'W' + fileInfo.id;
|
||||
value.displayName = fileInfo.name;
|
||||
setTitle();
|
||||
|
||||
tryCachedFile(prefix, postfix, value.nameDiff, function()
|
||||
{
|
||||
|
|
|
@ -285,7 +285,7 @@ if (lang != null)
|
|||
};
|
||||
|
||||
var viewer = new GraphViewer(container, doc.documentElement, {highlight: '#3572b0',
|
||||
'toolbar-position': 'top', toolbar: 'edit pages layers lightbox remove', 'max-height':
|
||||
'toolbar-position': 'top', toolbar: 'pages layers lightbox remove', 'max-height':
|
||||
Math.max(280, document.documentElement.offsetWidth / 1.5), border: 8,
|
||||
/* disables automatic zoom with no buttons */'auto-fit': false,
|
||||
nav: true, title: value.filename + ' [' + value.id + ']', 'toolbar-buttons': btnDefs});
|
||||
|
|
53
src/main/webapp/js/app.min.js
vendored
53
src/main/webapp/js/app.min.js
vendored
|
@ -2011,36 +2011,37 @@ for(var b=0;b<c.length;b++){for(var f=c[b].getAttribute("as"),g=c[b].firstChild;
|
|||
@updated 2012-01-19
|
||||
@link http://jscolor.com
|
||||
*/
|
||||
var jscolor={bindClass:"color",binding:!0,preloading:!0,install:function(){},init:function(){jscolor.preloading&&jscolor.preload()},getDir:function(){return IMAGE_PATH+"/"},detectDir:function(){for(var a=location.href,b=document.getElementsByTagName("base"),c=0;c<b.length;c+=1)b[c].href&&(a=b[c].href);b=document.getElementsByTagName("script");for(c=0;c<b.length;c+=1)if(b[c].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(b[c].src))return a=(new jscolor.URI(b[c].src)).toAbsolute(a),a.path=a.path.replace(/[^\/]+$/,
|
||||
""),a.query=null,a.fragment=null,a.toString();return!1},preload:function(){for(var a in jscolor.imgRequire)jscolor.imgRequire.hasOwnProperty(a)&&jscolor.loadImage(a)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(a){jscolor.imgRequire[a]=!0},loadImage:function(a){jscolor.imgLoaded[a]||(jscolor.imgLoaded[a]=new Image,jscolor.imgLoaded[a].src=jscolor.getDir()+a)},fetchElement:function(a){return"string"===typeof a?document.getElementById(a):
|
||||
var mxJSColor={bindClass:"color",binding:!0,preloading:!0,install:function(){},init:function(){mxJSColor.preloading&&mxJSColor.preload()},getDir:function(){return IMAGE_PATH+"/"},detectDir:function(){for(var a=location.href,b=document.getElementsByTagName("base"),c=0;c<b.length;c+=1)b[c].href&&(a=b[c].href);b=document.getElementsByTagName("script");for(c=0;c<b.length;c+=1)if(b[c].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(b[c].src))return a=(new mxJSColor.URI(b[c].src)).toAbsolute(a),a.path=a.path.replace(/[^\/]+$/,
|
||||
""),a.query=null,a.fragment=null,a.toString();return!1},preload:function(){for(var a in mxJSColor.imgRequire)mxJSColor.imgRequire.hasOwnProperty(a)&&mxJSColor.loadImage(a)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(a){mxJSColor.imgRequire[a]=!0},loadImage:function(a){mxJSColor.imgLoaded[a]||(mxJSColor.imgLoaded[a]=new Image,mxJSColor.imgLoaded[a].src=mxJSColor.getDir()+a)},fetchElement:function(a){return"string"===typeof a?document.getElementById(a):
|
||||
a},addEvent:function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},fireEvent:function(a,b){if(a)if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0);a.dispatchEvent(c)}else if(document.createEventObject)c=document.createEventObject(),a.fireEvent("on"+b,c);else if(a["on"+b])a["on"+b]()},getElementPos:function(a){var b=a,c=0,d=0;if(b.offsetParent){do c+=b.offsetLeft,d+=b.offsetTop;while(b=b.offsetParent)}for(;(a=a.parentNode)&&
|
||||
"BODY"!==a.nodeName.toUpperCase();)c-=a.scrollLeft,d-=a.scrollTop;return[c,d]},getElementSize:function(a){return[a.offsetWidth,a.offsetHeight]},getRelMousePos:function(a){var b=0,c=0;a||(a=window.event);"number"===typeof a.offsetX?(b=a.offsetX,c=a.offsetY):"number"===typeof a.layerX&&(b=a.layerX,c=a.layerY);return{x:b,y:c}},getViewPos:function(){return"number"===typeof window.pageYOffset?[window.pageXOffset,window.pageYOffset]:document.body&&(document.body.scrollLeft||document.body.scrollTop)?[document.body.scrollLeft,
|
||||
document.body.scrollTop]:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[0,0]},getViewSize:function(){return"number"===typeof window.innerWidth?[window.innerWidth,window.innerHeight]:document.body&&(document.body.clientWidth||document.body.clientHeight)?[document.body.clientWidth,document.body.clientHeight]:document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?
|
||||
[document.documentElement.clientWidth,document.documentElement.clientHeight]:[0,0]},URI:function(a){function b(a){for(var b="";a;)if("../"===a.substr(0,3)||"./"===a.substr(0,2))a=a.replace(/^\.+/,"").substr(1);else if("/./"===a.substr(0,3)||"/."===a)a="/"+a.substr(3);else if("/../"===a.substr(0,4)||"/.."===a)a="/"+a.substr(4),b=b.replace(/\/?[^\/]*$/,"");else if("."===a||".."===a)a="";else{var c=a.match(/^\/?[^\/]*/)[0];a=a.substr(c.length);b+=c}return b}this.authority=this.scheme=null;this.path=
|
||||
"";this.fragment=this.query=null;this.parse=function(a){a=a.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);this.scheme=a[3]?a[2]:null;this.authority=a[5]?a[6]:null;this.path=a[7];this.query=a[9]?a[10]:null;this.fragment=a[12]?a[13]:null;return this};this.toString=function(){var a="";null!==this.scheme&&(a=a+this.scheme+":");null!==this.authority&&(a=a+"//"+this.authority);null!==this.path&&(a+=this.path);null!==this.query&&(a=a+"?"+this.query);null!==
|
||||
this.fragment&&(a=a+"#"+this.fragment);return a};this.toAbsolute=function(a){a=new jscolor.URI(a);var c=new jscolor.URI;if(null===a.scheme)return!1;null!==this.scheme&&this.scheme.toLowerCase()===a.scheme.toLowerCase()&&(this.scheme=null);null!==this.scheme?(c.scheme=this.scheme,c.authority=this.authority,c.path=b(this.path),c.query=this.query):(null!==this.authority?(c.authority=this.authority,c.path=b(this.path),c.query=this.query):(""===this.path?(c.path=a.path,c.query=null!==this.query?this.query:
|
||||
this.fragment&&(a=a+"#"+this.fragment);return a};this.toAbsolute=function(a){a=new mxJSColor.URI(a);var c=new mxJSColor.URI;if(null===a.scheme)return!1;null!==this.scheme&&this.scheme.toLowerCase()===a.scheme.toLowerCase()&&(this.scheme=null);null!==this.scheme?(c.scheme=this.scheme,c.authority=this.authority,c.path=b(this.path),c.query=this.query):(null!==this.authority?(c.authority=this.authority,c.path=b(this.path),c.query=this.query):(""===this.path?(c.path=a.path,c.query=null!==this.query?this.query:
|
||||
a.query):("/"===this.path.substr(0,1)?c.path=b(this.path):(c.path=null!==a.authority&&""===a.path?"/"+this.path:a.path.replace(/[^\/]+$/,"")+this.path,c.path=b(c.path)),c.query=this.query),c.authority=a.authority),c.scheme=a.scheme);c.fragment=this.fragment;return c};a&&this.parse(a)},color:function(a,b){function c(a,b,c){if(null===a)return[c,c,c];var d=Math.floor(a),e=c*(1-b);a=c*(1-b*(d%2?a-d:1-(a-d)));switch(d){case 6:case 0:return[c,a,e];case 1:return[a,c,e];case 2:return[e,c,a];case 3:return[e,
|
||||
a,c];case 4:return[a,e,c];case 5:return[c,e,a]}}function d(b,c){if(!jscolor.picker){jscolor.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),btn:document.createElement("div"),btnS:document.createElement("span"),btnT:document.createTextNode(r.pickerCloseText)};for(var d=
|
||||
0;d<jscolor.images.sld[1];d+=4){var k=document.createElement("div");k.style.height="4px";k.style.fontSize="1px";k.style.lineHeight="0";jscolor.picker.sld.appendChild(k)}jscolor.picker.sldB.appendChild(jscolor.picker.sld);jscolor.picker.box.appendChild(jscolor.picker.sldB);jscolor.picker.box.appendChild(jscolor.picker.sldM);jscolor.picker.padB.appendChild(jscolor.picker.pad);jscolor.picker.box.appendChild(jscolor.picker.padB);jscolor.picker.box.appendChild(jscolor.picker.padM);jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
|
||||
jscolor.picker.btn.appendChild(jscolor.picker.btnS);jscolor.picker.box.appendChild(jscolor.picker.btn);jscolor.picker.boxB.appendChild(jscolor.picker.box)}var l=jscolor.picker;l.box.onmouseup=l.box.onmouseout=function(){mxClient.IS_TOUCH||a.focus()};l.box.onmousedown=function(){};l.box.onmousemove=function(a){if(y||B)y&&m(a),B&&n(a),document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),p()};l.padM.onmouseup=l.padM.onmouseout=function(){y&&(y=!1,
|
||||
jscolor.fireEvent(u,"change"))};l.padM.onmousedown=function(a){switch(t){case 0:0===r.hsv[2]&&r.fromHSV(null,null,1);break;case 1:0===r.hsv[1]&&r.fromHSV(null,1,null)}y=!0;m(a);p()};l.sldM.onmouseup=l.sldM.onmouseout=function(){B&&(B=!1,jscolor.fireEvent(u,"change"))};l.sldM.onmousedown=function(a){B=!0;n(a);p()};d=e(r);l.box.style.width=d[0]+"px";l.box.style.height=d[1]+"px";l.boxB.style.position="absolute";l.boxB.style.clear="both";l.boxB.style.left=b+"px";l.boxB.style.top=c+"px";l.boxB.style.zIndex=
|
||||
r.pickerZIndex;l.boxB.style.border=r.pickerBorder+"px solid";l.boxB.style.borderColor=r.pickerBorderColor;l.boxB.style.background=r.pickerFaceColor;l.pad.style.width=jscolor.images.pad[0]+"px";l.pad.style.height=jscolor.images.pad[1]+"px";l.padB.style.position="absolute";l.padB.style.left=r.pickerFace+"px";l.padB.style.top=r.pickerFace+"px";l.padB.style.border=r.pickerInset+"px solid";l.padB.style.borderColor=r.pickerInsetColor;l.padM.style.position="absolute";l.padM.style.left="0";l.padM.style.top=
|
||||
"0";l.padM.style.width=r.pickerFace+2*r.pickerInset+jscolor.images.pad[0]+jscolor.images.arrow[0]+"px";l.padM.style.height=l.box.style.height;l.padM.style.cursor="crosshair";l.sld.style.overflow="hidden";l.sld.style.width=jscolor.images.sld[0]+"px";l.sld.style.height=jscolor.images.sld[1]+"px";l.sldB.style.display=r.slider?"block":"none";l.sldB.style.position="absolute";l.sldB.style.right=r.pickerFace+"px";l.sldB.style.top=r.pickerFace+"px";l.sldB.style.border=r.pickerInset+"px solid";l.sldB.style.borderColor=
|
||||
r.pickerInsetColor;l.sldM.style.display=r.slider?"block":"none";l.sldM.style.position="absolute";l.sldM.style.right="0";l.sldM.style.top="0";l.sldM.style.width=jscolor.images.sld[0]+jscolor.images.arrow[0]+r.pickerFace+2*r.pickerInset+"px";l.sldM.style.height=l.box.style.height;try{l.sldM.style.cursor="pointer"}catch(F){l.sldM.style.cursor="hand"}l.btn.style.display=r.pickerClosable?"block":"none";l.btn.style.position="absolute";l.btn.style.left=r.pickerFace+"px";l.btn.style.bottom=r.pickerFace+"px";
|
||||
l.btn.style.padding="0 15px";l.btn.style.height="18px";l.btn.style.border=r.pickerInset+"px solid";(function(){var a=r.pickerInsetColor.split(/\s+/);l.btn.style.borderColor=2>a.length?a[0]:a[1]+" "+a[0]+" "+a[0]+" "+a[1]})();l.btn.style.color=r.pickerButtonColor;l.btn.style.font="12px sans-serif";l.btn.style.textAlign="center";try{l.btn.style.cursor="pointer"}catch(F){l.btn.style.cursor="hand"}l.btn.onmousedown=function(){r.hidePicker()};l.btnS.style.lineHeight=l.btn.style.height;switch(t){case 0:var q=
|
||||
"hs.png";break;case 1:q="hv.png"}l.padM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=)";l.padM.style.backgroundRepeat="no-repeat";l.sldM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7)";l.sldM.style.backgroundRepeat="no-repeat";l.pad.style.backgroundImage="url('"+jscolor.getDir()+q+"')";l.pad.style.backgroundRepeat=
|
||||
"no-repeat";l.pad.style.backgroundPosition="0 0";f();g();jscolor.picker.owner=r;document.getElementsByTagName("body")[0].appendChild(l.boxB)}function e(a){return[2*a.pickerInset+2*a.pickerFace+jscolor.images.pad[0]+(a.slider?2*a.pickerInset+2*jscolor.images.arrow[0]+jscolor.images.sld[0]:0),a.pickerClosable?4*a.pickerInset+3*a.pickerFace+jscolor.images.pad[1]+a.pickerButtonHeight:2*a.pickerInset+2*a.pickerFace+jscolor.images.pad[1]]}function f(){switch(t){case 0:var a=1;break;case 1:a=2}jscolor.picker.padM.style.backgroundPosition=
|
||||
r.pickerFace+r.pickerInset+Math.round(r.hsv[0]/6*(jscolor.images.pad[0]-1))-Math.floor(jscolor.images.cross[0]/2)+"px "+(r.pickerFace+r.pickerInset+Math.round((1-r.hsv[a])*(jscolor.images.pad[1]-1))-Math.floor(jscolor.images.cross[1]/2))+"px";a=jscolor.picker.sld.childNodes;switch(t){case 0:for(var b=c(r.hsv[0],r.hsv[1],1),d=0;d<a.length;d+=1)a[d].style.backgroundColor="rgb("+b[0]*(1-d/a.length)*100+"%,"+b[1]*(1-d/a.length)*100+"%,"+b[2]*(1-d/a.length)*100+"%)";break;case 1:var e,f=[r.hsv[2],0,0],
|
||||
d=Math.floor(r.hsv[0]),g=d%2?r.hsv[0]-d:1-(r.hsv[0]-d);switch(d){case 6:case 0:b=[0,1,2];break;case 1:b=[1,0,2];break;case 2:b=[2,0,1];break;case 3:b=[2,1,0];break;case 4:b=[1,2,0];break;case 5:b=[0,2,1]}for(d=0;d<a.length;d+=1)e=1-1/(a.length-1)*d,f[1]=f[0]*(1-e*g),f[2]=f[0]*(1-e),a[d].style.backgroundColor="rgb("+100*f[b[0]]+"%,"+100*f[b[1]]+"%,"+100*f[b[2]]+"%)"}}function g(){switch(t){case 0:var a=2;break;case 1:a=1}jscolor.picker.sldM.style.backgroundPosition="0 "+(r.pickerFace+r.pickerInset+
|
||||
Math.round((1-r.hsv[a])*(jscolor.images.sld[1]-1))-Math.floor(jscolor.images.arrow[1]/2))+"px"}function k(){return jscolor.picker&&jscolor.picker.owner===r}function l(){u!==a&&r.importColor()}function m(a){var b=jscolor.getRelMousePos(a);a=b.x-r.pickerFace-r.pickerInset;b=b.y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(6/(jscolor.images.pad[0]-1)*a,1-b/(jscolor.images.pad[1]-1),null,v);break;case 1:r.fromHSV(6/(jscolor.images.pad[0]-1)*a,null,1-b/(jscolor.images.pad[1]-1),v)}}function n(a){a=
|
||||
jscolor.getRelMousePos(a).y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(null,null,1-a/(jscolor.images.sld[1]-1),C);break;case 1:r.fromHSV(null,1-a/(jscolor.images.sld[1]-1),null,C)}}function p(){if(r.onImmediateChange)if("string"===typeof r.onImmediateChange)eval(r.onImmediateChange);else r.onImmediateChange(r)}this.adjust=this.required=!0;this.hash=!1;this.slider=this.caps=!0;this.styleElement=this.valueElement=a;this.onImmediateChange=null;this.hsv=[0,0,1];this.rgb=[1,1,1];this.pickerOnfocus=
|
||||
!0;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerSmartPosition=!0;this.pickerButtonHeight=20;this.pickerClosable=!1;this.pickerCloseText="Close";this.pickerButtonColor="ButtonText";this.pickerFace=0;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=1E4;for(var q in b)b.hasOwnProperty(q)&&
|
||||
(this[q]=b[q]);this.hidePicker=function(){k()&&(delete jscolor.picker.owner,document.getElementsByTagName("body")[0].removeChild(jscolor.picker.boxB))};this.showPicker=function(){k()||(jscolor.getElementPos(a),jscolor.getElementSize(a),jscolor.getViewPos(),jscolor.getViewSize(),e(this),this.pickerPosition.toLowerCase(),d(0,0))};this.importColor=function(){u?this.adjust?!this.required&&/^\s*$/.test(u.value)?(u.value="",x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,
|
||||
x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.fromString(u.value)||this.exportColor():this.fromString(u.value,A)||(x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.exportColor()};this.exportColor=function(a){if(!(a&A)&&u){var b=this.toString();this.caps&&(b=b.toUpperCase());this.hash&&(b="#"+b);u.value=b}a&z||!x||(x.style.backgroundImage="none",x.style.backgroundColor="#"+this.toString(),
|
||||
x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000");a&C||!k()||f();a&v||!k()||g()};this.fromHSV=function(a,b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rgb=c(null===a?this.hsv[0]:this.hsv[0]=a,null===b?this.hsv[1]:this.hsv[1]=b,null===d?this.hsv[2]:this.hsv[2]=d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b&&(b=0);1<b&&(b=1);0>c&&(c=0);1<c&&(c=1);a=null===a?this.rgb[0]:this.rgb[0]=a;b=null===b?this.rgb[1]:
|
||||
this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,
|
||||
2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
|
||||
y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
|
||||
a,c];case 4:return[a,e,c];case 5:return[c,e,a]}}function d(b,c){if(!mxJSColor.picker){mxJSColor.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),btn:document.createElement("div"),btnS:document.createElement("span"),btnT:document.createTextNode(r.pickerCloseText)};for(var d=
|
||||
0;d<mxJSColor.images.sld[1];d+=4){var k=document.createElement("div");k.style.height="4px";k.style.fontSize="1px";k.style.lineHeight="0";mxJSColor.picker.sld.appendChild(k)}mxJSColor.picker.sldB.appendChild(mxJSColor.picker.sld);mxJSColor.picker.box.appendChild(mxJSColor.picker.sldB);mxJSColor.picker.box.appendChild(mxJSColor.picker.sldM);mxJSColor.picker.padB.appendChild(mxJSColor.picker.pad);mxJSColor.picker.box.appendChild(mxJSColor.picker.padB);mxJSColor.picker.box.appendChild(mxJSColor.picker.padM);
|
||||
mxJSColor.picker.btnS.appendChild(mxJSColor.picker.btnT);mxJSColor.picker.btn.appendChild(mxJSColor.picker.btnS);mxJSColor.picker.box.appendChild(mxJSColor.picker.btn);mxJSColor.picker.boxB.appendChild(mxJSColor.picker.box)}var l=mxJSColor.picker;l.box.onmouseup=l.box.onmouseout=function(){mxClient.IS_TOUCH||a.focus()};l.box.onmousedown=function(){};l.box.onmousemove=function(a){if(y||B)y&&m(a),B&&n(a),document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),
|
||||
p()};l.padM.onmouseup=l.padM.onmouseout=function(){y&&(y=!1,mxJSColor.fireEvent(u,"change"))};l.padM.onmousedown=function(a){switch(t){case 0:0===r.hsv[2]&&r.fromHSV(null,null,1);break;case 1:0===r.hsv[1]&&r.fromHSV(null,1,null)}y=!0;m(a);p()};l.sldM.onmouseup=l.sldM.onmouseout=function(){B&&(B=!1,mxJSColor.fireEvent(u,"change"))};l.sldM.onmousedown=function(a){B=!0;n(a);p()};d=e(r);l.box.style.width=d[0]+"px";l.box.style.height=d[1]+"px";l.boxB.style.position="absolute";l.boxB.style.clear="both";
|
||||
l.boxB.style.left=b+"px";l.boxB.style.top=c+"px";l.boxB.style.zIndex=r.pickerZIndex;l.boxB.style.border=r.pickerBorder+"px solid";l.boxB.style.borderColor=r.pickerBorderColor;l.boxB.style.background=r.pickerFaceColor;l.pad.style.width=mxJSColor.images.pad[0]+"px";l.pad.style.height=mxJSColor.images.pad[1]+"px";l.padB.style.position="absolute";l.padB.style.left=r.pickerFace+"px";l.padB.style.top=r.pickerFace+"px";l.padB.style.border=r.pickerInset+"px solid";l.padB.style.borderColor=r.pickerInsetColor;
|
||||
l.padM.style.position="absolute";l.padM.style.left="0";l.padM.style.top="0";l.padM.style.width=r.pickerFace+2*r.pickerInset+mxJSColor.images.pad[0]+mxJSColor.images.arrow[0]+"px";l.padM.style.height=l.box.style.height;l.padM.style.cursor="crosshair";l.sld.style.overflow="hidden";l.sld.style.width=mxJSColor.images.sld[0]+"px";l.sld.style.height=mxJSColor.images.sld[1]+"px";l.sldB.style.display=r.slider?"block":"none";l.sldB.style.position="absolute";l.sldB.style.right=r.pickerFace+"px";l.sldB.style.top=
|
||||
r.pickerFace+"px";l.sldB.style.border=r.pickerInset+"px solid";l.sldB.style.borderColor=r.pickerInsetColor;l.sldM.style.display=r.slider?"block":"none";l.sldM.style.position="absolute";l.sldM.style.right="0";l.sldM.style.top="0";l.sldM.style.width=mxJSColor.images.sld[0]+mxJSColor.images.arrow[0]+r.pickerFace+2*r.pickerInset+"px";l.sldM.style.height=l.box.style.height;try{l.sldM.style.cursor="pointer"}catch(F){l.sldM.style.cursor="hand"}l.btn.style.display=r.pickerClosable?"block":"none";l.btn.style.position=
|
||||
"absolute";l.btn.style.left=r.pickerFace+"px";l.btn.style.bottom=r.pickerFace+"px";l.btn.style.padding="0 15px";l.btn.style.height="18px";l.btn.style.border=r.pickerInset+"px solid";(function(){var a=r.pickerInsetColor.split(/\s+/);l.btn.style.borderColor=2>a.length?a[0]:a[1]+" "+a[0]+" "+a[0]+" "+a[1]})();l.btn.style.color=r.pickerButtonColor;l.btn.style.font="12px sans-serif";l.btn.style.textAlign="center";try{l.btn.style.cursor="pointer"}catch(F){l.btn.style.cursor="hand"}l.btn.onmousedown=function(){r.hidePicker()};
|
||||
l.btnS.style.lineHeight=l.btn.style.height;switch(t){case 0:var q="hs.png";break;case 1:q="hv.png"}l.padM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=)";l.padM.style.backgroundRepeat="no-repeat";l.sldM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7)";l.sldM.style.backgroundRepeat="no-repeat";
|
||||
l.pad.style.backgroundImage="url('"+mxJSColor.getDir()+q+"')";l.pad.style.backgroundRepeat="no-repeat";l.pad.style.backgroundPosition="0 0";f();g();mxJSColor.picker.owner=r;document.getElementsByTagName("body")[0].appendChild(l.boxB)}function e(a){return[2*a.pickerInset+2*a.pickerFace+mxJSColor.images.pad[0]+(a.slider?2*a.pickerInset+2*mxJSColor.images.arrow[0]+mxJSColor.images.sld[0]:0),a.pickerClosable?4*a.pickerInset+3*a.pickerFace+mxJSColor.images.pad[1]+a.pickerButtonHeight:2*a.pickerInset+2*
|
||||
a.pickerFace+mxJSColor.images.pad[1]]}function f(){switch(t){case 0:var a=1;break;case 1:a=2}mxJSColor.picker.padM.style.backgroundPosition=r.pickerFace+r.pickerInset+Math.round(r.hsv[0]/6*(mxJSColor.images.pad[0]-1))-Math.floor(mxJSColor.images.cross[0]/2)+"px "+(r.pickerFace+r.pickerInset+Math.round((1-r.hsv[a])*(mxJSColor.images.pad[1]-1))-Math.floor(mxJSColor.images.cross[1]/2))+"px";a=mxJSColor.picker.sld.childNodes;switch(t){case 0:for(var b=c(r.hsv[0],r.hsv[1],1),d=0;d<a.length;d+=1)a[d].style.backgroundColor=
|
||||
"rgb("+b[0]*(1-d/a.length)*100+"%,"+b[1]*(1-d/a.length)*100+"%,"+b[2]*(1-d/a.length)*100+"%)";break;case 1:var e,f=[r.hsv[2],0,0],d=Math.floor(r.hsv[0]),g=d%2?r.hsv[0]-d:1-(r.hsv[0]-d);switch(d){case 6:case 0:b=[0,1,2];break;case 1:b=[1,0,2];break;case 2:b=[2,0,1];break;case 3:b=[2,1,0];break;case 4:b=[1,2,0];break;case 5:b=[0,2,1]}for(d=0;d<a.length;d+=1)e=1-1/(a.length-1)*d,f[1]=f[0]*(1-e*g),f[2]=f[0]*(1-e),a[d].style.backgroundColor="rgb("+100*f[b[0]]+"%,"+100*f[b[1]]+"%,"+100*f[b[2]]+"%)"}}function g(){switch(t){case 0:var a=
|
||||
2;break;case 1:a=1}mxJSColor.picker.sldM.style.backgroundPosition="0 "+(r.pickerFace+r.pickerInset+Math.round((1-r.hsv[a])*(mxJSColor.images.sld[1]-1))-Math.floor(mxJSColor.images.arrow[1]/2))+"px"}function k(){return mxJSColor.picker&&mxJSColor.picker.owner===r}function l(){u!==a&&r.importColor()}function m(a){var b=mxJSColor.getRelMousePos(a);a=b.x-r.pickerFace-r.pickerInset;b=b.y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(6/(mxJSColor.images.pad[0]-1)*a,1-b/(mxJSColor.images.pad[1]-
|
||||
1),null,v);break;case 1:r.fromHSV(6/(mxJSColor.images.pad[0]-1)*a,null,1-b/(mxJSColor.images.pad[1]-1),v)}}function n(a){a=mxJSColor.getRelMousePos(a).y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(null,null,1-a/(mxJSColor.images.sld[1]-1),C);break;case 1:r.fromHSV(null,1-a/(mxJSColor.images.sld[1]-1),null,C)}}function p(){if(r.onImmediateChange)if("string"===typeof r.onImmediateChange)eval(r.onImmediateChange);else r.onImmediateChange(r)}this.adjust=this.required=!0;this.hash=!1;this.slider=
|
||||
this.caps=!0;this.styleElement=this.valueElement=a;this.onImmediateChange=null;this.hsv=[0,0,1];this.rgb=[1,1,1];this.pickerOnfocus=!0;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerSmartPosition=!0;this.pickerButtonHeight=20;this.pickerClosable=!1;this.pickerCloseText="Close";this.pickerButtonColor="ButtonText";this.pickerFace=0;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=
|
||||
1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=1E4;for(var q in b)b.hasOwnProperty(q)&&(this[q]=b[q]);this.hidePicker=function(){k()&&(delete mxJSColor.picker.owner,document.getElementsByTagName("body")[0].removeChild(mxJSColor.picker.boxB))};this.showPicker=function(){k()||(mxJSColor.getElementPos(a),mxJSColor.getElementSize(a),mxJSColor.getViewPos(),mxJSColor.getViewSize(),e(this),this.pickerPosition.toLowerCase(),d(0,0))};this.importColor=
|
||||
function(){u?this.adjust?!this.required&&/^\s*$/.test(u.value)?(u.value="",x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.fromString(u.value)||this.exportColor():this.fromString(u.value,A)||(x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.exportColor()};this.exportColor=function(a){if(!(a&
|
||||
A)&&u){var b=this.toString();this.caps&&(b=b.toUpperCase());this.hash&&(b="#"+b);u.value=b}a&z||!x||(x.style.backgroundImage="none",x.style.backgroundColor="#"+this.toString(),x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000");a&C||!k()||f();a&v||!k()||g()};this.fromHSV=function(a,b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rgb=c(null===a?this.hsv[0]:this.hsv[0]=a,null===b?this.hsv[1]:this.hsv[1]=b,null===d?this.hsv[2]:this.hsv[2]=
|
||||
d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b&&(b=0);1<b&&(b=1);0>c&&(c=0);1<c&&(c=1);a=null===a?this.rgb[0]:this.rgb[0]=a;b=null===b?this.rgb[1]:this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=
|
||||
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
|
||||
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
|
||||
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
|
||||
Editor=function(a,c,d,b,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=b||this.createGraph(c,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
|
||||
function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
|
||||
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
|
||||
|
@ -3387,7 +3388,7 @@ Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeG
|
|||
function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b=
|
||||
document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+q]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
|
||||
a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";
|
||||
h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new jscolor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";k.appendChild(jscolor.picker.box);var l=document.createElement("center");k.appendChild(h);
|
||||
h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new mxJSColor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";k.appendChild(mxJSColor.picker.box);var l=document.createElement("center");k.appendChild(h);
|
||||
mxUtils.br(k);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var p=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?
|
||||
("none"!=b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),p(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(n);null!=c&&("none"==c?(g.fromString("ffffff"),h.value="none"):g.fromString(c));k.appendChild(m);this.picker=g;this.colorInput=h;mxEvent.addListener(k,"keydown",function(c){27==c.keyCode&&(a.hideDialog(),null!=b&&b(),mxEvent.consume(c))});
|
||||
this.container=k};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
|
||||
|
@ -9078,7 +9079,7 @@ x.className="geBtn",m.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.but
|
|||
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(F.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 G=document.createElement("canvas"),E=new Image;E.onload=function(){try{G.getContext("2d").drawImage(E,0,0);var a=G.toDataURL("image/png");Editor.prototype.useCanvasForExport=
|
||||
null!=a&&6<a.length}catch(K){}};E.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(J){}})();
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.13";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.14";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
|
||||
"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
|
||||
!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
|
||||
topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
|
||||
|
|
|
@ -1175,6 +1175,7 @@ GraphViewer.prototype.addToolbar = function()
|
|||
mxUtils.setOpacity(filename, 70);
|
||||
|
||||
toolbar.appendChild(filename);
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
this.minToolbarWidth = buttonCount * 34;
|
||||
|
@ -1646,6 +1647,23 @@ GraphViewer.prototype.showLocalLightbox = function()
|
|||
return ui;
|
||||
};
|
||||
|
||||
GraphViewer.prototype.updateTitle = function(title)
|
||||
{
|
||||
title = title || '';
|
||||
|
||||
if (this.showTitleAsTooltip && this.graph != null && this.graph.container != null)
|
||||
{
|
||||
this.graph.container.setAttribute('title', title);
|
||||
}
|
||||
|
||||
if (this.filename != null)
|
||||
{
|
||||
this.filename.innerHTML = '';
|
||||
mxUtils.write(this.filename, title);
|
||||
this.filename.setAttribute('title', title);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* jscolor, JavaScript Color Picker
|
||||
* jscolor, JavaScript Color Picker (name changed to mxJSColor to avoid conflicts)
|
||||
*
|
||||
* @version 1.3.13
|
||||
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
|
||||
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
|
||||
var jscolor = {
|
||||
var mxJSColor = {
|
||||
|
||||
bindClass : 'color', // class name
|
||||
binding : true, // automatic binding via <input class="...">
|
||||
|
@ -18,13 +18,13 @@ var jscolor = {
|
|||
|
||||
|
||||
install : function() {
|
||||
//jscolor.addEvent(window, 'load', jscolor.init);
|
||||
//mxJSColor.addEvent(window, 'load', mxJSColor.init);
|
||||
},
|
||||
|
||||
|
||||
init : function() {
|
||||
if(jscolor.preloading) {
|
||||
jscolor.preload();
|
||||
if(mxJSColor.preloading) {
|
||||
mxJSColor.preload();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -45,7 +45,7 @@ var jscolor = {
|
|||
var e = document.getElementsByTagName('script');
|
||||
for(var i=0; i<e.length; i+=1) {
|
||||
if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
|
||||
var src = new jscolor.URI(e[i].src);
|
||||
var src = new mxJSColor.URI(e[i].src);
|
||||
var srcAbs = src.toAbsolute(base);
|
||||
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
|
||||
srcAbs.query = null;
|
||||
|
@ -57,9 +57,9 @@ var jscolor = {
|
|||
},
|
||||
|
||||
preload : function() {
|
||||
for(var fn in jscolor.imgRequire) {
|
||||
if(jscolor.imgRequire.hasOwnProperty(fn)) {
|
||||
jscolor.loadImage(fn);
|
||||
for(var fn in mxJSColor.imgRequire) {
|
||||
if(mxJSColor.imgRequire.hasOwnProperty(fn)) {
|
||||
mxJSColor.loadImage(fn);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -78,14 +78,14 @@ var jscolor = {
|
|||
|
||||
|
||||
requireImage : function(filename) {
|
||||
jscolor.imgRequire[filename] = true;
|
||||
mxJSColor.imgRequire[filename] = true;
|
||||
},
|
||||
|
||||
|
||||
loadImage : function(filename) {
|
||||
if(!jscolor.imgLoaded[filename]) {
|
||||
jscolor.imgLoaded[filename] = new Image();
|
||||
jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
|
||||
if(!mxJSColor.imgLoaded[filename]) {
|
||||
mxJSColor.imgLoaded[filename] = new Image();
|
||||
mxJSColor.imgLoaded[filename].src = mxJSColor.getDir()+filename;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -212,9 +212,9 @@ var jscolor = {
|
|||
};
|
||||
|
||||
this.toAbsolute = function(base) {
|
||||
var base = new jscolor.URI(base);
|
||||
var base = new mxJSColor.URI(base);
|
||||
var r = this;
|
||||
var t = new jscolor.URI;
|
||||
var t = new mxJSColor.URI;
|
||||
|
||||
if(base.scheme === null) { return false; }
|
||||
|
||||
|
@ -292,7 +292,7 @@ var jscolor = {
|
|||
|
||||
/*
|
||||
* Usage example:
|
||||
* var myColor = new jscolor.color(myInputElement)
|
||||
* var myColor = new mxJSColor.color(myInputElement)
|
||||
*/
|
||||
|
||||
color : function(target, prop) {
|
||||
|
@ -342,10 +342,10 @@ var jscolor = {
|
|||
|
||||
this.showPicker = function() {
|
||||
if(!isPickerOwner()) {
|
||||
var tp = jscolor.getElementPos(target); // target pos
|
||||
var ts = jscolor.getElementSize(target); // target size
|
||||
var vp = jscolor.getViewPos(); // view pos
|
||||
var vs = jscolor.getViewSize(); // view size
|
||||
var tp = mxJSColor.getElementPos(target); // target pos
|
||||
var ts = mxJSColor.getElementSize(target); // target size
|
||||
var vp = mxJSColor.getViewPos(); // view pos
|
||||
var vs = mxJSColor.getViewSize(); // view size
|
||||
var ps = getPickerDims(this); // picker size
|
||||
var a, b, c;
|
||||
switch(this.pickerPosition.toLowerCase()) {
|
||||
|
@ -526,14 +526,14 @@ var jscolor = {
|
|||
|
||||
|
||||
function removePicker() {
|
||||
delete jscolor.picker.owner;
|
||||
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
|
||||
delete mxJSColor.picker.owner;
|
||||
document.getElementsByTagName('body')[0].removeChild(mxJSColor.picker.boxB);
|
||||
}
|
||||
|
||||
|
||||
function drawPicker(x, y) {
|
||||
if(!jscolor.picker) {
|
||||
jscolor.picker = {
|
||||
if(!mxJSColor.picker) {
|
||||
mxJSColor.picker = {
|
||||
box : document.createElement('div'),
|
||||
boxB : document.createElement('div'),
|
||||
pad : document.createElement('div'),
|
||||
|
@ -546,26 +546,26 @@ var jscolor = {
|
|||
btnS : document.createElement('span'),
|
||||
btnT : document.createTextNode(THIS.pickerCloseText)
|
||||
};
|
||||
for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
|
||||
for(var i=0,segSize=4; i<mxJSColor.images.sld[1]; i+=segSize) {
|
||||
var seg = document.createElement('div');
|
||||
seg.style.height = segSize+'px';
|
||||
seg.style.fontSize = '1px';
|
||||
seg.style.lineHeight = '0';
|
||||
jscolor.picker.sld.appendChild(seg);
|
||||
mxJSColor.picker.sld.appendChild(seg);
|
||||
}
|
||||
jscolor.picker.sldB.appendChild(jscolor.picker.sld);
|
||||
jscolor.picker.box.appendChild(jscolor.picker.sldB);
|
||||
jscolor.picker.box.appendChild(jscolor.picker.sldM);
|
||||
jscolor.picker.padB.appendChild(jscolor.picker.pad);
|
||||
jscolor.picker.box.appendChild(jscolor.picker.padB);
|
||||
jscolor.picker.box.appendChild(jscolor.picker.padM);
|
||||
jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
|
||||
jscolor.picker.btn.appendChild(jscolor.picker.btnS);
|
||||
jscolor.picker.box.appendChild(jscolor.picker.btn);
|
||||
jscolor.picker.boxB.appendChild(jscolor.picker.box);
|
||||
mxJSColor.picker.sldB.appendChild(mxJSColor.picker.sld);
|
||||
mxJSColor.picker.box.appendChild(mxJSColor.picker.sldB);
|
||||
mxJSColor.picker.box.appendChild(mxJSColor.picker.sldM);
|
||||
mxJSColor.picker.padB.appendChild(mxJSColor.picker.pad);
|
||||
mxJSColor.picker.box.appendChild(mxJSColor.picker.padB);
|
||||
mxJSColor.picker.box.appendChild(mxJSColor.picker.padM);
|
||||
mxJSColor.picker.btnS.appendChild(mxJSColor.picker.btnT);
|
||||
mxJSColor.picker.btn.appendChild(mxJSColor.picker.btnS);
|
||||
mxJSColor.picker.box.appendChild(mxJSColor.picker.btn);
|
||||
mxJSColor.picker.boxB.appendChild(mxJSColor.picker.box);
|
||||
}
|
||||
|
||||
var p = jscolor.picker;
|
||||
var p = mxJSColor.picker;
|
||||
|
||||
// controls interaction
|
||||
p.box.onmouseup =
|
||||
|
@ -584,7 +584,7 @@ var jscolor = {
|
|||
}
|
||||
};
|
||||
p.padM.onmouseup =
|
||||
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
|
||||
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; mxJSColor.fireEvent(valueElement,'change'); } };
|
||||
p.padM.onmousedown = function(e) {
|
||||
// if the slider is at the bottom, move it up
|
||||
switch(modeID) {
|
||||
|
@ -596,7 +596,7 @@ var jscolor = {
|
|||
dispatchImmediateChange();
|
||||
};
|
||||
p.sldM.onmouseup =
|
||||
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
|
||||
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; mxJSColor.fireEvent(valueElement,'change'); } };
|
||||
p.sldM.onmousedown = function(e) {
|
||||
holdSld=true;
|
||||
setSld(e);
|
||||
|
@ -619,8 +619,8 @@ var jscolor = {
|
|||
p.boxB.style.background = THIS.pickerFaceColor;
|
||||
|
||||
// pad image
|
||||
p.pad.style.width = jscolor.images.pad[0]+'px';
|
||||
p.pad.style.height = jscolor.images.pad[1]+'px';
|
||||
p.pad.style.width = mxJSColor.images.pad[0]+'px';
|
||||
p.pad.style.height = mxJSColor.images.pad[1]+'px';
|
||||
|
||||
// pad border
|
||||
p.padB.style.position = 'absolute';
|
||||
|
@ -633,14 +633,14 @@ var jscolor = {
|
|||
p.padM.style.position = 'absolute';
|
||||
p.padM.style.left = '0';
|
||||
p.padM.style.top = '0';
|
||||
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
|
||||
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + mxJSColor.images.pad[0] + mxJSColor.images.arrow[0] + 'px';
|
||||
p.padM.style.height = p.box.style.height;
|
||||
p.padM.style.cursor = 'crosshair';
|
||||
|
||||
// slider image
|
||||
p.sld.style.overflow = 'hidden';
|
||||
p.sld.style.width = jscolor.images.sld[0]+'px';
|
||||
p.sld.style.height = jscolor.images.sld[1]+'px';
|
||||
p.sld.style.width = mxJSColor.images.sld[0]+'px';
|
||||
p.sld.style.height = mxJSColor.images.sld[1]+'px';
|
||||
|
||||
// slider border
|
||||
p.sldB.style.display = THIS.slider ? 'block' : 'none';
|
||||
|
@ -655,7 +655,7 @@ var jscolor = {
|
|||
p.sldM.style.position = 'absolute';
|
||||
p.sldM.style.right = '0';
|
||||
p.sldM.style.top = '0';
|
||||
p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
|
||||
p.sldM.style.width = mxJSColor.images.sld[0] + mxJSColor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
|
||||
p.sldM.style.height = p.box.style.height;
|
||||
try {
|
||||
p.sldM.style.cursor = 'pointer';
|
||||
|
@ -699,7 +699,7 @@ var jscolor = {
|
|||
p.padM.style.backgroundRepeat = "no-repeat";
|
||||
p.sldM.style.backgroundImage = "url(data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7)";
|
||||
p.sldM.style.backgroundRepeat = "no-repeat";
|
||||
p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
|
||||
p.pad.style.backgroundImage = "url('"+mxJSColor.getDir()+padImg+"')";
|
||||
p.pad.style.backgroundRepeat = "no-repeat";
|
||||
p.pad.style.backgroundPosition = "0 0";
|
||||
|
||||
|
@ -707,18 +707,18 @@ var jscolor = {
|
|||
redrawPad();
|
||||
redrawSld();
|
||||
|
||||
jscolor.picker.owner = THIS;
|
||||
mxJSColor.picker.owner = THIS;
|
||||
document.getElementsByTagName('body')[0].appendChild(p.boxB);
|
||||
}
|
||||
|
||||
|
||||
function getPickerDims(o) {
|
||||
var dims = [
|
||||
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
|
||||
(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
|
||||
2*o.pickerInset + 2*o.pickerFace + mxJSColor.images.pad[0] +
|
||||
(o.slider ? 2*o.pickerInset + 2*mxJSColor.images.arrow[0] + mxJSColor.images.sld[0] : 0),
|
||||
o.pickerClosable ?
|
||||
4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
|
||||
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
|
||||
4*o.pickerInset + 3*o.pickerFace + mxJSColor.images.pad[1] + o.pickerButtonHeight :
|
||||
2*o.pickerInset + 2*o.pickerFace + mxJSColor.images.pad[1]
|
||||
];
|
||||
return dims;
|
||||
}
|
||||
|
@ -730,14 +730,14 @@ var jscolor = {
|
|||
case 0: var yComponent = 1; break;
|
||||
case 1: var yComponent = 2; break;
|
||||
}
|
||||
var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
|
||||
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
|
||||
jscolor.picker.padM.style.backgroundPosition =
|
||||
(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
|
||||
(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
|
||||
var x = Math.round((THIS.hsv[0]/6) * (mxJSColor.images.pad[0]-1));
|
||||
var y = Math.round((1-THIS.hsv[yComponent]) * (mxJSColor.images.pad[1]-1));
|
||||
mxJSColor.picker.padM.style.backgroundPosition =
|
||||
(THIS.pickerFace+THIS.pickerInset+x - Math.floor(mxJSColor.images.cross[0]/2)) + 'px ' +
|
||||
(THIS.pickerFace+THIS.pickerInset+y - Math.floor(mxJSColor.images.cross[1]/2)) + 'px';
|
||||
|
||||
// redraw the slider image
|
||||
var seg = jscolor.picker.sld.childNodes;
|
||||
var seg = mxJSColor.picker.sld.childNodes;
|
||||
|
||||
switch(modeID) {
|
||||
case 0:
|
||||
|
@ -782,14 +782,14 @@ var jscolor = {
|
|||
case 0: var yComponent = 2; break;
|
||||
case 1: var yComponent = 1; break;
|
||||
}
|
||||
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
|
||||
jscolor.picker.sldM.style.backgroundPosition =
|
||||
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
|
||||
var y = Math.round((1-THIS.hsv[yComponent]) * (mxJSColor.images.sld[1]-1));
|
||||
mxJSColor.picker.sldM.style.backgroundPosition =
|
||||
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(mxJSColor.images.arrow[1]/2)) + 'px';
|
||||
}
|
||||
|
||||
|
||||
function isPickerOwner() {
|
||||
return jscolor.picker && jscolor.picker.owner === THIS;
|
||||
return mxJSColor.picker && mxJSColor.picker.owner === THIS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -811,22 +811,22 @@ var jscolor = {
|
|||
|
||||
|
||||
function setPad(e) {
|
||||
var mpos = jscolor.getRelMousePos(e);
|
||||
var mpos = mxJSColor.getRelMousePos(e);
|
||||
var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
|
||||
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
||||
switch(modeID) {
|
||||
case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
|
||||
case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
|
||||
case 0: THIS.fromHSV(x*(6/(mxJSColor.images.pad[0]-1)), 1 - y/(mxJSColor.images.pad[1]-1), null, leaveSld); break;
|
||||
case 1: THIS.fromHSV(x*(6/(mxJSColor.images.pad[0]-1)), null, 1 - y/(mxJSColor.images.pad[1]-1), leaveSld); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setSld(e) {
|
||||
var mpos = jscolor.getRelMousePos(e);
|
||||
var mpos = mxJSColor.getRelMousePos(e);
|
||||
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
||||
switch(modeID) {
|
||||
case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
|
||||
case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
|
||||
case 0: THIS.fromHSV(null, null, 1 - y/(mxJSColor.images.sld[1]-1), leavePad); break;
|
||||
case 1: THIS.fromHSV(null, 1 - y/(mxJSColor.images.sld[1]-1), null, leavePad); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -846,8 +846,8 @@ var jscolor = {
|
|||
var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
|
||||
var abortBlur = false;
|
||||
var
|
||||
valueElement = jscolor.fetchElement(this.valueElement),
|
||||
styleElement = jscolor.fetchElement(this.styleElement);
|
||||
valueElement = mxJSColor.fetchElement(this.valueElement),
|
||||
styleElement = mxJSColor.fetchElement(this.styleElement);
|
||||
var
|
||||
holdPad = false,
|
||||
holdSld = false;
|
||||
|
@ -858,10 +858,10 @@ var jscolor = {
|
|||
leaveSld = 1<<3;
|
||||
|
||||
// target
|
||||
/*jscolor.addEvent(target, 'focus', function() {
|
||||
/*mxJSColor.addEvent(target, 'focus', function() {
|
||||
if(THIS.pickerOnfocus) { THIS.showPicker(); }
|
||||
});
|
||||
jscolor.addEvent(target, 'blur', function() {
|
||||
mxJSColor.addEvent(target, 'blur', function() {
|
||||
if(!abortBlur) {
|
||||
window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
|
||||
} else {
|
||||
|
@ -875,9 +875,9 @@ var jscolor = {
|
|||
THIS.fromString(valueElement.value, leaveValue);
|
||||
dispatchImmediateChange();
|
||||
};
|
||||
jscolor.addEvent(valueElement, 'keyup', updateField);
|
||||
jscolor.addEvent(valueElement, 'input', updateField);
|
||||
jscolor.addEvent(valueElement, 'blur', blurValue);
|
||||
mxJSColor.addEvent(valueElement, 'keyup', updateField);
|
||||
mxJSColor.addEvent(valueElement, 'input', updateField);
|
||||
mxJSColor.addEvent(valueElement, 'blur', blurValue);
|
||||
valueElement.setAttribute('autocomplete', 'off');
|
||||
}
|
||||
|
||||
|
@ -892,8 +892,8 @@ var jscolor = {
|
|||
|
||||
// require images
|
||||
switch(modeID) {
|
||||
case 0: jscolor.requireImage('hs.png'); break;
|
||||
case 1: jscolor.requireImage('hv.png'); break;
|
||||
case 0: mxJSColor.requireImage('hs.png'); break;
|
||||
case 1: mxJSColor.requireImage('hv.png'); break;
|
||||
}
|
||||
|
||||
this.importColor();
|
||||
|
@ -902,4 +902,4 @@ var jscolor = {
|
|||
};
|
||||
|
||||
|
||||
jscolor.install();
|
||||
mxJSColor.install();
|
||||
|
|
|
@ -50,16 +50,16 @@ var ColorDialog = function(editorUi, color, apply, cancelFn)
|
|||
}
|
||||
};
|
||||
|
||||
var picker = new jscolor.color(input);
|
||||
var picker = new mxJSColor.color(input);
|
||||
picker.pickerOnfocus = false;
|
||||
picker.showPicker();
|
||||
|
||||
var div = document.createElement('div');
|
||||
jscolor.picker.box.style.position = 'relative';
|
||||
jscolor.picker.box.style.width = '230px';
|
||||
jscolor.picker.box.style.height = '100px';
|
||||
jscolor.picker.box.style.paddingBottom = '10px';
|
||||
div.appendChild(jscolor.picker.box);
|
||||
mxJSColor.picker.box.style.position = 'relative';
|
||||
mxJSColor.picker.box.style.width = '230px';
|
||||
mxJSColor.picker.box.style.height = '100px';
|
||||
mxJSColor.picker.box.style.paddingBottom = '10px';
|
||||
div.appendChild(mxJSColor.picker.box);
|
||||
|
||||
var center = document.createElement('center');
|
||||
|
||||
|
|
54
src/main/webapp/js/viewer.min.js
vendored
54
src/main/webapp/js/viewer.min.js
vendored
|
@ -1976,36 +1976,37 @@ for(var b=0;b<c.length;b++){for(var f=c[b].getAttribute("as"),g=c[b].firstChild;
|
|||
@updated 2012-01-19
|
||||
@link http://jscolor.com
|
||||
*/
|
||||
var jscolor={bindClass:"color",binding:!0,preloading:!0,install:function(){},init:function(){jscolor.preloading&&jscolor.preload()},getDir:function(){return IMAGE_PATH+"/"},detectDir:function(){for(var a=location.href,b=document.getElementsByTagName("base"),c=0;c<b.length;c+=1)b[c].href&&(a=b[c].href);b=document.getElementsByTagName("script");for(c=0;c<b.length;c+=1)if(b[c].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(b[c].src))return a=(new jscolor.URI(b[c].src)).toAbsolute(a),a.path=a.path.replace(/[^\/]+$/,
|
||||
""),a.query=null,a.fragment=null,a.toString();return!1},preload:function(){for(var a in jscolor.imgRequire)jscolor.imgRequire.hasOwnProperty(a)&&jscolor.loadImage(a)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(a){jscolor.imgRequire[a]=!0},loadImage:function(a){jscolor.imgLoaded[a]||(jscolor.imgLoaded[a]=new Image,jscolor.imgLoaded[a].src=jscolor.getDir()+a)},fetchElement:function(a){return"string"===typeof a?document.getElementById(a):
|
||||
var mxJSColor={bindClass:"color",binding:!0,preloading:!0,install:function(){},init:function(){mxJSColor.preloading&&mxJSColor.preload()},getDir:function(){return IMAGE_PATH+"/"},detectDir:function(){for(var a=location.href,b=document.getElementsByTagName("base"),c=0;c<b.length;c+=1)b[c].href&&(a=b[c].href);b=document.getElementsByTagName("script");for(c=0;c<b.length;c+=1)if(b[c].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(b[c].src))return a=(new mxJSColor.URI(b[c].src)).toAbsolute(a),a.path=a.path.replace(/[^\/]+$/,
|
||||
""),a.query=null,a.fragment=null,a.toString();return!1},preload:function(){for(var a in mxJSColor.imgRequire)mxJSColor.imgRequire.hasOwnProperty(a)&&mxJSColor.loadImage(a)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(a){mxJSColor.imgRequire[a]=!0},loadImage:function(a){mxJSColor.imgLoaded[a]||(mxJSColor.imgLoaded[a]=new Image,mxJSColor.imgLoaded[a].src=mxJSColor.getDir()+a)},fetchElement:function(a){return"string"===typeof a?document.getElementById(a):
|
||||
a},addEvent:function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},fireEvent:function(a,b){if(a)if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0);a.dispatchEvent(c)}else if(document.createEventObject)c=document.createEventObject(),a.fireEvent("on"+b,c);else if(a["on"+b])a["on"+b]()},getElementPos:function(a){var b=a,c=0,d=0;if(b.offsetParent){do c+=b.offsetLeft,d+=b.offsetTop;while(b=b.offsetParent)}for(;(a=a.parentNode)&&
|
||||
"BODY"!==a.nodeName.toUpperCase();)c-=a.scrollLeft,d-=a.scrollTop;return[c,d]},getElementSize:function(a){return[a.offsetWidth,a.offsetHeight]},getRelMousePos:function(a){var b=0,c=0;a||(a=window.event);"number"===typeof a.offsetX?(b=a.offsetX,c=a.offsetY):"number"===typeof a.layerX&&(b=a.layerX,c=a.layerY);return{x:b,y:c}},getViewPos:function(){return"number"===typeof window.pageYOffset?[window.pageXOffset,window.pageYOffset]:document.body&&(document.body.scrollLeft||document.body.scrollTop)?[document.body.scrollLeft,
|
||||
document.body.scrollTop]:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[0,0]},getViewSize:function(){return"number"===typeof window.innerWidth?[window.innerWidth,window.innerHeight]:document.body&&(document.body.clientWidth||document.body.clientHeight)?[document.body.clientWidth,document.body.clientHeight]:document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?
|
||||
[document.documentElement.clientWidth,document.documentElement.clientHeight]:[0,0]},URI:function(a){function b(a){for(var b="";a;)if("../"===a.substr(0,3)||"./"===a.substr(0,2))a=a.replace(/^\.+/,"").substr(1);else if("/./"===a.substr(0,3)||"/."===a)a="/"+a.substr(3);else if("/../"===a.substr(0,4)||"/.."===a)a="/"+a.substr(4),b=b.replace(/\/?[^\/]*$/,"");else if("."===a||".."===a)a="";else{var c=a.match(/^\/?[^\/]*/)[0];a=a.substr(c.length);b+=c}return b}this.authority=this.scheme=null;this.path=
|
||||
"";this.fragment=this.query=null;this.parse=function(a){a=a.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);this.scheme=a[3]?a[2]:null;this.authority=a[5]?a[6]:null;this.path=a[7];this.query=a[9]?a[10]:null;this.fragment=a[12]?a[13]:null;return this};this.toString=function(){var a="";null!==this.scheme&&(a=a+this.scheme+":");null!==this.authority&&(a=a+"//"+this.authority);null!==this.path&&(a+=this.path);null!==this.query&&(a=a+"?"+this.query);null!==
|
||||
this.fragment&&(a=a+"#"+this.fragment);return a};this.toAbsolute=function(a){a=new jscolor.URI(a);var c=new jscolor.URI;if(null===a.scheme)return!1;null!==this.scheme&&this.scheme.toLowerCase()===a.scheme.toLowerCase()&&(this.scheme=null);null!==this.scheme?(c.scheme=this.scheme,c.authority=this.authority,c.path=b(this.path),c.query=this.query):(null!==this.authority?(c.authority=this.authority,c.path=b(this.path),c.query=this.query):(""===this.path?(c.path=a.path,c.query=null!==this.query?this.query:
|
||||
this.fragment&&(a=a+"#"+this.fragment);return a};this.toAbsolute=function(a){a=new mxJSColor.URI(a);var c=new mxJSColor.URI;if(null===a.scheme)return!1;null!==this.scheme&&this.scheme.toLowerCase()===a.scheme.toLowerCase()&&(this.scheme=null);null!==this.scheme?(c.scheme=this.scheme,c.authority=this.authority,c.path=b(this.path),c.query=this.query):(null!==this.authority?(c.authority=this.authority,c.path=b(this.path),c.query=this.query):(""===this.path?(c.path=a.path,c.query=null!==this.query?this.query:
|
||||
a.query):("/"===this.path.substr(0,1)?c.path=b(this.path):(c.path=null!==a.authority&&""===a.path?"/"+this.path:a.path.replace(/[^\/]+$/,"")+this.path,c.path=b(c.path)),c.query=this.query),c.authority=a.authority),c.scheme=a.scheme);c.fragment=this.fragment;return c};a&&this.parse(a)},color:function(a,b){function c(a,b,c){if(null===a)return[c,c,c];var d=Math.floor(a),e=c*(1-b);a=c*(1-b*(d%2?a-d:1-(a-d)));switch(d){case 6:case 0:return[c,a,e];case 1:return[a,c,e];case 2:return[e,c,a];case 3:return[e,
|
||||
a,c];case 4:return[a,e,c];case 5:return[c,e,a]}}function d(b,c){if(!jscolor.picker){jscolor.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),btn:document.createElement("div"),btnS:document.createElement("span"),btnT:document.createTextNode(r.pickerCloseText)};for(var d=
|
||||
0;d<jscolor.images.sld[1];d+=4){var k=document.createElement("div");k.style.height="4px";k.style.fontSize="1px";k.style.lineHeight="0";jscolor.picker.sld.appendChild(k)}jscolor.picker.sldB.appendChild(jscolor.picker.sld);jscolor.picker.box.appendChild(jscolor.picker.sldB);jscolor.picker.box.appendChild(jscolor.picker.sldM);jscolor.picker.padB.appendChild(jscolor.picker.pad);jscolor.picker.box.appendChild(jscolor.picker.padB);jscolor.picker.box.appendChild(jscolor.picker.padM);jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
|
||||
jscolor.picker.btn.appendChild(jscolor.picker.btnS);jscolor.picker.box.appendChild(jscolor.picker.btn);jscolor.picker.boxB.appendChild(jscolor.picker.box)}var l=jscolor.picker;l.box.onmouseup=l.box.onmouseout=function(){mxClient.IS_TOUCH||a.focus()};l.box.onmousedown=function(){};l.box.onmousemove=function(a){if(y||B)y&&m(a),B&&n(a),document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),p()};l.padM.onmouseup=l.padM.onmouseout=function(){y&&(y=!1,
|
||||
jscolor.fireEvent(u,"change"))};l.padM.onmousedown=function(a){switch(t){case 0:0===r.hsv[2]&&r.fromHSV(null,null,1);break;case 1:0===r.hsv[1]&&r.fromHSV(null,1,null)}y=!0;m(a);p()};l.sldM.onmouseup=l.sldM.onmouseout=function(){B&&(B=!1,jscolor.fireEvent(u,"change"))};l.sldM.onmousedown=function(a){B=!0;n(a);p()};d=e(r);l.box.style.width=d[0]+"px";l.box.style.height=d[1]+"px";l.boxB.style.position="absolute";l.boxB.style.clear="both";l.boxB.style.left=b+"px";l.boxB.style.top=c+"px";l.boxB.style.zIndex=
|
||||
r.pickerZIndex;l.boxB.style.border=r.pickerBorder+"px solid";l.boxB.style.borderColor=r.pickerBorderColor;l.boxB.style.background=r.pickerFaceColor;l.pad.style.width=jscolor.images.pad[0]+"px";l.pad.style.height=jscolor.images.pad[1]+"px";l.padB.style.position="absolute";l.padB.style.left=r.pickerFace+"px";l.padB.style.top=r.pickerFace+"px";l.padB.style.border=r.pickerInset+"px solid";l.padB.style.borderColor=r.pickerInsetColor;l.padM.style.position="absolute";l.padM.style.left="0";l.padM.style.top=
|
||||
"0";l.padM.style.width=r.pickerFace+2*r.pickerInset+jscolor.images.pad[0]+jscolor.images.arrow[0]+"px";l.padM.style.height=l.box.style.height;l.padM.style.cursor="crosshair";l.sld.style.overflow="hidden";l.sld.style.width=jscolor.images.sld[0]+"px";l.sld.style.height=jscolor.images.sld[1]+"px";l.sldB.style.display=r.slider?"block":"none";l.sldB.style.position="absolute";l.sldB.style.right=r.pickerFace+"px";l.sldB.style.top=r.pickerFace+"px";l.sldB.style.border=r.pickerInset+"px solid";l.sldB.style.borderColor=
|
||||
r.pickerInsetColor;l.sldM.style.display=r.slider?"block":"none";l.sldM.style.position="absolute";l.sldM.style.right="0";l.sldM.style.top="0";l.sldM.style.width=jscolor.images.sld[0]+jscolor.images.arrow[0]+r.pickerFace+2*r.pickerInset+"px";l.sldM.style.height=l.box.style.height;try{l.sldM.style.cursor="pointer"}catch(F){l.sldM.style.cursor="hand"}l.btn.style.display=r.pickerClosable?"block":"none";l.btn.style.position="absolute";l.btn.style.left=r.pickerFace+"px";l.btn.style.bottom=r.pickerFace+"px";
|
||||
l.btn.style.padding="0 15px";l.btn.style.height="18px";l.btn.style.border=r.pickerInset+"px solid";(function(){var a=r.pickerInsetColor.split(/\s+/);l.btn.style.borderColor=2>a.length?a[0]:a[1]+" "+a[0]+" "+a[0]+" "+a[1]})();l.btn.style.color=r.pickerButtonColor;l.btn.style.font="12px sans-serif";l.btn.style.textAlign="center";try{l.btn.style.cursor="pointer"}catch(F){l.btn.style.cursor="hand"}l.btn.onmousedown=function(){r.hidePicker()};l.btnS.style.lineHeight=l.btn.style.height;switch(t){case 0:var q=
|
||||
"hs.png";break;case 1:q="hv.png"}l.padM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=)";l.padM.style.backgroundRepeat="no-repeat";l.sldM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7)";l.sldM.style.backgroundRepeat="no-repeat";l.pad.style.backgroundImage="url('"+jscolor.getDir()+q+"')";l.pad.style.backgroundRepeat=
|
||||
"no-repeat";l.pad.style.backgroundPosition="0 0";f();g();jscolor.picker.owner=r;document.getElementsByTagName("body")[0].appendChild(l.boxB)}function e(a){return[2*a.pickerInset+2*a.pickerFace+jscolor.images.pad[0]+(a.slider?2*a.pickerInset+2*jscolor.images.arrow[0]+jscolor.images.sld[0]:0),a.pickerClosable?4*a.pickerInset+3*a.pickerFace+jscolor.images.pad[1]+a.pickerButtonHeight:2*a.pickerInset+2*a.pickerFace+jscolor.images.pad[1]]}function f(){switch(t){case 0:var a=1;break;case 1:a=2}jscolor.picker.padM.style.backgroundPosition=
|
||||
r.pickerFace+r.pickerInset+Math.round(r.hsv[0]/6*(jscolor.images.pad[0]-1))-Math.floor(jscolor.images.cross[0]/2)+"px "+(r.pickerFace+r.pickerInset+Math.round((1-r.hsv[a])*(jscolor.images.pad[1]-1))-Math.floor(jscolor.images.cross[1]/2))+"px";a=jscolor.picker.sld.childNodes;switch(t){case 0:for(var b=c(r.hsv[0],r.hsv[1],1),d=0;d<a.length;d+=1)a[d].style.backgroundColor="rgb("+b[0]*(1-d/a.length)*100+"%,"+b[1]*(1-d/a.length)*100+"%,"+b[2]*(1-d/a.length)*100+"%)";break;case 1:var e,f=[r.hsv[2],0,0],
|
||||
d=Math.floor(r.hsv[0]),g=d%2?r.hsv[0]-d:1-(r.hsv[0]-d);switch(d){case 6:case 0:b=[0,1,2];break;case 1:b=[1,0,2];break;case 2:b=[2,0,1];break;case 3:b=[2,1,0];break;case 4:b=[1,2,0];break;case 5:b=[0,2,1]}for(d=0;d<a.length;d+=1)e=1-1/(a.length-1)*d,f[1]=f[0]*(1-e*g),f[2]=f[0]*(1-e),a[d].style.backgroundColor="rgb("+100*f[b[0]]+"%,"+100*f[b[1]]+"%,"+100*f[b[2]]+"%)"}}function g(){switch(t){case 0:var a=2;break;case 1:a=1}jscolor.picker.sldM.style.backgroundPosition="0 "+(r.pickerFace+r.pickerInset+
|
||||
Math.round((1-r.hsv[a])*(jscolor.images.sld[1]-1))-Math.floor(jscolor.images.arrow[1]/2))+"px"}function k(){return jscolor.picker&&jscolor.picker.owner===r}function l(){u!==a&&r.importColor()}function m(a){var b=jscolor.getRelMousePos(a);a=b.x-r.pickerFace-r.pickerInset;b=b.y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(6/(jscolor.images.pad[0]-1)*a,1-b/(jscolor.images.pad[1]-1),null,v);break;case 1:r.fromHSV(6/(jscolor.images.pad[0]-1)*a,null,1-b/(jscolor.images.pad[1]-1),v)}}function n(a){a=
|
||||
jscolor.getRelMousePos(a).y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(null,null,1-a/(jscolor.images.sld[1]-1),C);break;case 1:r.fromHSV(null,1-a/(jscolor.images.sld[1]-1),null,C)}}function p(){if(r.onImmediateChange)if("string"===typeof r.onImmediateChange)eval(r.onImmediateChange);else r.onImmediateChange(r)}this.adjust=this.required=!0;this.hash=!1;this.slider=this.caps=!0;this.styleElement=this.valueElement=a;this.onImmediateChange=null;this.hsv=[0,0,1];this.rgb=[1,1,1];this.pickerOnfocus=
|
||||
!0;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerSmartPosition=!0;this.pickerButtonHeight=20;this.pickerClosable=!1;this.pickerCloseText="Close";this.pickerButtonColor="ButtonText";this.pickerFace=0;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=1E4;for(var q in b)b.hasOwnProperty(q)&&
|
||||
(this[q]=b[q]);this.hidePicker=function(){k()&&(delete jscolor.picker.owner,document.getElementsByTagName("body")[0].removeChild(jscolor.picker.boxB))};this.showPicker=function(){k()||(jscolor.getElementPos(a),jscolor.getElementSize(a),jscolor.getViewPos(),jscolor.getViewSize(),e(this),this.pickerPosition.toLowerCase(),d(0,0))};this.importColor=function(){u?this.adjust?!this.required&&/^\s*$/.test(u.value)?(u.value="",x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,
|
||||
x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.fromString(u.value)||this.exportColor():this.fromString(u.value,A)||(x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.exportColor()};this.exportColor=function(a){if(!(a&A)&&u){var b=this.toString();this.caps&&(b=b.toUpperCase());this.hash&&(b="#"+b);u.value=b}a&z||!x||(x.style.backgroundImage="none",x.style.backgroundColor="#"+this.toString(),
|
||||
x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000");a&C||!k()||f();a&v||!k()||g()};this.fromHSV=function(a,b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rgb=c(null===a?this.hsv[0]:this.hsv[0]=a,null===b?this.hsv[1]:this.hsv[1]=b,null===d?this.hsv[2]:this.hsv[2]=d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b&&(b=0);1<b&&(b=1);0>c&&(c=0);1<c&&(c=1);a=null===a?this.rgb[0]:this.rgb[0]=a;b=null===b?this.rgb[1]:
|
||||
this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,
|
||||
2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
|
||||
y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
|
||||
a,c];case 4:return[a,e,c];case 5:return[c,e,a]}}function d(b,c){if(!mxJSColor.picker){mxJSColor.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),btn:document.createElement("div"),btnS:document.createElement("span"),btnT:document.createTextNode(r.pickerCloseText)};for(var d=
|
||||
0;d<mxJSColor.images.sld[1];d+=4){var k=document.createElement("div");k.style.height="4px";k.style.fontSize="1px";k.style.lineHeight="0";mxJSColor.picker.sld.appendChild(k)}mxJSColor.picker.sldB.appendChild(mxJSColor.picker.sld);mxJSColor.picker.box.appendChild(mxJSColor.picker.sldB);mxJSColor.picker.box.appendChild(mxJSColor.picker.sldM);mxJSColor.picker.padB.appendChild(mxJSColor.picker.pad);mxJSColor.picker.box.appendChild(mxJSColor.picker.padB);mxJSColor.picker.box.appendChild(mxJSColor.picker.padM);
|
||||
mxJSColor.picker.btnS.appendChild(mxJSColor.picker.btnT);mxJSColor.picker.btn.appendChild(mxJSColor.picker.btnS);mxJSColor.picker.box.appendChild(mxJSColor.picker.btn);mxJSColor.picker.boxB.appendChild(mxJSColor.picker.box)}var l=mxJSColor.picker;l.box.onmouseup=l.box.onmouseout=function(){mxClient.IS_TOUCH||a.focus()};l.box.onmousedown=function(){};l.box.onmousemove=function(a){if(y||B)y&&m(a),B&&n(a),document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),
|
||||
p()};l.padM.onmouseup=l.padM.onmouseout=function(){y&&(y=!1,mxJSColor.fireEvent(u,"change"))};l.padM.onmousedown=function(a){switch(t){case 0:0===r.hsv[2]&&r.fromHSV(null,null,1);break;case 1:0===r.hsv[1]&&r.fromHSV(null,1,null)}y=!0;m(a);p()};l.sldM.onmouseup=l.sldM.onmouseout=function(){B&&(B=!1,mxJSColor.fireEvent(u,"change"))};l.sldM.onmousedown=function(a){B=!0;n(a);p()};d=e(r);l.box.style.width=d[0]+"px";l.box.style.height=d[1]+"px";l.boxB.style.position="absolute";l.boxB.style.clear="both";
|
||||
l.boxB.style.left=b+"px";l.boxB.style.top=c+"px";l.boxB.style.zIndex=r.pickerZIndex;l.boxB.style.border=r.pickerBorder+"px solid";l.boxB.style.borderColor=r.pickerBorderColor;l.boxB.style.background=r.pickerFaceColor;l.pad.style.width=mxJSColor.images.pad[0]+"px";l.pad.style.height=mxJSColor.images.pad[1]+"px";l.padB.style.position="absolute";l.padB.style.left=r.pickerFace+"px";l.padB.style.top=r.pickerFace+"px";l.padB.style.border=r.pickerInset+"px solid";l.padB.style.borderColor=r.pickerInsetColor;
|
||||
l.padM.style.position="absolute";l.padM.style.left="0";l.padM.style.top="0";l.padM.style.width=r.pickerFace+2*r.pickerInset+mxJSColor.images.pad[0]+mxJSColor.images.arrow[0]+"px";l.padM.style.height=l.box.style.height;l.padM.style.cursor="crosshair";l.sld.style.overflow="hidden";l.sld.style.width=mxJSColor.images.sld[0]+"px";l.sld.style.height=mxJSColor.images.sld[1]+"px";l.sldB.style.display=r.slider?"block":"none";l.sldB.style.position="absolute";l.sldB.style.right=r.pickerFace+"px";l.sldB.style.top=
|
||||
r.pickerFace+"px";l.sldB.style.border=r.pickerInset+"px solid";l.sldB.style.borderColor=r.pickerInsetColor;l.sldM.style.display=r.slider?"block":"none";l.sldM.style.position="absolute";l.sldM.style.right="0";l.sldM.style.top="0";l.sldM.style.width=mxJSColor.images.sld[0]+mxJSColor.images.arrow[0]+r.pickerFace+2*r.pickerInset+"px";l.sldM.style.height=l.box.style.height;try{l.sldM.style.cursor="pointer"}catch(F){l.sldM.style.cursor="hand"}l.btn.style.display=r.pickerClosable?"block":"none";l.btn.style.position=
|
||||
"absolute";l.btn.style.left=r.pickerFace+"px";l.btn.style.bottom=r.pickerFace+"px";l.btn.style.padding="0 15px";l.btn.style.height="18px";l.btn.style.border=r.pickerInset+"px solid";(function(){var a=r.pickerInsetColor.split(/\s+/);l.btn.style.borderColor=2>a.length?a[0]:a[1]+" "+a[0]+" "+a[0]+" "+a[1]})();l.btn.style.color=r.pickerButtonColor;l.btn.style.font="12px sans-serif";l.btn.style.textAlign="center";try{l.btn.style.cursor="pointer"}catch(F){l.btn.style.cursor="hand"}l.btn.onmousedown=function(){r.hidePicker()};
|
||||
l.btnS.style.lineHeight=l.btn.style.height;switch(t){case 0:var q="hs.png";break;case 1:q="hv.png"}l.padM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=)";l.padM.style.backgroundRepeat="no-repeat";l.sldM.style.backgroundImage="url(data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7)";l.sldM.style.backgroundRepeat="no-repeat";
|
||||
l.pad.style.backgroundImage="url('"+mxJSColor.getDir()+q+"')";l.pad.style.backgroundRepeat="no-repeat";l.pad.style.backgroundPosition="0 0";f();g();mxJSColor.picker.owner=r;document.getElementsByTagName("body")[0].appendChild(l.boxB)}function e(a){return[2*a.pickerInset+2*a.pickerFace+mxJSColor.images.pad[0]+(a.slider?2*a.pickerInset+2*mxJSColor.images.arrow[0]+mxJSColor.images.sld[0]:0),a.pickerClosable?4*a.pickerInset+3*a.pickerFace+mxJSColor.images.pad[1]+a.pickerButtonHeight:2*a.pickerInset+2*
|
||||
a.pickerFace+mxJSColor.images.pad[1]]}function f(){switch(t){case 0:var a=1;break;case 1:a=2}mxJSColor.picker.padM.style.backgroundPosition=r.pickerFace+r.pickerInset+Math.round(r.hsv[0]/6*(mxJSColor.images.pad[0]-1))-Math.floor(mxJSColor.images.cross[0]/2)+"px "+(r.pickerFace+r.pickerInset+Math.round((1-r.hsv[a])*(mxJSColor.images.pad[1]-1))-Math.floor(mxJSColor.images.cross[1]/2))+"px";a=mxJSColor.picker.sld.childNodes;switch(t){case 0:for(var b=c(r.hsv[0],r.hsv[1],1),d=0;d<a.length;d+=1)a[d].style.backgroundColor=
|
||||
"rgb("+b[0]*(1-d/a.length)*100+"%,"+b[1]*(1-d/a.length)*100+"%,"+b[2]*(1-d/a.length)*100+"%)";break;case 1:var e,f=[r.hsv[2],0,0],d=Math.floor(r.hsv[0]),g=d%2?r.hsv[0]-d:1-(r.hsv[0]-d);switch(d){case 6:case 0:b=[0,1,2];break;case 1:b=[1,0,2];break;case 2:b=[2,0,1];break;case 3:b=[2,1,0];break;case 4:b=[1,2,0];break;case 5:b=[0,2,1]}for(d=0;d<a.length;d+=1)e=1-1/(a.length-1)*d,f[1]=f[0]*(1-e*g),f[2]=f[0]*(1-e),a[d].style.backgroundColor="rgb("+100*f[b[0]]+"%,"+100*f[b[1]]+"%,"+100*f[b[2]]+"%)"}}function g(){switch(t){case 0:var a=
|
||||
2;break;case 1:a=1}mxJSColor.picker.sldM.style.backgroundPosition="0 "+(r.pickerFace+r.pickerInset+Math.round((1-r.hsv[a])*(mxJSColor.images.sld[1]-1))-Math.floor(mxJSColor.images.arrow[1]/2))+"px"}function k(){return mxJSColor.picker&&mxJSColor.picker.owner===r}function l(){u!==a&&r.importColor()}function m(a){var b=mxJSColor.getRelMousePos(a);a=b.x-r.pickerFace-r.pickerInset;b=b.y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(6/(mxJSColor.images.pad[0]-1)*a,1-b/(mxJSColor.images.pad[1]-
|
||||
1),null,v);break;case 1:r.fromHSV(6/(mxJSColor.images.pad[0]-1)*a,null,1-b/(mxJSColor.images.pad[1]-1),v)}}function n(a){a=mxJSColor.getRelMousePos(a).y-r.pickerFace-r.pickerInset;switch(t){case 0:r.fromHSV(null,null,1-a/(mxJSColor.images.sld[1]-1),C);break;case 1:r.fromHSV(null,1-a/(mxJSColor.images.sld[1]-1),null,C)}}function p(){if(r.onImmediateChange)if("string"===typeof r.onImmediateChange)eval(r.onImmediateChange);else r.onImmediateChange(r)}this.adjust=this.required=!0;this.hash=!1;this.slider=
|
||||
this.caps=!0;this.styleElement=this.valueElement=a;this.onImmediateChange=null;this.hsv=[0,0,1];this.rgb=[1,1,1];this.pickerOnfocus=!0;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerSmartPosition=!0;this.pickerButtonHeight=20;this.pickerClosable=!1;this.pickerCloseText="Close";this.pickerButtonColor="ButtonText";this.pickerFace=0;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=
|
||||
1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=1E4;for(var q in b)b.hasOwnProperty(q)&&(this[q]=b[q]);this.hidePicker=function(){k()&&(delete mxJSColor.picker.owner,document.getElementsByTagName("body")[0].removeChild(mxJSColor.picker.boxB))};this.showPicker=function(){k()||(mxJSColor.getElementPos(a),mxJSColor.getElementSize(a),mxJSColor.getViewPos(),mxJSColor.getViewSize(),e(this),this.pickerPosition.toLowerCase(),d(0,0))};this.importColor=
|
||||
function(){u?this.adjust?!this.required&&/^\s*$/.test(u.value)?(u.value="",x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.fromString(u.value)||this.exportColor():this.fromString(u.value,A)||(x.style.backgroundImage=x.jscStyle.backgroundImage,x.style.backgroundColor=x.jscStyle.backgroundColor,x.style.color=x.jscStyle.color,this.exportColor(A|z)):this.exportColor()};this.exportColor=function(a){if(!(a&
|
||||
A)&&u){var b=this.toString();this.caps&&(b=b.toUpperCase());this.hash&&(b="#"+b);u.value=b}a&z||!x||(x.style.backgroundImage="none",x.style.backgroundColor="#"+this.toString(),x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000");a&C||!k()||f();a&v||!k()||g()};this.fromHSV=function(a,b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rgb=c(null===a?this.hsv[0]:this.hsv[0]=a,null===b?this.hsv[1]:this.hsv[1]=b,null===d?this.hsv[2]:this.hsv[2]=
|
||||
d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b&&(b=0);1<b&&(b=1);0>c&&(c=0);1<c&&(c=1);a=null===a?this.rgb[0]:this.rgb[0]=a;b=null===b?this.rgb[1]:this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=
|
||||
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
|
||||
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
|
||||
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
|
||||
Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
|
||||
function(){return this.status};this.graphChangeListener=function(a,d){var c=null!=d?d.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
|
||||
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
|
||||
|
@ -3657,8 +3658,8 @@ mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.grap
|
|||
l=null;else{l=this.graph.createLayersDialog();mxEvent.addListener(l,"mouseleave",function(){l.parentNode.removeChild(l);l=null});a=A.getBoundingClientRect();l.style.width="140px";l.style.padding="2px 0px 2px 0px";l.style.border="1px solid #d0d0d0";l.style.backgroundColor="#eee";l.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";l.style.fontSize="11px";l.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(l,80);var b=mxUtils.getDocumentScrollOrigin(document);l.style.left=b.x+a.left+
|
||||
"px";l.style.top=b.y+a.bottom+"px";document.body.appendChild(l)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){A.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});A.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
|
||||
null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*p);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,
|
||||
70),e.appendChild(g));this.minToolbarWidth=34*p;var B=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
|
||||
c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==B&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),
|
||||
70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*p;var B=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-
|
||||
c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==B&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),
|
||||
l=null);b.style.border=B});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==l)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()};
|
||||
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
|
||||
a.customLinkClicked(d)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
|
||||
|
@ -3673,6 +3674,7 @@ this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"
|
|||
this.graphConfig.move&&(c.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(f.style,"border-radius","4px"),f.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(f.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(f.style,"transition","all .25s ease-in-out"));this.addClickHandler(c,k);window.setTimeout(mxUtils.bind(this,function(){f.style.outline="none";
|
||||
f.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(f);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(f.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(f.style.position="absolute",f.style.display="block",f.style.left=
|
||||
a.x+"px",f.style.top=a.y+"px",f.style.width=document.body.clientWidth-80+"px",f.style.height=document.body.clientHeight-80+"px",f.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(c,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
|
||||
GraphViewer.prototype.updateTitle=function(a){a=a||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",a);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,a),this.filename.setAttribute("title",a))};
|
||||
GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
|
||||
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b};
|
||||
GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
|
||||
|
|
|
@ -6,7 +6,7 @@ if (workbox)
|
|||
workbox.precaching.precacheAndRoute([
|
||||
{
|
||||
"url": "js/app.min.js",
|
||||
"revision": "7c084103ede1e74669accd87f65fd5b8"
|
||||
"revision": "e0b266cd50ca3075616e76f1fb68535d"
|
||||
},
|
||||
{
|
||||
"url": "js/extensions.min.js",
|
||||
|
|
Loading…
Reference in a new issue