diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-08-23 03:36:25 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-08-23 03:36:25 +0200 |
commit | 0e54d399424374d497d08a8631c4761dece57ceb (patch) | |
tree | bd0873080b4bc3b81984852def5e435e51292d0d /.yarn/patches | |
parent | fix: predicate value translation (diff) | |
download | refinery-0e54d399424374d497d08a8631c4761dece57ceb.tar.gz refinery-0e54d399424374d497d08a8631c4761dece57ceb.tar.zst refinery-0e54d399424374d497d08a8631c4761dece57ceb.zip |
feat: dot visualization
Diffstat (limited to '.yarn/patches')
-rw-r--r-- | .yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch new file mode 100644 index 00000000..161db0d7 --- /dev/null +++ b/.yarn/patches/d3-graphviz-npm-5.1.0-ba6bed3fec.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | diff --git a/src/dot.js b/src/dot.js | ||
2 | index 96ae02b6edd947ac9086f3108986c08d91470cba..c4422b08d73f7fe73dc52ad905cf981d1f3cbcc5 100644 | ||
3 | --- a/src/dot.js | ||
4 | +++ b/src/dot.js | ||
5 | @@ -1,4 +1,3 @@ | ||
6 | -import { Graphviz } from "@hpcc-js/wasm/graphviz"; | ||
7 | import * as d3 from "d3-selection"; | ||
8 | import {extractAllElementsData, extractElementData, createElementWithAttributes} from "./element.js"; | ||
9 | import {convertToPathData} from "./svg.js"; | ||
10 | @@ -8,31 +7,6 @@ import {getEdgeTitle} from "./data.js"; | ||
11 | |||
12 | |||
13 | export function initViz() { | ||
14 | - | ||
15 | - // force JIT compilation of @hpcc-js/wasm | ||
16 | - try { | ||
17 | - Graphviz.load().then(graphviz => { | ||
18 | - graphviz.layout("", "svg", "dot"); | ||
19 | - this.layoutSync = graphviz.layout.bind(graphviz); | ||
20 | - if (this._worker == null) { | ||
21 | - this._dispatch.call("initEnd", this); | ||
22 | - } | ||
23 | - if (this._afterInit) { | ||
24 | - this._afterInit(); | ||
25 | - } | ||
26 | - }); | ||
27 | -// after the port to ESM modules, we don't know how to trigger this so | ||
28 | -// we just disable it from coverage | ||
29 | -/* c8 ignore start */ | ||
30 | - } catch(error) { | ||
31 | - // we end up here when the the script tag type used to load | ||
32 | - // the "@hpcc-js/wasm" script is not "application/javascript" | ||
33 | - // or "text/javascript", but typically "javascript/worker". In | ||
34 | - // this case the browser does not load the script since it's | ||
35 | - // unnecessary because it's loaded by the web worker | ||
36 | - // instead. This is expected so we just ignore the error. | ||
37 | - } | ||
38 | -/* c8 ignore stop */ | ||
39 | if (this._worker != null) { | ||
40 | var vizURL = this._vizURL; | ||
41 | var graphvizInstance = this; | ||
42 | @@ -337,7 +311,8 @@ function layoutDone(svgDoc, callback) { | ||
43 | |||
44 | var newSvg = newDoc | ||
45 | .select('svg'); | ||
46 | - | ||
47 | + | ||
48 | + this._dispatch.call('postProcessSVG', this, newSvg); | ||
49 | var data = extractAllElementsData(newSvg); | ||
50 | this._dispatch.call('dataExtractEnd', this); | ||
51 | postProcessDataPass1Local(data); | ||
52 | diff --git a/src/graphviz.js b/src/graphviz.js | ||
53 | index c4638cb0e4042844c59c52dfe4749e13999fef6e..28dcfb71ad787c78645c460a29e9c52295c5f6bf 100644 | ||
54 | --- a/src/graphviz.js | ||
55 | +++ b/src/graphviz.js | ||
56 | @@ -49,7 +49,6 @@ import {drawnNodeSelection} from "./drawNode.js"; | ||
57 | import {workerCode} from "./workerCode.js"; | ||
58 | import {sharedWorkerCode} from "./workerCode.js"; | ||
59 | import {workerCodeBody} from "./workerCode.js"; | ||
60 | -import {Graphviz as hpccWasmGraphviz} from "@hpcc-js/wasm/graphviz"; | ||
61 | |||
62 | export function Graphviz(selection, options) { | ||
63 | this._options = { | ||
64 | @@ -119,10 +118,6 @@ export function Graphviz(selection, options) { | ||
65 | this._workerPort = this._worker; | ||
66 | this._workerPortClose = this._worker.terminate.bind(this._worker); | ||
67 | this._workerCallbacks = []; | ||
68 | - } else { | ||
69 | - hpccWasmGraphviz.load().then(((graphviz) => { | ||
70 | - this._graphvizVersion = graphviz.version(); | ||
71 | - }).bind(this)); | ||
72 | } | ||
73 | this._selection = selection; | ||
74 | this._active = false; | ||
75 | @@ -143,6 +138,7 @@ export function Graphviz(selection, options) { | ||
76 | 'start', | ||
77 | 'layoutStart', | ||
78 | 'layoutEnd', | ||
79 | + 'postProcessSVG', | ||
80 | 'dataExtractEnd', | ||
81 | 'dataProcessPass1End', | ||
82 | 'dataProcessPass2End', | ||