Skip to content

Instantly share code, notes, and snippets.

View davidjgraph's full-sized avatar
🏠
Typing...

David Benson davidjgraph

🏠
Typing...
View GitHub Profile
/**
* $Id: Dialogs.js,v 1.10 2013/08/20 12:10:41 gaudenz Exp $
* Copyright (c) 2006-2012, JGraph Ltd
*/
/**
* Constructs a new dialog.
*/
function Dialog(editorUi, elt, w, h, modal, closable, onClose)
{
var dx = 0;
<ac:layout><ac:layout-section ac:type="single"><ac:layout-cell>
<h1 style="text-align: center;">Welcome to the EEO Project</h1>
<p>Here's a brief overview:</p>
<p><ac:structured-macro ac:name="viewppt"><ac:parameter ac:name="height">50%</ac:parameter><ac:parameter ac:name="name"><ri:attachment ri:filename="EEO Project - Project Team Briefing - 20130916.pptx" /></ac:parameter></ac:structured-macro></p></ac:layout-cell></ac:layout-section><ac:layout-section ac:type="single"><ac:layout-cell>
<p><ac:structured-macro ac:name="diagramly"><ac:parameter ac:name="docId">5701638</ac:parameter></ac:structured-macro>The EEO Project Structure:</p>
<p><ac:structured-macro ac:name="gallery" /></p>
<p>&nbsp;<ac:structured-macro ac:name="diagramly"><ac:parameter ac:name="width">700</ac:parameter><ac:parameter ac:name="height">500</ac:parameter><ac:parameter ac:name="border">true</ac:parameter><ac:parameter ac:name="grid">true</ac:parameter><ac:parameter ac:name="fitWindow">false</ac:parameter><ac:parameter ac:name="autoSize">
@davidjgraph
davidjgraph / Sidebar.js
Created October 24, 2013 13:47
The iconfinder widget in draw.io
Sidebar.prototype.addIconfinder = function()
{
// TODO: Fix delayed typing, occasional error in library creation in quirks mode
var elt = this.createTitle(mxResources.get('images'));
this.container.appendChild(elt);
var div = document.createElement('div');
div.className = 'geSidebar';
div.style.display = 'none';
div.style.overflow = 'hidden';
<mxGraphModel dx="800" dy="800" grid="1" guides="1" tooltips="1" connect="1" fold="1" page="1" pageScale="1" pageWidth="826" pageHeight="1169" style="default-style2">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="3" value="&lt;p style=&quot;margin: 0px; margin-top: 4px; text-align: center;&quot;&gt;Hello, Dolly!&amp;nbsp;&amp;plusmn;Test&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1" vertex="1" parent="1">
<mxGeometry x="80" y="340" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="4" value="±" style="whiteSpace=wrap" vertex="1" parent="1">
<mxGeometry x="340" y="340" width="120" height="60" as="geometry"/>
</mxCell>
<mxGraphModel dx="800" dy="800" grid="1" guides="1" tooltips="1" connect="1" fold="1" page="1" pageScale="1" pageWidth="826" pageHeight="1169" style="default-style2">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="" style="whiteSpace=wrap" vertex="1" parent="1">
<mxGeometry x="150" y="230" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="3" value="" style="whiteSpace=wrap" vertex="1" parent="1">
<mxGeometry x="770" y="230" width="120" height="60" as="geometry"/>
</mxCell>
@davidjgraph
davidjgraph / customEdge.html
Created December 2, 2013 13:43
Custom edge example for mxGraph
<!--
$Id: markers.html,v 1.4 2013/10/28 08:44:55 gaudenz Exp $
Copyright (c) 2006-2014, JGraph Ltd
Demonstrates creating a custom edge in mxGraph
-->
<html>
<head>
<title>Custom edge example for mxGraph</title>
@davidjgraph
davidjgraph / mxGraph.java
Created December 18, 2013 08:43
mxGraph GWT wrapper example
package com.mxgraph.gwt.client.view;
import java.util.List;
import java.util.Map;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
17-JAN-2014: 1.13.0.12
- Fixes mxUtils.getTextContent for Firefox, adds mxUtils.setTextContent [JavaScript]
- Improves edge crossing calculation performance in hierarchical layout [JavaScript]
- Corrects issue with the hierarchical layout where there are multiple parallel, bi-directional edges between two
vertices and the initial traversal from roots doesn't follow the direction the majority of edges travel in. [JavaScript]
08-JAN-2014: 1.13.0.11
- Fixes possible undefined function in mxUtils.clearSelection [JavaScript]
@davidjgraph
davidjgraph / flowchart.xml
Created January 27, 2014 21:05
mxgraph stencils for flowcharts
<shapes name="mxGraph.flowchart">
<shape name="Annotation 1" h="98" w="50" aspect="variable" strokewidth="inherit">
<connections>
<constraint x="0.5" y="0" perimeter="0" name="N"/>
<constraint x="0.5" y="1" perimeter="0" name="S"/>
<constraint x="0" y="0.5" perimeter="0" name="W"/>
<constraint x="1" y="0.5" perimeter="0" name="E"/>
<constraint x="0" y="0" perimeter="0" name="NW"/>
<constraint x="0" y="1" perimeter="0" name="SW"/>
<constraint x="1" y="0" perimeter="0" name="NE"/>
@davidjgraph
davidjgraph / mxCompactTree.js
Created March 5, 2014 11:13
mxCompactTree from mxGraph 2.5.1
/**
* $Id: mxCompactTreeLayout.js,v 1.6 2013/10/28 08:45:05 gaudenz Exp $
* Copyright (c) 2006-2013, JGraph Ltd
*/
/**
* Class: mxCompactTreeLayout
*
* Extends <mxGraphLayout> to implement a compact tree (Moen) algorithm. This
* layout is suitable for graphs that have no cycles (trees). Vertices that are
* not connected to the tree will be ignored by this layout.