This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exports the graph to a PDF and displays it in a new tab via data URL | |
function exportPdf(graph) | |
{ | |
// Prepare document | |
var pdfCanvas = new jsPDF(); | |
pdfCanvas.scale(1 / graph.pageScale); | |
// Render graph | |
var imgExport = new mxImageExport(); | |
imgExport.includeOverlays = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jsPDF | |
* | |
* Open Issues: | |
* | |
* - HTML rendering | |
* - Add rotation | |
* - Add support for dash patterns | |
* - Add clipped/vertical (PDF) labels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FilenameFilter; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.nio.file.Files; | |
import java.util.Arrays; | |
import javax.swing.JFileChooser; | |
import javax.xml.parsers.ParserConfigurationException; | |
import javax.xml.transform.TransformerException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Starting from https://sangupta.com/tech/encodeuricomponent-and.html | |
public static final String ALLOWED_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'()"; | |
public static String encodeURIComponent2(String input, String charset) | |
{ | |
if (input.isEmpty()) | |
{ | |
return input; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mxgraph.properties; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Draw.io Viewer</title> | |
<style type="text/css"> | |
html, body { | |
height:100%; | |
overflow:hidden; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2006-2015, JGraph Ltd | |
* Copyright (c) 2006-2015, Gaudenz Alder | |
*/ | |
var mxPerimeter = | |
{ | |
/** | |
* Class: mxPerimeter | |
* | |
* Provides various perimeter functions to be used in a style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |