12.8.3 release

This commit is contained in:
David Benson [draw.io] 2020-03-11 17:32:28 +00:00
parent bf1ac674fd
commit 4ba45d424c
21 changed files with 7711 additions and 4280 deletions

View file

@ -1,8 +1,15 @@
11-MAR-2020: 12.8.3
- Switches to PlantUML build 1.2020.2
- Adds app.diagrams.net support for onedrive and cache responses
- Fixes infinite resizing of viewer in conf cloud
- Uses all layers for drop target selection
- Uses mxGraph 4.1.1 beta 12
09-MAR-2020: 12.8.2
- Fixes Confluence Cloud lightbox and Jira Cloud editor iFrame resize
05-MAR-2020: 12.8.1
- Fixes Confluence Cloud editor iFrame resize

View file

@ -1 +1 @@
12.8.2
12.8.3

View file

@ -1278,7 +1278,7 @@ mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&(this.isSpli
mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
mxGraph.prototype.getDropTarget=function(a,b,c,d){if(!this.isSwimlaneNesting())for(var e=0;e<a.length;e++)if(this.isSwimlane(a[e]))return null;e=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));e.x-=this.panDx;e.y-=this.panDy;e=this.getSwimlaneAt(e.x,e.y);if(null==c)c=e;else if(null!=e){for(var f=this.model.getParent(e);null!=f&&this.isSwimlane(f)&&f!=c;)f=this.model.getParent(f);f==c&&(c=e)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
if(null==d||!d)for(var g=c;null!=g&&0>mxUtils.indexOf(a,g);)g=this.model.getParent(g);return this.model.isLayer(c)||null!=g?null:c};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e),g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}return null};
mxGraph.prototype.getSwimlaneAt=function(a,b,c){null==c&&(c=this.getCurrentRoot(),null==c&&(c=this.model.getRoot()));if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e);if(null!=f){var g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isCellVisible(f)&&this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}}return null};
mxGraph.prototype.getCellAt=function(a,b,c,d,e,f){d=null!=d?d:!0;e=null!=e?e:!0;null==c&&(c=this.getCurrentRoot(),null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var g=this.model.getChildCount(c)-1;0<=g;g--){var k=this.model.getChildAt(c,g),l=this.getCellAt(a,b,k,d,e,f);if(null!=l)return l;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||d&&this.model.isVertex(k))&&(l=this.view.getState(k),null!=l&&(null==f||!f(l,a,b))&&this.intersects(l,a,b)))return k}return null};
mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 64 KiB

File diff suppressed because one or more lines are too long

View file

@ -4993,7 +4993,7 @@
mxStencilRegistry.libraries['mockup/navigation'] = [SHAPES_PATH + '/mockup/mxMockupNavigation.js', STENCIL_PATH + '/mockup/misc.xml'];
mxStencilRegistry.libraries['mockup/text'] = [SHAPES_PATH + '/mockup/mxMockupText.js'];
mxStencilRegistry.libraries['floorplan'] = [SHAPES_PATH + '/mxFloorplan.js', STENCIL_PATH + '/floorplan.xml'];
mxStencilRegistry.libraries['bootstrap'] = [SHAPES_PATH + '/mxBootstrap.js', STENCIL_PATH + '/bootstrap.xml'];
mxStencilRegistry.libraries['bootstrap'] = [SHAPES_PATH + '/mxBootstrap.js', SHAPES_PATH + '/mxBasic.js', STENCIL_PATH + '/bootstrap.xml'];
mxStencilRegistry.libraries['gmdl'] = [SHAPES_PATH + '/mxGmdl.js', STENCIL_PATH + '/gmdl.xml'];
mxStencilRegistry.libraries['gcp2'] = [SHAPES_PATH + '/mxGCP2.js', STENCIL_PATH + '/gcp2.xml'];
mxStencilRegistry.libraries['ibm'] = [SHAPES_PATH + '/mxIBM.js', STENCIL_PATH + '/ibm.xml'];

View file

@ -444,14 +444,16 @@ mxStencilRegistry.allowEval = false;
return editorUi.isExportToCanvas() && !editorUi.editor.graph.isSelectionEmpty();
}
var uiCreatePopupMenu = editorUi.menus.createPopupMenu;
editorUi.menus.createPopupMenu = function(menu, cell, evt)
// Inserts copyAsImage into popup menu
editorUi.menus.addPopupMenuEditItems = function(menu, cell, evt)
{
uiCreatePopupMenu.apply(this, arguments);
if (editorUi.isExportToCanvas() && !editorUi.editor.graph.isSelectionEmpty())
if (editorUi.editor.graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['-', 'copyAsImage'], null, evt);
this.addMenuItems(menu, ['pasteHere'], null, evt);
}
else
{
this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', 'copyAsImage', '-', 'duplicate'], null, evt);
}
};
}

View file

