|
@ -1,3 +1,8 @@
|
|||
23-DEC-2016: 6.0.2.5
|
||||
|
||||
- Adds PlantUML option in text dialog
|
||||
- Uses mxGraph 3.7.0.0 beta 11
|
||||
|
||||
14-DEC-2016: 6.0.2.4
|
||||
|
||||
- Adds text field support for .vsdx import
|
||||
|
|
2
VERSION
|
@ -1 +1 @@
|
|||
6.0.2.4
|
||||
6.0.2.5
|
|
@ -3,8 +3,8 @@ var mxClient={VERSION:"3.7.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_
|
|||
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
|
||||
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
|
||||
0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0<navigator.appVersion.indexOf("Win"),
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=
|
||||
c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
|
||||
"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
|
||||
mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
1.5:45d84b5f-d341-404a-91f2-6ab95c7e1a80
|
|
@ -1 +0,0 @@
|
|||
1480346546
|
|
@ -1 +0,0 @@
|
|||
45d84b5f-d341-404a-91f2-6ab95c7e1a80
|
|
@ -1 +0,0 @@
|
|||
9e1a881e301c4ba7b3d69252ce260b0a
|
|
@ -1,27 +0,0 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEA2tC60+Hjrw5PdaWOppSkF3gU03UngGZvtJfC7nA6Xd/ORF1S
|
||||
kImPL08dO/tHGg+mVNMn0QKrRE8epQqFYoEuGBRAFFMjd4thx7cIcRCiuQ982xPP
|
||||
X7NFuSh7tu+0mThl3wVQjOsH7aAE7xp9IQihqzYsRqza8qMSJMU5U8cdjkFlgPyG
|
||||
BRGLgGc8/RzhjVrchlPcKK+cNGn88sAl47FCqx4PAQ4TIdgmHZejlrkDQXXHlNzi
|
||||
SOwYrawafEX4XkQoQxi5J2AofFumk7rmv7wQsIxcSKSV0yaPYFIHfe3w6gbGBXIf
|
||||
sSeG5c3c0qvTPDFHHMGW21+CjTJQ48iCY+G9EwIDAQABAoIBAQC8YdNWszT38xQJ
|
||||
rxze4T1cTy9u1X/KlWY6TiWubcRyKUpFpSp98U/qZOxARZbzIuIKSTgQQ4H7bzps
|
||||
0GABbEGozVZVqTXxp3fpHvUPkkjlliXh3m48b/To8aeA2WHcP6fEl6i/iWDr/UYC
|
||||
LAXqOKom4p6/wfVFy4rFSV6Pd+9EFgWhk4cX0B4CCjNvOy5iqBr2Z8XPIiDspJgM
|
||||
T56xSfKK44sAfEMkubuhKcexvKnBs35IXiVvQhw25MqysBGcWzZ3ihJJzY7HqtOo
|
||||
tNGC0w7L8O2CvBFAmKR1o4zXiTgMEuUk5KJNWn6xcGAf/fGj3Mv9NoKs8nZJNjO9
|
||||
O4C+VaBBAoGBAPAQ0Z3At8a0ueMBs1Bb0/5lgx+4/M/oFq9Yv9y+cH0yLdTjRCnM
|
||||
bEzG9PpL2VddEReQi1s4+ooVzfv5fCHY+zUSAZbyUWA+e5XS/oXlgye/aMo/nRxN
|
||||
bNAvEFsVx2hX9fEy0o+V8GPvxPuE1KXJr4jYEdx6PsJDlM5Rdf9h8/exAoGBAOlW
|
||||
04/8AzVINtwA9D65sjfasY4iXbTYoMchxA3LWWsdNEJD3llO5t65ftKCzE8PAqyb
|
||||
AdrG6g4H1UFZpCshDbw7u3bM0ehxAv8Dr2adyKIXznj2yppqESpg+qncbjlFnju8
|
||||
wTudKtTUhI7er95a5J6P4mQu9YYYLOHmyCmUTrYDAoGBAO2Zt93KwBmLBfAH3tHK
|
||||
ESfYkM706ENeEhW6YSq50dwXrgTmarB0Azx6Lj0MlTBCjIgmJ8dBvbatnhGl+5YE
|
||||
i50bFTew3ZnEPc0r533eitDsQWrrSzSX7PqfmjCMfbBoXqM7CevTGvnOdcf6z/zG
|
||||
gVWPhR4SX8sl2EHbnk4FRNIBAoGASzBdT+JHLl4sv0vXaHbyBKmF2WUdiO7dMA2j
|
||||
XUaPc8KfWlMATQrtvgtL4I2hREBz/iacvGCofwjrIPm/ut4VzPf6eleZtCrmakJH
|
||||
vOtPAVxmffgYZRWUnnFNlHqhUfcq+9jg81K7wIUSie8cAKyNSsLWkq3HFASqQcjZ
|
||||
6vwNOP0CgYA4NfJMN9etcFxv/Up8xij2E1tYulaNKzeWnZKviHY/O19Upkt51h+l
|
||||
7xzsEnsL6/HnnjxN2jNbZGZXBNEpFejZM0jD8/QNC/NvFy95KYbYChyJM6MBtheq
|
||||
w0epX49viksxLTrIEKbnw7m5cFa08IesFuRxFEu/D61R1dF57kfTJg==
|
||||
-----END RSA PRIVATE KEY-----
|
|
@ -1 +0,0 @@
|
|||
{"virtualbox":{"/opt/app":{"guestpath":"/opt/app","hostpath":"/Users/david/dev/drawio/etc/sandstorm/build","disabled":false,"__vagrantfile":true},"/host-dot-sandstorm":{"guestpath":"/host-dot-sandstorm","hostpath":"/Users/david/.sandstorm","disabled":false,"__vagrantfile":true}}}
|
|
@ -1,19 +0,0 @@
|
|||
09-SEP-2016: 5.6.0.3
|
||||
|
||||
- Updates to draw.io 5.6.0.3
|
||||
- Fixes Saving... status
|
||||
- Adds read-only permission option
|
||||
|
||||
28-AUG-2015: 5.0.2.3
|
||||
|
||||
- Updates to draw.io 5.0.2.3
|
||||
|
||||
06-FEB-2015: 0.1.1.0
|
||||
|
||||
- Fixes external image export (probably)
|
||||
- Fixes iconfinder calls (probably)
|
||||
- Updates draw to head
|
||||
|
||||
02-FEB-2015: 0.1.0.0
|
||||
|
||||
- Initial release
|
|
@ -1,23 +0,0 @@
|
|||
CXX=g++
|
||||
CXXFLAGS=-O2 -Wall
|
||||
CXXFLAGS2=-std=c++1y -Itmp $(CXXFLAGS)
|
||||
SANDSTORM_CAPNP_DIR=/opt/sandstorm/latest/usr/include
|
||||
|
||||
.PHONEY: all clean dev
|
||||
|
||||
package.spk: server sandstorm-pkgdef.capnp
|
||||
spk pack --keyring="drawio.key" package.spk
|
||||
|
||||
dev: server sandstorm-pkgdef.capnp
|
||||
spk dev
|
||||
|
||||
clean:
|
||||
rm -rf tmp server package.spk
|
||||
|
||||
tmp/genfiles:
|
||||
@mkdir -p tmp
|
||||
capnp compile --src-prefix=$(SANDSTORM_CAPNP_DIR) -oc++:tmp $(SANDSTORM_CAPNP_DIR)/sandstorm/*.capnp
|
||||
@touch tmp/genfiles
|
||||
|
||||
server: tmp/genfiles server.c++
|
||||
$(CXX) -static server.c++ tmp/sandstorm/*.capnp.c++ -o server $(CXXFLAGS2) `pkg-config capnp-rpc --cflags --libs`
|
103
etc/sandstorm/build/.sandstorm/Vagrantfile
vendored
|
@ -1,103 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Guess at a reasonable name for the VM based on the folder vagrant-spk is
|
||||
# run from. The timestamp is there to avoid conflicts if you have multiple
|
||||
# folders with the same name.
|
||||
VM_NAME = File.basename(File.dirname(File.dirname(__FILE__))) + "_sandstorm_#{Time.now.utc.to_i}"
|
||||
|
||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
# Base on the Sandstorm snapshots of the official Debian 8 (jessie) box.
|
||||
config.vm.box = "sandstorm/debian-jessie64"
|
||||
|
||||
if Vagrant.has_plugin?("vagrant-vbguest") then
|
||||
# vagrant-vbguest is a Vagrant plugin that upgrades
|
||||
# the version of VirtualBox Guest Additions within each
|
||||
# guest. If you have the vagrant-vbguest plugin, then it
|
||||
# needs to know how to compile kernel modules, etc., and so
|
||||
# we give it this hint about operating system type.
|
||||
config.vm.guest = "debian"
|
||||
end
|
||||
|
||||
# We forward port 6080, the Sandstorm web port, so that developers can
|
||||
# visit their sandstorm app from their browser as local.sandstorm.io:6080
|
||||
# (aka 127.0.0.1:6080).
|
||||
config.vm.network :forwarded_port, guest: 6080, host: 6080
|
||||
|
||||
# Use a shell script to "provision" the box. This installs Sandstorm using
|
||||
# the bundled installer.
|
||||
config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/global-setup.sh", keep_color: true
|
||||
# Then, do stack-specific and app-specific setup.
|
||||
config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/setup.sh", keep_color: true
|
||||
|
||||
# Shared folders are configured per-provider since vboxsf can't handle >4096 open files,
|
||||
# NFS requires privilege escalation every time you bring a VM up,
|
||||
# and 9p is only available on libvirt.
|
||||
|
||||
# Calculate the number of CPUs and the amount of RAM the system has,
|
||||
# in a platform-dependent way; further logic below.
|
||||
cpus = nil
|
||||
total_kB_ram = nil
|
||||
|
||||
host = RbConfig::CONFIG['host_os']
|
||||
if host =~ /darwin/
|
||||
cpus = `sysctl -n hw.ncpu`.to_i
|
||||
total_kB_ram = `sysctl -n hw.memsize`.to_i / 1024
|
||||
elsif host =~ /linux/
|
||||
cpus = `nproc`.to_i
|
||||
total_kB_ram = `grep MemTotal /proc/meminfo | awk '{print $2}'`.to_i
|
||||
elsif host =~ /mingw/
|
||||
# powershell may not be available on Windows XP and Vista, so wrap this in a rescue block
|
||||
begin
|
||||
cpus = `powershell -Command "(Get-WmiObject Win32_Processor -Property NumberOfLogicalProcessors | Select-Object -Property NumberOfLogicalProcessors | Measure-Object NumberOfLogicalProcessors -Sum).Sum"`.to_i
|
||||
total_kB_ram = `powershell -Command "Get-CimInstance -class cim_physicalmemory | % $_.Capacity}"`.to_i / 1024
|
||||
rescue
|
||||
end
|
||||
end
|
||||
# Use the same number of CPUs within Vagrant as the system, with 1
|
||||
# as a default.
|
||||
#
|
||||
# Use at least 512MB of RAM, and if the system has more than 2GB of
|
||||
# RAM, use 1/4 of the system RAM. This seems a reasonable compromise
|
||||
# between having the Vagrant guest operating system not run out of
|
||||
# RAM entirely (which it basically would if we went much lower than
|
||||
# 512MB) and also allowing it to use up a healthily large amount of
|
||||
# RAM so it can run faster on systems that can afford it.
|
||||
if cpus.nil? or cpus.zero?
|
||||
cpus = 1
|
||||
end
|
||||
if total_kB_ram.nil? or total_kB_ram < 2048000
|
||||
assign_ram_mb = 512
|
||||
else
|
||||
assign_ram_mb = (total_kB_ram / 1024 / 4)
|
||||
end
|
||||
# Actually apply these CPU/memory values to the providers.
|
||||
config.vm.provider :virtualbox do |vb, override|
|
||||
vb.cpus = cpus
|
||||
vb.memory = assign_ram_mb
|
||||
vb.name = VM_NAME
|
||||
vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
|
||||
|
||||
# /opt/app and /host-dot-sandstorm are used by vagrant-spk
|
||||
override.vm.synced_folder "..", "/opt/app"
|
||||
override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm"
|
||||
# /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the
|
||||
# line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want.
|
||||
override.vm.synced_folder "..", "/vagrant", disabled: true
|
||||
end
|
||||
config.vm.provider :libvirt do |libvirt, override|
|
||||
libvirt.cpus = cpus
|
||||
libvirt.memory = assign_ram_mb
|
||||
libvirt.default_prefix = VM_NAME
|
||||
|
||||
# /opt/app and /host-dot-sandstorm are used by vagrant-spk
|
||||
override.vm.synced_folder "..", "/opt/app", type: "9p", accessmode: "passthrough"
|
||||
override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm", type: "9p", accessmode: "passthrough"
|
||||
# /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the
|
||||
# line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want.
|
||||
override.vm.synced_folder "..", "/vagrant", type: "9p", accessmode: "passthrough", disabled: true
|
||||
end
|
||||
end
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
# This script is run in the VM each time you run `vagrant-spk dev`. This is
|
||||
# the ideal place to invoke anything which is normally part of your app's build
|
||||
# process - transforming the code in your repository into the collection of files
|
||||
# which can actually run the service in production
|
||||
#
|
||||
# Some examples:
|
||||
#
|
||||
# * For a C/C++ application, calling
|
||||
# ./configure && make && make install
|
||||
# * For a Python application, creating a virtualenv and installing
|
||||
# app-specific package dependencies:
|
||||
# virtualenv /opt/app/env
|
||||
# /opt/app/env/bin/pip install -r /opt/app/requirements.txt
|
||||
# * Building static assets from .less or .sass, or bundle and minify JS
|
||||
# * Collecting various build artifacts or assets into a deployment-ready
|
||||
# directory structure
|
||||
|
||||
# By default, this script does nothing. You'll have to modify it as
|
||||
# appropriate for your application.
|
||||
cd /opt/app
|
||||
exit 0
|
|
@ -1,236 +0,0 @@
|
|||
<!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 =
|
||||
{
|
||||
skipStartupTypeset: true,
|
||||
messageStyle: 'none',
|
||||
AuthorInit: function ()
|
||||
{
|
||||
MathJax.Hub.Register.StartupHook('Begin', function()
|
||||
{
|
||||
for (var i = 0; i < mathJaxQueue.length; i++)
|
||||
{
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub, mathJaxQueue[i]]);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Adds global enqueue method for async rendering
|
||||
window.MathJaxRender = function(container)
|
||||
{
|
||||
// Initial rendering when MathJax finished loading
|
||||
if (typeof(MathJax) !== 'undefined' && typeof(MathJax.Hub) !== 'undefined')
|
||||
{
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub, container]);
|
||||
}
|
||||
else
|
||||
{
|
||||
mathJaxQueue.push(container);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
|
||||
<script>
|
||||
var urlParams = (function(url)
|
||||
{
|
||||
var result = new Object();
|
||||
var params = window.location.search.slice(1).split('&');
|
||||
|
||||
for (var i = 0; i < params.length; i++)
|
||||
{
|
||||
idx = params[i].indexOf('=');
|
||||
|
||||
if (idx > 0)
|
||||
{
|
||||
result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
})(window.location.href);
|
||||
|
||||
// Removes unused dependencies
|
||||
urlParams['analytics'] = '0';
|
||||
urlParams['picker'] = '0';
|
||||
urlParams['gapi'] = '0';
|
||||
urlParams['db'] = '0';
|
||||
|
||||
// Public global variables
|
||||
var MAX_REQUEST_SIZE = 10485760;
|
||||
var MAX_AREA = 10000 * 10000;
|
||||
|
||||
// Paths and files
|
||||
var STENCIL_PATH = 'stencils';
|
||||
var SHAPES_PATH = 'shapes';
|
||||
var IMAGE_PATH = 'images';
|
||||
// Path for images inside the diagram
|
||||
var GRAPH_IMAGE_PATH = 'img';
|
||||
var STYLE_PATH = 'styles';
|
||||
var CSS_PATH = 'styles';
|
||||
|
||||
// Directory for i18 files and basename for main i18n file
|
||||
var RESOURCES_PATH = 'resources';
|
||||
var RESOURCE_BASE = RESOURCES_PATH + '/dia';
|
||||
|
||||
// Specifies connection mode for touch devices (at least one should be true)
|
||||
var isLocalStorage = false;
|
||||
var uiTheme = null;
|
||||
|
||||
// Sets the base path, the UI language via URL param and configures the
|
||||
// supported languages to avoid 404s. The loading of all core language
|
||||
// resources is disabled as all required resources are in grapheditor.
|
||||
// properties. Note that in this example the loading of two resource
|
||||
// files (the special bundle and the default bundle) is disabled to
|
||||
// save a GET request. This requires that all resources be present in
|
||||
// the special bundle.
|
||||
var mxLoadResources = false;
|
||||
var mxLanguage = 'en'
|
||||
var geBasePath = 'js';
|
||||
var mxBasePath = 'mxgraph';
|
||||
|
||||
function render(data)
|
||||
{
|
||||
mxConstants.SHADOWCOLOR = '#000000';
|
||||
mxConstants.SHADOW_OPACITY = 0.25;
|
||||
|
||||
var graph = new Graph(document.getElementById('graph'));
|
||||
graph.foldingEnabled = false;
|
||||
graph.setEnabled(false);
|
||||
|
||||
if (data.math)
|
||||
{
|
||||
mxClient.NO_FO = true;
|
||||
}
|
||||
|
||||
var xmlDoc = mxUtils.parseXml(data.xml);
|
||||
var codec = new mxCodec(xmlDoc);
|
||||
codec.decode(xmlDoc.documentElement, graph.getModel());
|
||||
|
||||
// Handles PDF output where the output should match the page format if the page is visible
|
||||
if (data.math && data.format == 'pdf' && xmlDoc.documentElement.getAttribute('page') == '1')
|
||||
{
|
||||
graph.pageVisible = true;
|
||||
|
||||
var pw = xmlDoc.documentElement.getAttribute('pageWidth');
|
||||
var ph = xmlDoc.documentElement.getAttribute('pageHeight');
|
||||
|
||||
if (pw != null && ph != null)
|
||||
{
|
||||
graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
|
||||
}
|
||||
|
||||
var ps = xmlDoc.documentElement.getAttribute('pageScale');
|
||||
|
||||
if (ps != null)
|
||||
{
|
||||
graph.pageScale = ps;
|
||||
}
|
||||
|
||||
graph.getPageSize = function()
|
||||
{
|
||||
return new mxRectangle(0, 0, this.pageFormat.width * this.pageScale,
|
||||
this.pageFormat.height * this.pageScale);
|
||||
};
|
||||
|
||||
graph.getPageLayout = function()
|
||||
{
|
||||
var size = (this.pageVisible) ? this.getPageSize() : this.scrollTileSize;
|
||||
var bounds = this.getGraphBounds();
|
||||
|
||||
if (bounds.width == 0 || bounds.height == 0)
|
||||
{
|
||||
return new mxRectangle(0, 0, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Computes untransformed graph bounds
|
||||
var x = bounds.x / this.view.scale - this.view.translate.x;
|
||||
var y = bounds.y / this.view.scale - this.view.translate.y;
|
||||
var w = bounds.width / this.view.scale;
|
||||
var h = bounds.height / this.view.scale;
|
||||
|
||||
var x0 = Math.floor(x / size.width);
|
||||
var y0 = Math.floor(y / size.height);
|
||||
var w0 = Math.ceil((x + w) / size.width) - x0;
|
||||
var h0 = Math.ceil((y + h) / size.height) - y0;
|
||||
|
||||
return new mxRectangle(x0, y0, w0, h0);
|
||||
}
|
||||
};
|
||||
|
||||
// Fits the number of background pages to the graph
|
||||
graph.view.getBackgroundPageBounds = function()
|
||||
{
|
||||
var layout = this.graph.getPageLayout();
|
||||
var page = this.graph.getPageSize();
|
||||
|
||||
return new mxRectangle(this.scale * (this.translate.x + layout.x * page.width),
|
||||
this.scale * (this.translate.y + layout.y * page.height),
|
||||
this.scale * layout.width * page.width,
|
||||
this.scale * layout.height * page.height);
|
||||
};
|
||||
}
|
||||
else if (data.crop)
|
||||
{
|
||||
var b = graph.getGraphBounds();
|
||||
graph.view.setTranslate(-b.x, -b.y);
|
||||
}
|
||||
else if (data.w != null && data.h != null)
|
||||
{
|
||||
var b = graph.getGraphBounds();
|
||||
var s = Math.floor(Math.min(data.w / b.width, data.h / b.height) * 100) / 100;
|
||||
graph.view.scaleAndTranslate(s, (data.w - b.width * s) / 2 / s - b.x,
|
||||
(data.h - b.height * s) / 2 / s - b.y);
|
||||
}
|
||||
|
||||
if (data.math)
|
||||
{
|
||||
window.MathJaxRender(graph.container);
|
||||
|
||||
// Asynchronous callback when MathJax has finished
|
||||
window.MathJax.Hub.Queue(function ()
|
||||
{
|
||||
if (typeof window.callPhantom === 'function')
|
||||
{
|
||||
window.callPhantom();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var bounds = (graph.pageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds();
|
||||
var bg = xmlDoc.documentElement.getAttribute('background');
|
||||
|
||||
// Apply background color for direct export
|
||||
if (data.format == 'jpg' && bg == 'none')
|
||||
{
|
||||
bg = '#ffffff';
|
||||
}
|
||||
|
||||
if (graph.pageVisible)
|
||||
{
|
||||
document.body.style.width = bounds.width + 'px';
|
||||
document.body.style.height = bounds.height + 'px';
|
||||
}
|
||||
|
||||
document.body.style.backgroundColor = bg || '#ffffff';
|
||||
|
||||
// SVG not needed for math export
|
||||
var svg = (data.math) ? '' : mxUtils.getXml(graph.getSvg());
|
||||
|
||||
return {width: bounds.width, height: bounds.height, bg: bg, svg: svg};
|
||||
};
|
||||
</script>
|
||||
<script src="js/app.min.js"></script>
|
||||
</head>
|
||||
<body style="margin:0px;">
|
||||
<div id="graph"></div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 665 B |
Before Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 958 B |
Before Width: | Height: | Size: 969 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="images/mstile-70x70.png"/>
|
||||
<square150x150logo src="images/mstile-150x150.png"/>
|
||||
<square310x310logo src="images/mstile-310x310.png"/>
|
||||
<wide310x150logo src="images/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 939 B |
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="31.3002" height="29.1126" viewBox="0 0 31.3002 29.1126">
|
||||
<g transform="matrix(0.3,0,0,0.3,-9.8499,-10.9437)" style="fill:#ffffff">
|
||||
<g style="fill:#ffffff">
|
||||
<polygon points="63.524,36.479 32.833,56.518 54.054,73.512 85,54.403" style="fill:#ffffff" />
|
||||
<polygon points="32.833,90.507 63.524,110.546 85,92.62 54.054,73.512" style="fill:#ffffff" />
|
||||
<polygon points="85,92.62 106.476,110.546 137.167,90.507 115.946,73.512" style="fill:#ffffff" />
|
||||
<polygon points="137.167,56.518 106.476,36.479 85,54.403 115.946,73.512" style="fill:#ffffff" />
|
||||
<polygon points="85.063,96.477 63.524,114.35 54.307,108.332 54.307,115.078 85.063,133.521 115.819,115.078 115.819,108.332 106.602,114.35"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 846 B |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="104.334" height="97.042" viewBox="0 0 104.334 97.042">
|
||||
<g transform="translate(-32.833,-36.479)" id="Layer_1">
|
||||
<polygon points="63.524,36.479 32.833,56.518 54.054,73.512 85,54.403" style="fill:#007ee5" />
|
||||
<polygon points="32.833,90.507 63.524,110.546 85,92.62 54.054,73.512" style="fill:#007ee5" />
|
||||
<polygon points="85,92.62 106.476,110.546 137.167,90.507 115.946,73.512" style="fill:#007ee5" />
|
||||
<polygon points="137.167,56.518 106.476,36.479 85,54.403 115.946,73.512" style="fill:#007ee5" />
|
||||
<polygon points="85.063,133.521 115.819,115.078 115.819,108.332 106.602,114.35 85.063,96.477 63.524,114.35 54.307,108.332 54.307,115.078"
|
||||
style="fill:#007ee5" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 66 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 2.1 KiB |
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="21" viewBox="-10.5 10.5 24 21">
|
||||
<rect width="40" height="60" x="-18.5" y="-8.5" style="opacity:0;fill:#ffffff" />
|
||||
<g transform="translate(-8,-19)">
|
||||
<polygon points="21.5,42.5 14.5,29.5 5.5,29.5 13.5,42.5" style="fill:#ffffff" />
|
||||
<polygon points="4.5,29.864 -2.5,43.5 1.5,50.384 8.5,36.5" style="fill:#ffffff" />
|
||||
<polygon points="6.5,43.5 2.5,50.5 17.305,50.5 21.5,43.5" style="fill:#ffffff" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 542 B |
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="509.08mm" height="440.97mm" version="1.1" viewBox="0 0 133156 115341">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil2 {fill:#11A861}
|
||||
.fil0 {fill:#3777E3}
|
||||
.fil1 {fill:#FFCF63}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g>
|
||||
<polygon class="fil0" points="22194,115341 44385,76894 133156,76894 110963,115341 "/>
|
||||
<polygon class="fil1" points="88772,76894 133156,76894 88772,0 44385,0 "/>
|
||||
<polygon class="fil2" points="0,76894 22194,115341 66578,38447 44385,0 "/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 56 B |
Before Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 320 B |