Skip to content

Instantly share code, notes, and snippets.

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

David Benson davidjgraph

🏠
Typing...
View GitHub Profile
@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>
/**
* $Id: ProxyServlet.java,v 1.4 2013/12/13 13:18:11 david Exp $
* Copyright (c) 2011-2012, JGraph Ltd
*/
package com.mxgraph.online;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.Serializable;
@davidjgraph
davidjgraph / gist:9d997cdf81f438bbd725
Created July 29, 2014 13:27
explore.js draw.io plugin
/**
* Explore plugin.
*/
Draw.loadPlugin(function(ui)
{
// Adds resource for action
mxResources.parse('exploreFromHere=Explore from here...');
// Max number of edges per page
var pageSize = 20;
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.10/MicrosoftTeams.schema.json",
"manifestVersion": "1.10",
"version": "1.0.13",
"id": "xxx",
"packageName": "com.mxgraph.teamsApp",
"developer": {
"name": "JGraph",
"websiteUrl": "https://www.diagrams.net",
"privacyUrl": "https://www.diagrams.net/trust/privacy-microsoft-teams",
@davidjgraph
davidjgraph / drawWebView.java
Last active April 11, 2021 14:15
draw.io wraped in a Java WebView
import javafx.application.Application;
import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.scene.web.WebEngine;
@davidjgraph
davidjgraph / menustyle.js
Created September 12, 2013 20:09
mxGraph menu example
<!--
$Id: menustyle.html,v 1.5 2013/06/07 14:30:51 gaudenz Exp $
Copyright (c) 2006-2010, JGraph Ltd
Menustyle example for mxGraph. This example demonstrates using
CSS to style the mxPopupMenu.
-->
<html>
<head>
<title>Menustyle example for mxGraph</title>
@davidjgraph
davidjgraph / drawio-drive-setup.txt
Created September 10, 2019 10:54
Instructions to setup custom Google Drive project with draw.io
- Go to https://console.cloud.google.com and create new project
- In new project select APIs and services
- Click "ENABLE APIS AND SERVICES"
- Search for "drive" and click "Google Drive API", then "Enable"
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var mathJaxQueue = [];
// Disables global typesetting and messages on startup, adds queue for
// asynchronous rendering while MathJax is loading
window.MathJax =
@davidjgraph
davidjgraph / server.c++
Created August 28, 2015 05:40
draw.io sandstorm server file
// Copyright (c) 2014 Sandstorm Development Group, Inc.
// Licensed under the MIT License:
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@davidjgraph
davidjgraph / mxSwimlaneLayout.js
Created September 24, 2013 05:41
23.09.2013 Swimlane layout fix
/**
* $Id: mxSwimlaneLayout.js,v 1.3 2013/09/23 14:11:22 david Exp $
* Copyright (c) 2005-2012, JGraph Ltd
*/
/**
* Class: mxSwimlaneLayout
*
* A hierarchical layout algorithm.
*
* Constructor: mxSwimlaneLayout