@ -17,7 +17,7 @@ window.isSvgBrowser = window.isSvgBrowser || (navigator.userAgent.indexOf('MSIE'
// CUSTOM_PARAMETERS - URLs for save and export
window.EXPORT_URL = window.EXPORT_URL || 'https://exp.draw.io/ImageExport4/export';
window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml-1-2019-7';
window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml-1-2020-2';
window.DRAW_MATH_URL = window.DRAW_MATH_URL || 'https://www.draw.io/math';
window.VSD_CONVERT_URL = window.VSD_CONVERT_URL || 'https://convert.draw.io/VsdConverter/api/converter';
window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || 'https://convert.draw.io/emf2png/convertEMF';

View file

@ -3213,7 +3213,7 @@
{
this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy']);
if (mxIsElectron && editorUi.isExportToCanvas())
if (mxIsElectron)
{
this.addMenuItems(menu, ['copyAsImage']);
}

View file

@ -1,6 +1,6 @@
/**
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
* Copyright (c) 2006-2020, JGraph Ltd
* Copyright (c) 2006-2020, draw.io AG
*/
OneDriveClient = function(editorUi)
{
@ -30,6 +30,8 @@ mxUtils.extend(OneDriveClient, DrawioClient);
OneDriveClient.prototype.clientId = window.DRAWIO_MSGRAPH_CLIENT_ID || ((window.location.hostname == 'test.draw.io') ?
'2e598409-107f-4b59-89ca-d7723c8e00a4' : '45c10911-200f-4e27-a666-9e9fca147395');
OneDriveClient.prototype.clientId = window.location.hostname == 'app.diagrams.net' ?
'b5ff67d6-3155-4fca-965a-59a3655c4476' : OneDriveClient.prototype.clientId;
/**
* OAuth 2.0 scopes for installing Drive Apps.
*/

File diff suppressed because it is too large Load diff

View file

@ -3139,14 +3139,14 @@ Graph.prototype.selectCells = function(vertices, edges, parent)
*/
Graph.prototype.getSwimlaneAt = function (x, y, parent)
{
parent = parent || this.getDefaultParent();
var result = mxGraph.prototype.getSwimlaneAt.apply(this, arguments);
if (!this.isCellLocked(parent))
if (this.isCellLocked(result))
{
return mxGraph.prototype.getSwimlaneAt.apply(this, arguments);
result = null;
}
return null;
return result;
};
/**

View file

@ -1038,99 +1038,150 @@ Menus.prototype.addMenuItems = function(menu, keys, parent, trigger, sprites)
*/
Menus.prototype.createPopupMenu = function(menu, cell, evt)
{
var graph = this.editorUi.editor.graph;
menu.smartSeparators = true;
if (graph.isSelectionEmpty())
this.addPopupMenuHistoryItems(menu, cell, evt);
this.addPopupMenuEditItems(menu, cell, evt);
this.addPopupMenuStyleItems(menu, cell, evt);
this.addPopupMenuArrangeItems(menu, cell, evt);
this.addPopupMenuCellItems(menu, cell, evt);
this.addPopupMenuSelectionItems(menu, cell, evt);
};
/**
* Creates the keyboard event handler for the current graph and history.
*/
Menus.prototype.addPopupMenuHistoryItems = function(menu, cell, evt)
{
if (this.editorUi.editor.graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['undo', 'redo', 'pasteHere'], null, evt);
this.addMenuItems(menu, ['undo', 'redo'], null, evt);
}
};
/**
* Creates the keyboard event handler for the current graph and history.
*/
Menus.prototype.addPopupMenuEditItems = function(menu, cell, evt)
{
if (this.editorUi.editor.graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['pasteHere'], null, evt);
}
else
{
this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate'], null, evt);
}
};
/**
* Creates the keyboard event handler for the current graph and history.
*/
Menus.prototype.addPopupMenuStyleItems = function(menu, cell, evt)
{
if (this.editorUi.editor.graph.getSelectionCount() == 1)
{
this.addMenuItems(menu, ['-', 'setAsDefaultStyle'], null, evt);
}
else if (this.editorUi.editor.graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['-', 'clearDefaultStyle'], null, evt);
}
};
/**
* Creates the keyboard event handler for the current graph and history.
*/
Menus.prototype.addPopupMenuArrangeItems = function(menu, cell, evt)
{
var graph = this.editorUi.editor.graph;
if (!graph.isSelectionEmpty())
{
if (graph.getSelectionCount() == 1)
this.addMenuItems(menu, ['-', 'toFront', 'toBack'], null, evt);
}
if (graph.getSelectionCount() > 1)
{
this.addMenuItems(menu, ['-', 'group'], null, evt);
}
else if (graph.getSelectionCount() == 1 && !graph.getModel().isEdge(cell) &&
!graph.isSwimlane(cell) && graph.getModel().getChildCount(cell) > 0)
{
this.addMenuItems(menu, ['-', 'ungroup'], null, evt);
}
};
/**
* Creates the keyboard event handler for the current graph and history.
*/
Menus.prototype.addPopupMenuCellItems = function(menu, cell, evt)
{
var graph = this.editorUi.editor.graph;
cell = graph.getSelectionCell();
var state = graph.view.getState(cell);
menu.addSeparator();
if (state != null)
{
var hasWaypoints = false;
if (graph.getModel().isEdge(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_EDGE, null) != 'entityRelationEdgeStyle' &&
mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) != 'arrow')
{
this.addMenuItems(menu, ['setAsDefaultStyle'], null, evt);
var handler = graph.selectionCellsHandler.getHandler(cell);
var isWaypoint = false;
if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
{
var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
// Configures removeWaypoint action before execution
// Using trigger parameter is cleaner but have to find waypoint here anyway.
var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
rmWaypointAction.handler = handler;
rmWaypointAction.index = index;
isWaypoint = index > 0 && index < handler.bends.length - 1;
}
menu.addSeparator();
this.addMenuItem(menu, 'turn', null, evt, null, mxResources.get('reverse'));
this.addMenuItems(menu, [(isWaypoint) ? 'removeWaypoint' : 'addWaypoint'], null, evt);
// Adds reset waypoints option if waypoints exist
var geo = graph.getModel().getGeometry(cell);
hasWaypoints = geo != null && geo.points != null && geo.points.length > 0;
}
menu.addSeparator();
cell = graph.getSelectionCell();
var state = graph.view.getState(cell);
if (state != null)
if (graph.getSelectionCount() == 1 && (hasWaypoints || (graph.getModel().isVertex(cell) &&
graph.getModel().getEdgeCount(cell) > 0)))
{
var hasWaypoints = false;
this.addMenuItems(menu, ['toFront', 'toBack', '-'], null, evt);
if (graph.getModel().isEdge(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_EDGE, null) != 'entityRelationEdgeStyle' &&
mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null) != 'arrow')
{
var handler = graph.selectionCellsHandler.getHandler(cell);
var isWaypoint = false;
if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
{
var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
// Configures removeWaypoint action before execution
// Using trigger parameter is cleaner but have to find waypoint here anyway.
var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
rmWaypointAction.handler = handler;
rmWaypointAction.index = index;
isWaypoint = index > 0 && index < handler.bends.length - 1;
}
menu.addSeparator();
this.addMenuItem(menu, 'turn', null, evt, null, mxResources.get('reverse'));
this.addMenuItems(menu, [(isWaypoint) ? 'removeWaypoint' : 'addWaypoint'], null, evt);
// Adds reset waypoints option if waypoints exist
var geo = graph.getModel().getGeometry(cell);
hasWaypoints = geo != null && geo.points != null && geo.points.length > 0;
}
if (graph.getSelectionCount() == 1 && (hasWaypoints || (graph.getModel().isVertex(cell) &&
graph.getModel().getEdgeCount(cell) > 0)))
{
this.addMenuItems(menu, ['clearWaypoints'], null, evt);
}
if (graph.getSelectionCount() > 1)
{
menu.addSeparator();
this.addMenuItems(menu, ['group'], null, evt);
}
else if (graph.getSelectionCount() == 1 && !graph.getModel().isEdge(cell) && !graph.isSwimlane(cell) &&
graph.getModel().getChildCount(cell) > 0)
{
menu.addSeparator();
this.addMenuItems(menu, ['ungroup'], null, evt);
}
if (graph.getSelectionCount() == 1)
{
menu.addSeparator();
this.addMenuItems(menu, ['editData', 'editLink'], null, evt);
// Shows edit image action if there is an image in the style
if (graph.getModel().isVertex(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_IMAGE, null) != null)
{
menu.addSeparator();
this.addMenuItem(menu, 'image', null, evt).firstChild.nextSibling.innerHTML = mxResources.get('editImage') + '...';
}
}
this.addMenuItems(menu, ['-', 'clearWaypoints'], null, evt);
}
}
else
if (graph.getSelectionCount() == 1)
{
this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges',
'selectAll', '-', 'clearDefaultStyle'], null, evt);
this.addMenuItems(menu, ['-', 'editData', 'editLink'], null, evt);
// Shows edit image action if there is an image in the style
if (graph.getModel().isVertex(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_IMAGE, null) != null)
{
menu.addSeparator();
this.addMenuItem(menu, 'image', null, evt).firstChild.nextSibling.innerHTML = mxResources.get('editImage') + '...';
}
}
};
/**
* Creates the keyboard event handler for the current graph and history.
*/
Menus.prototype.addPopupMenuSelectionItems = function(menu, cell, evt)
{
if (this.editorUi.editor.graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', 'selectAll'], null, evt);
}
};

