|
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
- <!-- Generated by graphviz version 7.0.4 (20221203.1631)
- -->
- <!-- Title: egg Pages: 1 -->
- <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <script type="text/ecmascript"><![CDATA[/**
- * SVGPan library 1.2.2
- * ======================
- *
- * Given an unique existing element with id "viewport" (or when missing, the
- * first g-element), including the the library into any SVG adds the following
- * capabilities:
- *
- * - Mouse panning
- * - Mouse zooming (using the wheel)
- * - Object dragging
- *
- * You can configure the behaviour of the pan/zoom/drag with the variables
- * listed in the CONFIGURATION section of this file.
- *
- * This code is licensed under the following BSD license:
- *
- * Copyright 2009-2019 Andrea Leofreddi <a.leofreddi@vleo.net>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of Andrea Leofreddi.
- */
-
- "use strict";
-
- /// CONFIGURATION
- /// ====>
-
- var enablePan = 1; // 1 or 0: enable or disable panning (default enabled)
- var enableZoom = 1; // 1 or 0: enable or disable zooming (default enabled)
- var enableDrag = 0; // 1 or 0: enable or disable dragging (default disabled)
- var zoomScale = 0.2; // Zoom sensitivity
-
- /// <====
- /// END OF CONFIGURATION
-
- var root = document.documentElement;
- var state = 'none', svgRoot = null, stateTarget, stateOrigin, stateTf;
-
- setupHandlers(root);
-
- /**
- * Register handlers
- */
- function setupHandlers(root){
- setAttributes(root, {
- "onmouseup" : "handleMouseUp(evt)",
- "onmousedown" : "handleMouseDown(evt)",
- "onmousemove" : "handleMouseMove(evt)",
- //"onmouseout" : "handleMouseUp(evt)", // Decomment this to stop the pan functionality when dragging out of the SVG element
- });
-
- if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0)
- window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari
- else
- window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
- }
-
- /**
- * Retrieves the root element for SVG manipulation. The element is then cached into the svgRoot global variable.
- */
- function getRoot(root) {
- if(svgRoot == null) {
- var r = root.getElementById("viewport") ? root.getElementById("viewport") : root.documentElement, t = r;
-
- while(t != root) {
- if(t.getAttribute("viewBox")) {
- setCTM(r, t.getCTM());
-
- t.removeAttribute("viewBox");
- }
-
- t = t.parentNode;
- }
-
- svgRoot = r;
- }
-
- return svgRoot;
- }
-
- /**
- * Instance an SVGPoint object with given event coordinates.
- */
- function getEventPoint(evt) {
- var p = root.createSVGPoint();
-
- p.x = evt.clientX;
- p.y = evt.clientY;
-
- return p;
- }
-
- /**
- * Sets the current transform matrix of an element.
- */
- function setCTM(element, matrix) {
- var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")";
-
- element.setAttribute("transform", s);
- }
-
- /**
- * Dumps a matrix to a string (useful for debug).
- */
- function dumpMatrix(matrix) {
- var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]";
-
- return s;
- }
-
- /**
- * Sets attributes of an element.
- */
- function setAttributes(element, attributes){
- for (var i in attributes)
- element.setAttributeNS(null, i, attributes[i]);
- }
-
- /**
- * Handle mouse wheel event.
- */
- function handleMouseWheel(evt) {
- if(!enableZoom)
- return;
-
- if(evt.preventDefault)
- evt.preventDefault();
-
- evt.returnValue = false;
-
- var svgDoc = evt.target.ownerDocument;
-
- var delta;
-
- if(evt.wheelDelta)
- delta = evt.wheelDelta / 360; // Chrome/Safari
- else
- delta = evt.detail / -9; // Mozilla
-
- var z = Math.pow(1 + zoomScale, delta);
-
- var g = getRoot(svgDoc);
-
- var p = getEventPoint(evt);
-
- p = p.matrixTransform(g.getCTM().inverse());
-
- // Compute new scale matrix in current mouse position
- var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y);
-
- setCTM(g, g.getCTM().multiply(k));
-
- if(typeof(stateTf) == "undefined")
- stateTf = g.getCTM().inverse();
-
- stateTf = stateTf.multiply(k.inverse());
- }
-
- /**
- * Handle mouse move event.
- */
- function handleMouseMove(evt) {
- if(evt.preventDefault)
- evt.preventDefault();
-
- evt.returnValue = false;
-
- var svgDoc = evt.target.ownerDocument;
-
- var g = getRoot(svgDoc);
-
- if(state == 'pan' && enablePan) {
- // Pan mode
- var p = getEventPoint(evt).matrixTransform(stateTf);
-
- setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y));
- } else if(state == 'drag' && enableDrag) {
- // Drag mode
- var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse());
-
- setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM()));
-
- stateOrigin = p;
- }
- }
-
- /**
- * Handle click event.
- */
- function handleMouseDown(evt) {
- if(evt.preventDefault)
- evt.preventDefault();
-
- evt.returnValue = false;
-
- var svgDoc = evt.target.ownerDocument;
-
- var g = getRoot(svgDoc);
-
- if(
- evt.target.tagName == "svg"
- || !enableDrag // Pan anyway when drag is disabled and the user clicked on an element
- ) {
- // Pan mode
- state = 'pan';
-
- stateTf = g.getCTM().inverse();
-
- stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
- } else {
- // Drag mode
- state = 'drag';
-
- stateTarget = evt.target;
-
- stateTf = g.getCTM().inverse();
-
- stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
- }
- }
-
- /**
- * Handle mouse button release event.
- */
- function handleMouseUp(evt) {
- if(evt.preventDefault)
- evt.preventDefault();
-
- evt.returnValue = false;
-
- var svgDoc = evt.target.ownerDocument;
-
- if(state == 'pan' || state == 'drag') {
- // Quit pan mode
- state = '';
- }
- }
- ]]></script><g id="viewport" transform="scale(0.5,0.5) translate(0,0)"><g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 171)">
- <title>egg</title>
- <polygon fill="white" stroke="none" points="-4,4 -4,-171 370,-171 370,4 -4,4"/>
- <g id="clust1" class="cluster">
- <title>cluster_L</title>
- <polygon fill="none" stroke="black" points="8,-8 8,-159 358,-159 358,-8 8,-8"/>
- </g>
- <!-- File: egg -->
- <g id="node1" class="node">
- <title>File: egg</title>
- <g id="a_node1"><a xlink:title="egg">
- <polygon fill="#f8f8f8" stroke="black" points="350,-151 16,-151 16,-16 350,-16 350,-151"/>
- <text text-anchor="start" x="24" y="-134.2" font-family="Times New Roman,serif" font-size="16.00">File: egg</text>
- <text text-anchor="start" x="24" y="-116.2" font-family="Times New Roman,serif" font-size="16.00">Type: cpu</text>
- <text text-anchor="start" x="24" y="-98.2" font-family="Times New Roman,serif" font-size="16.00">Time: Dec 17, 2024 at 12:10pm (CST)</text>
- <text text-anchor="start" x="24" y="-80.2" font-family="Times New Roman,serif" font-size="16.00">Duration: 30s, Total samples = 0 </text>
- <text text-anchor="start" x="24" y="-62.2" font-family="Times New Roman,serif" font-size="16.00">Showing nodes accounting for 0, 0% of 0 total</text>
- <text text-anchor="start" x="24" y="-25.2" font-family="Times New Roman,serif" font-size="16.00">See https://git.io/JfYMW for how to read the graph</text>
- </a>
- </g>
- </g>
- </g>
- </g></svg>
|