diff options
author | 2023-11-19 14:58:55 +0100 | |
---|---|---|
committer | 2023-11-19 14:58:55 +0100 | |
commit | df0f7cbf05558ce8691759256caa64ab01dd5d9c (patch) | |
tree | 0a842960e27ad25d458c18f7bd9f8b4bf5b89b6c /.yarn/patches/d3-graphviz-npm-5.2.0-161b1fbad4.patch | |
parent | build: prepare for Maven publication (diff) | |
parent | feat(langauge): validate exists and equals (diff) | |
download | refinery-df0f7cbf05558ce8691759256caa64ab01dd5d9c.tar.gz refinery-df0f7cbf05558ce8691759256caa64ab01dd5d9c.tar.zst refinery-df0f7cbf05558ce8691759256caa64ab01dd5d9c.zip |
Merge pull request #48 from kris7t/validator
Improve content assist and validator
Diffstat (limited to '.yarn/patches/d3-graphviz-npm-5.2.0-161b1fbad4.patch')
-rw-r--r-- | .yarn/patches/d3-graphviz-npm-5.2.0-161b1fbad4.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/.yarn/patches/d3-graphviz-npm-5.2.0-161b1fbad4.patch b/.yarn/patches/d3-graphviz-npm-5.2.0-161b1fbad4.patch new file mode 100644 index 00000000..0a4110c5 --- /dev/null +++ b/.yarn/patches/d3-graphviz-npm-5.2.0-161b1fbad4.patch | |||
@@ -0,0 +1,95 @@ | |||
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/element.js b/src/element.js | ||
53 | index 5aa398a6cf2550e15f642aea4eaa5a1c69af69ad..5d799e38566e8f847aa1ba80f4c575911e9851cf 100644 | ||
54 | --- a/src/element.js | ||
55 | +++ b/src/element.js | ||
56 | @@ -108,6 +108,8 @@ export function createElement(data) { | ||
57 | return document.createTextNode(""); | ||
58 | } else if (data.tag == '#comment') { | ||
59 | return document.createComment(data.comment); | ||
60 | + } else if (data.tag == 'div' || data.tag == 'DIV') { | ||
61 | + return document.createElement('div'); | ||
62 | } else { | ||
63 | return document.createElementNS('http://www.w3.org/2000/svg', data.tag); | ||
64 | } | ||
65 | diff --git a/src/graphviz.js b/src/graphviz.js | ||
66 | index c4638cb0e4042844c59c52dfe4749e13999fef6e..28dcfb71ad787c78645c460a29e9c52295c5f6bf 100644 | ||
67 | --- a/src/graphviz.js | ||
68 | +++ b/src/graphviz.js | ||
69 | @@ -49,7 +49,6 @@ import {drawnNodeSelection} from "./drawNode.js"; | ||
70 | import {workerCode} from "./workerCode.js"; | ||
71 | import {sharedWorkerCode} from "./workerCode.js"; | ||
72 | import {workerCodeBody} from "./workerCode.js"; | ||
73 | -import {Graphviz as hpccWasmGraphviz} from "@hpcc-js/wasm/graphviz"; | ||
74 | |||
75 | export function Graphviz(selection, options) { | ||
76 | this._options = { | ||
77 | @@ -119,10 +118,6 @@ export function Graphviz(selection, options) { | ||
78 | this._workerPort = this._worker; | ||
79 | this._workerPortClose = this._worker.terminate.bind(this._worker); | ||
80 | this._workerCallbacks = []; | ||
81 | - } else { | ||
82 | - hpccWasmGraphviz.load().then(((graphviz) => { | ||
83 | - this._graphvizVersion = graphviz.version(); | ||
84 | - }).bind(this)); | ||
85 | } | ||
86 | this._selection = selection; | ||
87 | this._active = false; | ||
88 | @@ -143,6 +138,7 @@ export function Graphviz(selection, options) { | ||
89 | 'start', | ||
90 | 'layoutStart', | ||
91 | 'layoutEnd', | ||
92 | + 'postProcessSVG', | ||
93 | 'dataExtractEnd', | ||
94 | 'dataProcessPass1End', | ||
95 | 'dataProcessPass2End', | ||