View file

@ -1992,10 +1992,17 @@ mxShapeBootstrapImage.prototype.customProperties=[{name:"rSize",dispName:"Arc Si
mxShapeBootstrapImage.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10")));mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.close();
a.stroke();e=.5*d;a.translate(e,e);b=Math.max(0,b-d);c=Math.max(0,c-d);a.begin();a.moveTo(0,e);a.arcTo(e,e,0,0,1,e,0);a.lineTo(b-e,0);a.arcTo(e,e,0,0,1,b,e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapImage.prototype.cst.IMAGE,mxShapeBootstrapImage);function mxShapeBootstrapCheckbox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeBootstrapCheckbox,mxShape);mxShapeBootstrapCheckbox.prototype.cst={CHECKBOX:"mxgraph.bootstrap.checkbox"};mxShapeBootstrapCheckbox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.roundrect(0,0,b,c,3,3);a.fillAndStroke();a.setStrokeWidth("3");a.begin();a.moveTo(.8*b,.2*c);a.lineTo(.4*b,.8*c);a.lineTo(.25*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapCheckbox.prototype.cst.CHECKBOX,mxShapeBootstrapCheckbox);
function mxShapeBootstrapRadioButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRadioButton,mxShape);mxShapeBootstrapRadioButton.prototype.cst={RADIO_BUTTON:"mxgraph.bootstrap.radioButton"};
function mxShapeBootstrapCheckbox2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapCheckbox2,mxShape);mxShapeBootstrapCheckbox2.prototype.customProperties=[{name:"checked",dispName:"Checked",type:"bool",defVal:!1},{name:"checkedFill",dispName:"Checked Fill Color",type:"color",defVal:"#ffffff"},{name:"checkedStroke",dispName:"Checked Stroke Color",type:"color",defVal:"#000000"}];
mxShapeBootstrapCheckbox2.prototype.cst={CHECKBOX2:"mxgraph.bootstrap.checkbox2"};
mxShapeBootstrapCheckbox2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"checked",!1),g=mxUtils.getValue(this.style,"checkedFill","#ffffff"),h=mxUtils.getValue(this.style,"checkedStroke","#000000");a.translate(d,e);f?(a.setFillColor(g),a.setStrokeColor(h),a.roundrect(0,0,b,c,2,2),a.fill(),a.setStrokeWidth("2"),a.begin(),a.moveTo(.8*b,.2*c),a.lineTo(.4*b,.75*c),a.lineTo(.25*b,.6*c),a.stroke()):(a.roundrect(0,0,b,c,2,2),a.fillAndStroke())};
mxCellRenderer.registerShape(mxShapeBootstrapCheckbox2.prototype.cst.CHECKBOX2,mxShapeBootstrapCheckbox2);function mxShapeBootstrapRadioButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRadioButton,mxShape);mxShapeBootstrapRadioButton.prototype.cst={RADIO_BUTTON:"mxgraph.bootstrap.radioButton"};
mxShapeBootstrapRadioButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.ellipse(0,0,b,c);a.fillAndStroke();a.setFillColor(d);a.ellipse(.25*b,.25*c,.5*b,.5*c);a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapRadioButton.prototype.cst.RADIO_BUTTON,mxShapeBootstrapRadioButton);
function mxShapeBootstrapHorLines(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapHorLines,mxShape);mxShapeBootstrapHorLines.prototype.cst={HOR_LINES:"mxgraph.bootstrap.horLines"};mxShapeBootstrapHorLines.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fill();a.begin();a.moveTo(0,0);a.lineTo(b,0);a.moveTo(0,c);a.lineTo(b,c);a.stroke()};
mxCellRenderer.registerShape(mxShapeBootstrapHorLines.prototype.cst.HOR_LINES,mxShapeBootstrapHorLines);function mxShapeBootstrapUserTwo(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapUserTwo,mxShape);mxShapeBootstrapUserTwo.prototype.cst={USER2:"mxgraph.bootstrap.user2"};
function mxShapeBootstrapRadioButton2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRadioButton2,mxShape);mxShapeBootstrapRadioButton2.prototype.customProperties=[{name:"checked",dispName:"Checked",type:"bool",defVal:!1},{name:"checkedFill",dispName:"Checked Fill Color",type:"color",defVal:"#ffffff"},{name:"checkedStroke",dispName:"Checked Stroke Color",type:"color",defVal:"#000000"}];
mxShapeBootstrapRadioButton2.prototype.cst={RADIO_BUTTON2:"mxgraph.bootstrap.radioButton2"};
mxShapeBootstrapRadioButton2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"checked",!1),g=mxUtils.getValue(this.style,"checkedFill","#ffffff"),h=mxUtils.getValue(this.style,"checkedStroke","#000000");a.translate(d,e);f?(a.setFillColor(g),a.setStrokeColor(g),a.ellipse(0,0,b,c),a.fillAndStroke(),a.setFillColor(h),a.ellipse(.2*b,.2*c,.6*b,.6*c),a.fill()):(a.ellipse(0,0,b,c),a.fillAndStroke())};
mxCellRenderer.registerShape(mxShapeBootstrapRadioButton2.prototype.cst.RADIO_BUTTON2,mxShapeBootstrapRadioButton2);function mxShapeBootstrapHorLines(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapHorLines,mxShape);mxShapeBootstrapHorLines.prototype.cst={HOR_LINES:"mxgraph.bootstrap.horLines"};
mxShapeBootstrapHorLines.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fill();a.begin();a.moveTo(0,0);a.lineTo(b,0);a.moveTo(0,c);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapHorLines.prototype.cst.HOR_LINES,mxShapeBootstrapHorLines);function mxShapeBootstrapUserTwo(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapUserTwo,mxShape);
mxShapeBootstrapUserTwo.prototype.cst={USER2:"mxgraph.bootstrap.user2"};
mxShapeBootstrapUserTwo.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,.95*c);a.arcTo(.3*b,.3*c,0,0,1,.02*b,.87*c);a.arcTo(.1*b,.1*c,0,0,1,.08*b,.812*c);a.arcTo(3*b,3*c,0,0,1,.29*b,.732*c);a.arcTo(.15*b,.15*c,0,0,0,.385*b,.607*c);a.arcTo(.11*b,.11*c,0,0,0,.355*b,.53*c);a.arcTo(.3*b,.3*c,0,0,1,.305*b,.44*c);a.arcTo(.33*b,.38*c,0,0,1,.312*b,.15*c);a.arcTo(.218*b,.218*c,0,0,1,.688*b,.15*c);a.arcTo(.33*b,.38*c,0,0,1,.693*b,.44*c);a.arcTo(.25*b,.25*c,0,0,1,.645*b,
.53*c);a.arcTo(.1*b,.1*c,0,0,0,.612*b,.6*c);a.arcTo(.15*b,.15*c,0,0,0,.7*b,.726*c);a.arcTo(3*b,3*c,0,0,1,.92*b,.812*c);a.arcTo(.1*b,.1*c,0,0,1,.97*b,.865*c);a.arcTo(.2*b,.2*c,0,0,1,.995*b,.952*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapUserTwo.prototype.cst.USER2,mxShapeBootstrapUserTwo);function mxShapeBootstrapRating(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRating,mxShape);
mxShapeBootstrapRating.prototype.cst={RATING:"mxgraph.bootstrap.rating",RATING_STYLE:"ratingStyle",RATING_SCALE:"ratingScale",RATING_HEART:"heart",RATING_STAR:"star",EMPTY_FILL_COLOR:"emptyFillColor",GRADE:"grade"};
@ -2005,7 +2012,26 @@ c*1.2+.364*c,.33*c),a.lineTo(d*c*1.2+.475*c,0),a.lineTo(d*c*1.2+.586*c,.33*c),a.
1.039*c,.414*c,d*c*1.2+1.036*c,.229*c,d*c*1.2+.924*c,.115*c),a.curveTo(d*c*1.2+.812*c,0,d*c*1.2+.631*c,0,d*c*1.2+.519*c,.115*c),a.curveTo(d*c*1.2+.408*c,0,d*c*1.2+.227*c,0,d*c*1.2+.115*c,.115*c),a.curveTo(d*c*1.2+.03*c,.229*c,d*c*1.2,.414*c,d*c*1.2+.123*c,.54*c),a.close(),a.fillAndStroke();d=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.EMPTY_FILL_COLOR,"#ffffff");a.setFillColor(d);if(b===mxShapeBootstrapRating.prototype.cst.RATING_STAR)for(d=f;d<g;d++)a.begin(),a.moveTo(d*c*1.2,
.33*c),a.lineTo(d*c*1.2+.364*c,.33*c),a.lineTo(d*c*1.2+.475*c,0),a.lineTo(d*c*1.2+.586*c,.33*c),a.lineTo(d*c*1.2+.95*c,.33*c),a.lineTo(d*c*1.2+.66*c,.551*c),a.lineTo(d*c*1.2+.775*c,.9*c),a.lineTo(d*c*1.2+.475*c,.684*c),a.lineTo(d*c*1.2+.175*c,.9*c),a.lineTo(d*c*1.2+.29*c,.551*c),a.close(),a.fillAndStroke();else if(b===mxShapeBootstrapRating.prototype.cst.RATING_HEART)for(d=f;d<g;d++)a.begin(),a.moveTo(d*c*1.2+.519*c,.947*c),a.curveTo(d*c*1.2+.558*c,.908*c,d*c*1.2+.778*c,.682*c,d*c*1.2+.916*c,.54*
c),a.curveTo(d*c*1.2+1.039*c,.414*c,d*c*1.2+1.036*c,.229*c,d*c*1.2+.924*c,.115*c),a.curveTo(d*c*1.2+.812*c,0,d*c*1.2+.631*c,0,d*c*1.2+.519*c,.115*c),a.curveTo(d*c*1.2+.408*c,0,d*c*1.2+.227*c,0,d*c*1.2+.115*c,.115*c),a.curveTo(d*c*1.2+.03*c,.229*c,d*c*1.2,.414*c,d*c*1.2+.123*c,.54*c),a.close(),a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapRating.prototype.cst.RATING,mxShapeBootstrapRating);function mxShapeBoostrapAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}
mxUtils.extend(mxShapeBoostrapAnchor,mxShape);mxShapeBoostrapAnchor.prototype.cst={ANCHOR:"mxgraph.bootstrap.anchor"};mxShapeBoostrapAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeBoostrapAnchor.prototype.cst.ANCHOR,mxShapeBoostrapAnchor);function mxShapeC4Person(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeC4Person,mxShape);mxShapeC4Person.prototype.cst={START:"mxgraph.c4.person"};
mxUtils.extend(mxShapeBoostrapAnchor,mxShape);mxShapeBoostrapAnchor.prototype.cst={ANCHOR:"mxgraph.bootstrap.anchor"};mxShapeBoostrapAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeBoostrapAnchor.prototype.cst.ANCHOR,mxShapeBoostrapAnchor);function mxShapeBootstrapRangeInput(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}mxUtils.extend(mxShapeBootstrapRangeInput,mxShape);
mxShapeBootstrapRangeInput.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3},{name:"rangeStyle",dispName:"Range Style",type:"enum",enumList:[{val:"rect",dispName:"Rectangle"},{val:"rounded",dispName:"Rounded"}]},{name:"handleStyle",dispName:"Handle Style",type:"enum",enumList:[{val:"rect",dispName:"Rectangle"},{val:"circle",dispName:"Circle"}]}];mxShapeBootstrapRangeInput.prototype.cst={RANGE_INPUT:"mxgraph.bootstrap.rangeInput"};
mxShapeBootstrapRangeInput.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=mxUtils.getValue(this.style,"gradientColor","none"),h=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),k=mxUtils.getValue(this.state.style,"strokeColor","#000000"),l=mxUtils.getValue(this.state.style,"gradientDirection","south"),m=mxUtils.getValue(this.state.style,"rangeStyle","rounded"),n=mxUtils.getValue(this.state.style,"handleStyle",
"circle"),p=Math.min(.5*c,.5*b),q=.5*p;a.translate(d,e);if("rect"==m){var r=d=parseFloat(mxUtils.getValue(this.style,"opacity","100")),t=d;"none"==h&&(r=0);"none"==g&&(t=0);a.setGradient(h,h,0,0,b,c,l,r,t);a.rect(0,.5*c-2,b,4);a.fill()}else"rounded"==m&&(a.begin(),a.moveTo(0,.5*c),a.arcTo(q,q,0,0,1,q,.5*c-q),a.lineTo(b-q,.5*c-q),a.arcTo(q,q,0,0,1,b,.5*c),a.arcTo(q,q,0,0,1,b-q,.5*c+q),a.lineTo(q,.5*c+q),a.arcTo(q,q,0,0,1,0,.5*c),a.close(),a.fill());"rect"==n?(a.setGradient(h,g,0,0,b,c,l,r,t),b=.5*
c,a.rect(f-.5*b,0,b,c),a.fillAndStroke(),a.begin(),a.moveTo(f-.25*b,.3*c),a.lineTo(f+.25*b,.3*c),a.moveTo(f-.25*b,.5*c),a.lineTo(f+.25*b,.5*c),a.moveTo(f-.25*b,.7*c),a.lineTo(f+.25*b,.7*c),a.stroke()):"circle"==n&&(a.setFillColor(k),a.ellipse(f-p,0,2*p,2*p),a.fill())};mxCellRenderer.registerShape(mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT,mxShapeBootstrapRangeInput);mxShapeBootstrapRangeInput.prototype.constraints=null;
Graph.handleFactory[mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT]=function(a){return[Graph.createHandle(a,["dx"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(a.x+d*a.width,a.y+a.height/2)},function(a,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-a.x)/a.width)))/100})]};
function mxShapeBootstrapSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapSwitch,mxShape);mxShapeBootstrapSwitch.prototype.customProperties=[{name:"buttonState",dispName:"Button State",type:"bool",defVal:!0},{name:"onStrokeColor",dispName:"On Stroke Color",type:"color"},{name:"onFillColor",dispName:"On Fill Color",type:"color"}];mxShapeBootstrapSwitch.prototype.cst={SHAPE_SWITCH:"mxgraph.bootstrap.switch"};
mxShapeBootstrapSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b=Math.max(b,2*c);var f=mxUtils.getValue(this.style,"buttonState",!0);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeBootstrapSwitch.prototype.background=function(a,d,e,b,c,f){1==f?(a.setStrokeColor(mxUtils.getValue(this.style,"onStrokeColor","#ffffff")),a.setFillColor(mxUtils.getValue(this.style,"onFillColor","#0085FC")),a.roundrect(0,0,b,c,.5*c,.5*c),a.fill()):(a.roundrect(0,0,b,c,.5*c,.5*c),a.fillAndStroke())};
mxShapeBootstrapSwitch.prototype.foreground=function(a,d,e,b,c,f){d=.8*c;1==f?(a.setFillColor(mxUtils.getValue(this.style,"onStrokeColor","#ffffff")),a.ellipse(b-.9*c,.1*c,d,d)):(a.setFillColor(mxUtils.getValue(this.style,"strokeColor","#000000")),a.ellipse(.1*c,.1*c,d,d));a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapSwitch.prototype.cst.SHAPE_SWITCH,mxShapeBootstrapSwitch);
function mxShapeBootstrapX(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapX,mxShape);mxShapeBootstrapX.prototype.cst={SHAPE_X:"mxgraph.bootstrap.x"};mxShapeBootstrapX.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,c);a.moveTo(b,0);a.lineTo(0,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapX.prototype.cst.SHAPE_X,mxShapeBootstrapX);
function mxShapeInfographicPopover(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicPopover,mxActor);mxShapeInfographicPopover.prototype.cst={SHAPE_POPOVER:"mxgraph.bootstrap.popover"};
mxShapeInfographicPopover.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10},{name:"dx",dispName:"Callout Position",min:0,defVal:100},{name:"dy",dispName:"Callout Size",min:0,defVal:30}];
mxShapeInfographicPopover.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,"rSize","10"));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),g=Math.max(e-f,0),h=Math.min(e+f,b);a.begin();a.moveTo(d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-f-d);a.arcTo(d,d,0,0,1,b-d,c-f);a.lineTo(h,c-f);a.lineTo(e,c);a.lineTo(g,c-f);a.lineTo(d,
c-f);a.arcTo(d,d,0,0,1,0,c-f-d);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER,mxShapeInfographicPopover);mxShapeInfographicPopover.prototype.constraints=null;
Graph.handleFactory[mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER]=function(a){return[Graph.createHandle(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+d,a.y+a.height-b)},function(a,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width,e.x-a.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,
Math.min(a.height,a.y+a.height-e.y)))/100})]};
mxShapeInfographicPopover.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-c));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));return a};
function mxShapeC4Person(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeC4Person,mxShape);mxShapeC4Person.prototype.cst={START:"mxgraph.c4.person"};
mxShapeC4Person.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(b/2,c/3);e=d/2;a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke();a.begin();a.moveTo(0,.8*d+e);a.arcTo(e,e,0,0,1,e,.8*d);a.lineTo(b-e,.8*d);a.arcTo(e,e,0,0,1,b,.8*d+e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.close();a.fillAndStroke();a.setShadow(!1);a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke()};var cylinderGetCylinderSize=mxCylinder.prototype.getCylinderSize;
mxShapeC4Person.prototype.getLabelMargins=function(a){return new mxRectangle(0,.8*Math.min(a.width/2,a.height/3),0,0)};mxCellRenderer.registerShape(mxShapeC4Person.prototype.cst.START,mxShapeC4Person);function mxCabinetsCabinet(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxCabinetsCabinet,mxShape);mxCabinetsCabinet.prototype.cst={HAS_STAND:"hasStand",CABINET:"mxgraph.cabinets.cabinet"};
mxCabinetsCabinet.prototype.customProperties=[{name:"hasStand",dispName:"Has Stand",type:"bool",defVal:!0}];mxCabinetsCabinet.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};mxCabinetsCabinet.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1009,4 +1009,4 @@ smart=Smart
parentChildSpacing=Vertikaler Abstand
siblingSpacing=Horizontaler Abstand
confNoPermErr=Sorry, you don't have enough permissions to view this embedded diagram from page {1}
copyAsImage=Copy as Image
copyAsImage=Als Bild kopieren

