蛋蛋星球-客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

profile002.svg 8.8 KiB

6 dagen geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  3. "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  4. <!-- Generated by graphviz version 7.0.4 (20221203.1631)
  5. -->
  6. <!-- Title: egg Pages: 1 -->
  7. <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  8. <script type="text/ecmascript"><![CDATA[/**
  9. * SVGPan library 1.2.2
  10. * ======================
  11. *
  12. * Given an unique existing element with id "viewport" (or when missing, the
  13. * first g-element), including the the library into any SVG adds the following
  14. * capabilities:
  15. *
  16. * - Mouse panning
  17. * - Mouse zooming (using the wheel)
  18. * - Object dragging
  19. *
  20. * You can configure the behaviour of the pan/zoom/drag with the variables
  21. * listed in the CONFIGURATION section of this file.
  22. *
  23. * This code is licensed under the following BSD license:
  24. *
  25. * Copyright 2009-2019 Andrea Leofreddi <a.leofreddi@vleo.net>. All rights reserved.
  26. *
  27. * Redistribution and use in source and binary forms, with or without modification, are
  28. * permitted provided that the following conditions are met:
  29. *
  30. * 1. Redistributions of source code must retain the above copyright
  31. * notice, this list of conditions and the following disclaimer.
  32. * 2. Redistributions in binary form must reproduce the above copyright
  33. * notice, this list of conditions and the following disclaimer in the
  34. * documentation and/or other materials provided with the distribution.
  35. * 3. Neither the name of the copyright holder nor the names of its
  36. * contributors may be used to endorse or promote products derived from
  37. * this software without specific prior written permission.
  38. *
  39. * THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
  40. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  41. * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR
  42. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  43. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  44. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  45. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  46. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  47. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  48. *
  49. * The views and conclusions contained in the software and documentation are those of the
  50. * authors and should not be interpreted as representing official policies, either expressed
  51. * or implied, of Andrea Leofreddi.
  52. */
  53. "use strict";
  54. /// CONFIGURATION
  55. /// ====>
  56. var enablePan = 1; // 1 or 0: enable or disable panning (default enabled)
  57. var enableZoom = 1; // 1 or 0: enable or disable zooming (default enabled)
  58. var enableDrag = 0; // 1 or 0: enable or disable dragging (default disabled)
  59. var zoomScale = 0.2; // Zoom sensitivity
  60. /// <====
  61. /// END OF CONFIGURATION
  62. var root = document.documentElement;
  63. var state = 'none', svgRoot = null, stateTarget, stateOrigin, stateTf;
  64. setupHandlers(root);
  65. /**
  66. * Register handlers
  67. */
  68. function setupHandlers(root){
  69. setAttributes(root, {
  70. "onmouseup" : "handleMouseUp(evt)",
  71. "onmousedown" : "handleMouseDown(evt)",
  72. "onmousemove" : "handleMouseMove(evt)",
  73. //"onmouseout" : "handleMouseUp(evt)", // Decomment this to stop the pan functionality when dragging out of the SVG element
  74. });
  75. if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0)
  76. window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari
  77. else
  78. window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
  79. }
  80. /**
  81. * Retrieves the root element for SVG manipulation. The element is then cached into the svgRoot global variable.
  82. */
  83. function getRoot(root) {
  84. if(svgRoot == null) {
  85. var r = root.getElementById("viewport") ? root.getElementById("viewport") : root.documentElement, t = r;
  86. while(t != root) {
  87. if(t.getAttribute("viewBox")) {
  88. setCTM(r, t.getCTM());
  89. t.removeAttribute("viewBox");
  90. }
  91. t = t.parentNode;
  92. }
  93. svgRoot = r;
  94. }
  95. return svgRoot;
  96. }
  97. /**
  98. * Instance an SVGPoint object with given event coordinates.
  99. */
  100. function getEventPoint(evt) {
  101. var p = root.createSVGPoint();
  102. p.x = evt.clientX;
  103. p.y = evt.clientY;
  104. return p;
  105. }
  106. /**
  107. * Sets the current transform matrix of an element.
  108. */
  109. function setCTM(element, matrix) {
  110. var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")";
  111. element.setAttribute("transform", s);
  112. }
  113. /**
  114. * Dumps a matrix to a string (useful for debug).
  115. */
  116. function dumpMatrix(matrix) {
  117. var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]";
  118. return s;
  119. }
  120. /**
  121. * Sets attributes of an element.
  122. */
  123. function setAttributes(element, attributes){
  124. for (var i in attributes)
  125. element.setAttributeNS(null, i, attributes[i]);
  126. }
  127. /**
  128. * Handle mouse wheel event.
  129. */
  130. function handleMouseWheel(evt) {
  131. if(!enableZoom)
  132. return;
  133. if(evt.preventDefault)
  134. evt.preventDefault();
  135. evt.returnValue = false;
  136. var svgDoc = evt.target.ownerDocument;
  137. var delta;
  138. if(evt.wheelDelta)
  139. delta = evt.wheelDelta / 360; // Chrome/Safari
  140. else
  141. delta = evt.detail / -9; // Mozilla
  142. var z = Math.pow(1 + zoomScale, delta);
  143. var g = getRoot(svgDoc);
  144. var p = getEventPoint(evt);
  145. p = p.matrixTransform(g.getCTM().inverse());
  146. // Compute new scale matrix in current mouse position
  147. var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y);
  148. setCTM(g, g.getCTM().multiply(k));
  149. if(typeof(stateTf) == "undefined")
  150. stateTf = g.getCTM().inverse();
  151. stateTf = stateTf.multiply(k.inverse());
  152. }
  153. /**
  154. * Handle mouse move event.
  155. */
  156. function handleMouseMove(evt) {
  157. if(evt.preventDefault)
  158. evt.preventDefault();
  159. evt.returnValue = false;
  160. var svgDoc = evt.target.ownerDocument;
  161. var g = getRoot(svgDoc);
  162. if(state == 'pan' && enablePan) {
  163. // Pan mode
  164. var p = getEventPoint(evt).matrixTransform(stateTf);
  165. setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y));
  166. } else if(state == 'drag' && enableDrag) {
  167. // Drag mode
  168. var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse());
  169. setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM()));
  170. stateOrigin = p;
  171. }
  172. }
  173. /**
  174. * Handle click event.
  175. */
  176. function handleMouseDown(evt) {
  177. if(evt.preventDefault)
  178. evt.preventDefault();
  179. evt.returnValue = false;
  180. var svgDoc = evt.target.ownerDocument;
  181. var g = getRoot(svgDoc);
  182. if(
  183. evt.target.tagName == "svg"
  184. || !enableDrag // Pan anyway when drag is disabled and the user clicked on an element
  185. ) {
  186. // Pan mode
  187. state = 'pan';
  188. stateTf = g.getCTM().inverse();
  189. stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
  190. } else {
  191. // Drag mode
  192. state = 'drag';
  193. stateTarget = evt.target;
  194. stateTf = g.getCTM().inverse();
  195. stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
  196. }
  197. }
  198. /**
  199. * Handle mouse button release event.
  200. */
  201. function handleMouseUp(evt) {
  202. if(evt.preventDefault)
  203. evt.preventDefault();
  204. evt.returnValue = false;
  205. var svgDoc = evt.target.ownerDocument;
  206. if(state == 'pan' || state == 'drag') {
  207. // Quit pan mode
  208. state = '';
  209. }
  210. }
  211. ]]></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)">
  212. <title>egg</title>
  213. <polygon fill="white" stroke="none" points="-4,4 -4,-171 370,-171 370,4 -4,4"/>
  214. <g id="clust1" class="cluster">
  215. <title>cluster_L</title>
  216. <polygon fill="none" stroke="black" points="8,-8 8,-159 358,-159 358,-8 8,-8"/>
  217. </g>
  218. <!-- File: egg -->
  219. <g id="node1" class="node">
  220. <title>File: egg</title>
  221. <g id="a_node1"><a xlink:title="egg">
  222. <polygon fill="#f8f8f8" stroke="black" points="350,-151 16,-151 16,-16 350,-16 350,-151"/>
  223. <text text-anchor="start" x="24" y="-134.2" font-family="Times New Roman,serif" font-size="16.00">File: egg</text>
  224. <text text-anchor="start" x="24" y="-116.2" font-family="Times New Roman,serif" font-size="16.00">Type: cpu</text>
  225. <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>
  226. <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>
  227. <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>
  228. <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>
  229. </a>
  230. </g>
  231. </g>
  232. </g>
  233. </g></svg>