-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjoint.format.gexf.min.js
More file actions
14 lines (8 loc) · 1.08 KB
/
joint.format.gexf.min.js
File metadata and controls
14 lines (8 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*! Rappid v3.1.1 - HTML5 Diagramming Framework - TRIAL VERSION
Copyright (c) 2015 client IO
2020-06-11
This Source Code Form is subject to the terms of the Rappid Trial License
, v. 2.0. If a copy of the Rappid License was not distributed with this
file, You can obtain one at http://jointjs.com/license/rappid_v2.txt
or from the Rappid archive as was distributed by client IO. See the LICENSE file.*/
this.joint=this.joint||{},function(t){"use strict";t.toCellsArray=function(t,o,r){var e=(new DOMParser).parseFromString(t,"text/xml");if("parsererror"==e.documentElement.nodeName)throw new Error("Error while parsing GEXF file.");var i=Array.from(e.documentElement.querySelectorAll("node")),n=Array.from(e.documentElement.querySelectorAll("edge")),a=[];return i.forEach(function(t){var e=parseFloat(t.querySelector("size").getAttribute("value")),r=o({id:t.getAttribute("id"),width:e,height:e,label:t.getAttribute("label")});a.push(r)}),n.forEach(function(t){var e=r({source:t.getAttribute("source"),target:t.getAttribute("target")});a.unshift(e)}),a}}(this.joint.format=this.joint.format||{});