View file

@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
"revision": "c739afb702a9c20aea3b73adafdb17e8"
"revision": "991b4ef9193bf09d2e2f5efbe1f7e94b"
},
{
"url": "js/extensions.min.js",
@ -14,15 +14,15 @@ if (workbox)
},
{
"url": "js/diagramly/ElectronApp.js",
"revision": "3b3392fee63dbb57d9938087c1c2febe"
"revision": "d8fdc81b19a75ea223f26cab343b401d"
},
{
"url": "js/stencils.min.js",
"revision": "033242ce61a98a1223a9f896b97ec107"
"revision": "a1ffae1ccfc3919e5df304f6703db220"
},
{
"url": "js/shapes.min.js",
"revision": "6d1fdbc4b5e424d0713b28de2676d9e9"
"revision": "87caed91dc56473486dd90291eadd057"
},
{
"url": "index.html",
@ -138,7 +138,7 @@ if (workbox)
},
{
"url": "resources/dia_de.txt",
"revision": "92e190dd74963ea87a40863f82cd2c92"
"revision": "87dbeb930ec3474c6d25a1abdfa55aeb"
},
{
"url": "resources/dia_sl.txt",

View file

@ -667,6 +667,74 @@ mxShapeBootstrapCheckbox.prototype.paintVertexShape = function(c, x, y, w, h)
mxCellRenderer.registerShape(mxShapeBootstrapCheckbox.prototype.cst.CHECKBOX, mxShapeBootstrapCheckbox);
//**********************************************************************************************************************************************************
//Checkbox v2
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeBootstrapCheckbox2(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeBootstrapCheckbox2, mxShape);
mxShapeBootstrapCheckbox2.prototype.customProperties = [
{name: 'checked', dispName: 'Checked', type: 'bool', defVal: false},
{name: 'checkedFill', dispName: 'Checked Fill Color', type: 'color', defVal: '#ffffff'},
{name: 'checkedStroke', dispName: 'Checked Stroke Color', type: 'color', defVal: '#000000'}
];
mxShapeBootstrapCheckbox2.prototype.cst = {
CHECKBOX2 : 'mxgraph.bootstrap.checkbox2'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeBootstrapCheckbox2.prototype.paintVertexShape = function(c, x, y, w, h)
{
var isChecked = mxUtils.getValue(this.style, 'checked', false);
var checkedFill = mxUtils.getValue(this.style, 'checkedFill', '#ffffff');
var checkedStroke = mxUtils.getValue(this.style, 'checkedStroke', '#000000');
c.translate(x, y);
var rSize = 2;
if (isChecked)
{
c.setFillColor(checkedFill);
c.setStrokeColor(checkedStroke);
c.roundrect(0, 0, w, h, rSize, rSize);
c.fill();
c.setStrokeWidth('2');
c.begin();
c.moveTo(w * 0.8, h * 0.2);
c.lineTo(w * 0.4, h * 0.75);
c.lineTo(w * 0.25, h * 0.6);
c.stroke();
}
else
{
c.roundrect(0, 0, w, h, rSize, rSize);
c.fillAndStroke();
}
};
mxCellRenderer.registerShape(mxShapeBootstrapCheckbox2.prototype.cst.CHECKBOX2, mxShapeBootstrapCheckbox2);
//**********************************************************************************************************************************************************
//Radio Button
//**********************************************************************************************************************************************************
@ -713,6 +781,70 @@ mxShapeBootstrapRadioButton.prototype.paintVertexShape = function(c, x, y, w, h)
mxCellRenderer.registerShape(mxShapeBootstrapRadioButton.prototype.cst.RADIO_BUTTON, mxShapeBootstrapRadioButton);
//**********************************************************************************************************************************************************
//Radio Button v2
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeBootstrapRadioButton2(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeBootstrapRadioButton2, mxShape);
mxShapeBootstrapRadioButton2.prototype.customProperties = [
{name: 'checked', dispName: 'Checked', type: 'bool', defVal: false},
{name: 'checkedFill', dispName: 'Checked Fill Color', type: 'color', defVal: '#ffffff'},
{name: 'checkedStroke', dispName: 'Checked Stroke Color', type: 'color', defVal: '#000000'}
];
mxShapeBootstrapRadioButton2.prototype.cst = {
RADIO_BUTTON2 : 'mxgraph.bootstrap.radioButton2'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeBootstrapRadioButton2.prototype.paintVertexShape = function(c, x, y, w, h)
{
var isChecked = mxUtils.getValue(this.style, 'checked', false);
var checkedFill = mxUtils.getValue(this.style, 'checkedFill', '#ffffff');
var checkedStroke = mxUtils.getValue(this.style, 'checkedStroke', '#000000');
c.translate(x, y);
if (isChecked)
{
c.setFillColor(checkedFill);
c.setStrokeColor(checkedFill);
c.ellipse(0, 0, w, h);
c.fillAndStroke();
c.setFillColor(checkedStroke);
c.ellipse(w * 0.2, h * 0.2, w * 0.6, h * 0.6);
c.fill();
}
else
{
c.ellipse(0, 0, w, h);
c.fillAndStroke();
}
};
mxCellRenderer.registerShape(mxShapeBootstrapRadioButton2.prototype.cst.RADIO_BUTTON2, mxShapeBootstrapRadioButton2);
//**********************************************************************************************************************************************************
//Horizontal Lines
//**********************************************************************************************************************************************************
@ -1001,3 +1133,371 @@ mxShapeBoostrapAnchor.prototype.paintVertexShape = function(c, x, y, w, h)
mxCellRenderer.registerShape(mxShapeBoostrapAnchor.prototype.cst.ANCHOR, mxShapeBoostrapAnchor);
//**********************************************************************************************************************************************************
//Range input
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeBootstrapRangeInput(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
this.dx = 0.3;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeBootstrapRangeInput, mxShape);
mxShapeBootstrapRangeInput.prototype.customProperties = [
{name: 'dx', dispName: 'Handle Position', type: 'float', min:0, max:1, defVal:0.3},
{name: 'rangeStyle', dispName: 'Range Style', type: 'enum',
enumList: [{val: 'rect', dispName: 'Rectangle'},
{val: 'rounded', dispName: 'Rounded'}]
},
{name: 'handleStyle', dispName: 'Handle Style', type: 'enum',
enumList: [{val: 'rect', dispName: 'Rectangle'},
{val: 'circle', dispName: 'Circle'}]
}
];
mxShapeBootstrapRangeInput.prototype.cst = {
RANGE_INPUT : 'mxgraph.bootstrap.rangeInput'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeBootstrapRangeInput.prototype.paintVertexShape = function(c, x, y, w, h)
{
var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
var gradientColor = mxUtils.getValue(this.style, 'gradientColor', 'none');
var fillColor = mxUtils.getValue(this.state.style, 'fillColor', '#ffffff');
var strokeColor = mxUtils.getValue(this.state.style, 'strokeColor', '#000000');
var gradientDir = mxUtils.getValue(this.state.style, 'gradientDirection', 'south');
var rangeStyle = mxUtils.getValue(this.state.style, 'rangeStyle', 'rounded');
var handleStyle = mxUtils.getValue(this.state.style, 'handleStyle', 'circle');
var barH = Math.min(h * 0.5, w * 0.5);
var r = barH * 0.5;
c.translate(x, y);
if (rangeStyle == 'rect')
{
var opacity = parseFloat(mxUtils.getValue(this.style, 'opacity', '100'));
var op1 = opacity;
var op2 = opacity;
if (fillColor == 'none')
{
op1 = 0;
}
if (gradientColor == 'none')
{
op2 = 0;
}
c.setGradient(fillColor, fillColor, 0, 0, w, h, gradientDir, op1, op2);
c.rect(0, h * 0.5 - 2, w, 4);
c.fill();
}
else if (rangeStyle == 'rounded')
{
c.begin();
c.moveTo(0, h * 0.5);
c.arcTo(r, r, 0, 0, 1, r, h * 0.5 - r);
c.lineTo(w - r, h * 0.5 - r);
c.arcTo(r, r, 0, 0, 1, w, h * 0.5);
c.arcTo(r, r, 0, 0, 1, w - r, h * 0.5 + r);
c.lineTo(r, h * 0.5 + r);
c.arcTo(r, r, 0, 0, 1, 0, h * 0.5);
c.close();
c.fill();
}
if (handleStyle == 'rect')
{
c.setGradient(fillColor, gradientColor, 0, 0, w, h, gradientDir, op1, op2);
var hw = h * 0.5;
c.rect(dx - hw * 0.5, 0, hw, h);
c.fillAndStroke();
c.begin();
c.moveTo(dx - hw * 0.25, h * 0.3);
c.lineTo(dx + hw * 0.25, h * 0.3);
c.moveTo(dx - hw * 0.25, h * 0.5);
c.lineTo(dx + hw * 0.25, h * 0.5);
c.moveTo(dx - hw * 0.25, h * 0.7);
c.lineTo(dx + hw * 0.25, h * 0.7);
c.stroke();
}
else if (handleStyle == 'circle')
{
c.setFillColor(strokeColor);
c.ellipse(dx - barH, 0, 2 * barH, 2 * barH);
c.fill();
}
};
mxCellRenderer.registerShape(mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT, mxShapeBootstrapRangeInput);
mxShapeBootstrapRangeInput.prototype.constraints = null;
Graph.handleFactory[mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT] = function(state)
{
var handles = [Graph.createHandle(state, ['dx'], function(bounds)
{
var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
return new mxPoint(bounds.x + dx * bounds.width, bounds.y + bounds.height / 2);
}, function(bounds, pt)
{
this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
})];
return handles;
}
//**********************************************************************************************************************************************************
//Switch
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeBootstrapSwitch(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeBootstrapSwitch, mxShape);
mxShapeBootstrapSwitch.prototype.customProperties = [
{name: 'buttonState', dispName: 'Button State', type: 'bool', defVal : true},
{name: 'onStrokeColor', dispName: 'On Stroke Color', type: 'color'},
{name: 'onFillColor', dispName: 'On Fill Color', type: 'color'},
];
mxShapeBootstrapSwitch.prototype.cst = {
SHAPE_SWITCH : 'mxgraph.bootstrap.switch'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeBootstrapSwitch.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
w = Math.max(w, 2 * h);
var state = mxUtils.getValue(this.style, 'buttonState', true);
this.background(c, x, y, w, h, state);
c.setShadow(false);
this.foreground(c, x, y, w, h, state);
};
mxShapeBootstrapSwitch.prototype.background = function(c, x, y, w, h, state)
{
if (state == true)
{
c.setStrokeColor(mxUtils.getValue(this.style, 'onStrokeColor', '#ffffff'));
c.setFillColor(mxUtils.getValue(this.style, 'onFillColor', '#0085FC'));
c.roundrect(0, 0, w, h, h * 0.5, h * 0.5);
c.fill();
}
else
{
c.roundrect(0, 0, w, h, h * 0.5, h * 0.5);
c.fillAndStroke();
}
};
mxShapeBootstrapSwitch.prototype.foreground = function(c, x, y, w, h, state)
{
var r = h * 0.8;
if (state == true)
{
c.setFillColor(mxUtils.getValue(this.style, 'onStrokeColor', '#ffffff'));
c.ellipse(w - h * 0.9, h * 0.1, r, r);
c.fill();
}
else
{
c.setFillColor(mxUtils.getValue(this.style, 'strokeColor', '#000000'));
c.ellipse(h * 0.1, h * 0.1, r, r);
c.fill();
}
};
mxCellRenderer.registerShape(mxShapeBootstrapSwitch.prototype.cst.SHAPE_SWITCH, mxShapeBootstrapSwitch);
//**********************************************************************************************************************************************************
//X
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeBootstrapX(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeBootstrapX, mxShape);
mxShapeBootstrapX.prototype.cst = {
SHAPE_X : 'mxgraph.bootstrap.x'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeBootstrapX.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.begin();
c.moveTo(0, 0);
c.lineTo(w, h);
c.moveTo(w, 0);
c.lineTo(0, h);
c.stroke();
};
mxCellRenderer.registerShape(mxShapeBootstrapX.prototype.cst.SHAPE_X, mxShapeBootstrapX);
//**********************************************************************************************************************************************************
//Popover
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeInfographicPopover(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
this.dx = 0.5;
this.dy = 0.5;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeInfographicPopover, mxActor);
mxShapeInfographicPopover.prototype.cst = {SHAPE_POPOVER : 'mxgraph.bootstrap.popover'};
mxShapeInfographicPopover.prototype.customProperties = [
{name: 'rSize', dispName: 'Arc Size', type: 'float', min:0, defVal:10},
{name:'dx', dispName:'Callout Position', min:0, defVal: 100},
{name:'dy', dispName:'Callout Size', min:0, defVal: 30}
];
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeInfographicPopover.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var r = parseInt(mxUtils.getValue(this.style, 'rSize', '10'));
var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
var x1 = Math.max(dx - dy, 0);
var x2 = Math.min(dx + dy, w);
c.begin();
c.moveTo(r, 0);
c.lineTo(w - r, 0);
c.arcTo(r, r, 0, 0, 1, w, r);
c.lineTo(w, h - dy - r);
c.arcTo(r, r, 0, 0, 1, w - r, h - dy);
c.lineTo(x2, h - dy);
c.lineTo(dx, h);
c.lineTo(x1, h - dy);
c.lineTo(r, h - dy);
c.arcTo(r, r, 0, 0, 1, 0, h - dy - r);
c.lineTo(0, r);
c.arcTo(r, r, 0, 0, 1, r, 0);
c.close();
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER, mxShapeInfographicPopover);
mxShapeInfographicPopover.prototype.constraints = null;
Graph.handleFactory[mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER] = function(state)
{
var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)
{
var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy);
}, function(bounds, pt)
{
this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width, pt.x - bounds.x))) / 100;
this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height, bounds.y + bounds.height - pt.y))) / 100;
})];
return handles;
};
mxShapeInfographicPopover.prototype.getConstraints = function(style, w, h)
{
var constr = [];
var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
var x1 = Math.max(dx - dy * 0.35, 0);
var x2 = Math.min(dx + dy * 0.35, w);
constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));
constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));
constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.5));
constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - dy));
constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false, null, 0, h - dy));
constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false, null, 0, h - dy));
constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dy));
return (constr);
};

View file

@ -1,31 +1,60 @@
<shapes name="mxgraph.bootstrap">
<shape aspect="variable" h="60.0" name="check" strokewidth="inherit" w="70.0">
<shapes name="mxGraph.bootstrap">
<shape aspect="variable" h="612" name="logo" strokewidth="inherit" w="612">
<connections/>
<background>
<path>
<move x="0.0" y="35.0"/>
<line x="20.0" y="60.0"/>
<line x="70.0" y="0.0"/>
<move x="612" y="510"/>
<curve x1="612" x2="566.1" x3="510" y1="566.1" y2="612" y3="612"/>
<line x="102" y="612"/>
<curve x1="45.9" x2="0" x3="0" y1="612" y2="566.1" y3="510"/>
<line x="0" y="102"/>
<curve x1="0" x2="45.9" x3="102" y1="45.9" y2="0" y3="0"/>
<line x="510" y="0"/>
<curve x1="566.1" x2="612" x3="612" y1="0" y2="45.9" y3="102"/>
<line x="612" y="510"/>
<close/>
</path>
</background>
<foreground>
<stroke/>
</foreground>
</shape>
<shape aspect="variable" h="55" name="Mail" strokewidth="inherit" w="100">
<connections/>
<foreground>
<rect h="55" w="100" x="0" y="0"/>
<fillstroke/>
<fillcolor color="#ffffff"/>
<path>
<move x="0" y="0"/>
<line x="50" y="45"/>
<line x="100" y="0"/>
<move x="0" y="55"/>
<line x="31" y="27.5"/>
<move x="100" y="55"/>
<line x="69" y="27.5"/>
<move x="166.3" y="133"/>
<line x="339.8" y="133"/>
<curve x1="371.8" x2="397.5" x3="416.8" y1="133" y2="140.3" y3="155"/>
<curve x1="436.1" x2="445.8" x3="445.8" y1="169.7" y2="191.8" y3="221.5"/>
<curve x1="445.8" x2="441.4" x3="432.6" y1="239.5" y2="254.9" y3="267.7"/>
<curve x1="423.8" x2="411.2" x3="394.8" y1="280.5" y2="290.5" y3="297.5"/>
<line x="394.8" y="298.5"/>
<curve x1="416.8" x2="433.5" x3="444.8" y1="303.2" y2="313.6" y3="329.7"/>
<curve x1="456.1" x2="461.8" x3="461.8" y1="345.9" y2="366.1" y3="390.5"/>
<curve x1="461.8" x2="459.3" x3="454.3" y1="404.5" y2="417.6" y3="429.7"/>
<curve x1="449.3" x2="441.5" x3="430.8" y1="441.9" y2="452.4" y3="461.2"/>
<curve x1="420.1" x2="406.5" x3="389.8" y1="470" y2="477" y3="482.2"/>
<curve x1="373.1" x2="353.3" x3="330.3" y1="487.4" y2="490" y3="490"/>
<line x="166.3" y="490"/>
<line x="166.3" y="133"/>
<close/>
<move x="228.8" y="282.5"/>
<line x="330.8" y="282.5"/>
<curve x1="345.8" x2="358.3" x3="368.3" y1="282.5" y2="278.3" y3="269.7"/>
<curve x1="378.3" x2="383.3" x3="383.3" y1="261.1" y2="248.9" y3="232.9"/>
<curve x1="383.3" x2="378.8" x3="369.8" y1="214.9" y2="202.2" y3="194.9"/>
<curve x1="360.8" x2="347.8" x3="330.8" y1="187.6" y2="183.9" y3="183.9"/>
<line x="228.8" y="183.9"/>
<line x="228.8" y="282.5"/>
<close/>
<move x="228.8" y="439"/>
<line x="339.3" y="439"/>
<curve x1="358.3" x2="373.1" x3="383.5" y1="439" y2="434.1" y3="424.2"/>
<curve x1="394" x2="399.3" x3="399.3" y1="414.4" y2="400.4" y3="382.4"/>
<curve x1="399.3" x2="394.1" x3="383.5" y1="364.7" y2="351.2" y3="341.6"/>
<curve x1="372.9" x2="358.3" x3="339.3" y1="332" y2="327.4" y3="327.4"/>
<line x="228.8" y="327.4"/>
<line x="228.8" y="439"/>
<close/>
</path>
<stroke/>
<fill/>
</foreground>
</shape>
<shape aspect="variable" h="100" name="password" strokewidth="inherit" w="100">
@ -34,16 +63,25 @@
<path>
<move x="50" y="0"/>
<line x="50" y="100"/>
<move x="0" y="50"/>
<line x="100" y="50"/>
<move x="14.5" y="14.5"/>
<line x="85.5" y="85.5"/>
<move x="85.5" y="14.5"/>
<line x="14.5" y="85.5"/>
</path>
</background>
<foreground>
<stroke/>
<fillstroke/>
<path>
<move x="0" y="50"/>
<line x="100" y="50"/>
</path>
<fillstroke/>
<path>
<move x="14.5" y="14.5"/>
<line x="85.5" y="85.5"/>
</path>
<fillstroke/>
<path>
<move x="85.5" y="14.5"/>
<line x="14.5" y="85.5"/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="100" name="rect" strokewidth="inherit" w="100">
@ -82,18 +120,4 @@
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="100" name="x" strokewidth="inherit" w="100">
<connections/>
<background>
<path>
<move x="0" y="0"/>
<line x="100" y="100"/>
<move x="0" y="100"/>
<line x="100" y="0"/>
</path>
</background>
<foreground>
<stroke/>
</foreground>
</shape>
</shapes>

View file

@ -8,6 +8,9 @@
},
{
"applicationId": "aae1c620-4caf-41b3-9633-f6d0b6347dd9"
},
{
"applicationId": "b5ff67d6-3155-4fca-965a-59a3655c4476"
}
]
}