Skip to content

Commit

Permalink
Revert "updated viz.js from 1.8.2 to 3.11.0 (#525)" (#527)
Browse files Browse the repository at this point in the history
This reverts commit e03fd30.
  • Loading branch information
rich-iannone authored Jan 18, 2025
1 parent f875038 commit eaf57eb
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 10 deletions.
6 changes: 3 additions & 3 deletions inst/htmlwidgets/grViz.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HTMLWidgets.widget({
};
},

renderValue: async function(el, x, instance) {
renderValue: function(el, x, instance) {
// Use this to sort of make our diagram responsive
// or at a minimum fit within the bounds set by htmlwidgets
// for the parent container
Expand All @@ -34,8 +34,8 @@ HTMLWidgets.widget({
}

try {
const viz = await Viz.instance();
el.innerHTML = await viz.renderString(x.diagram, {format: "svg", engine: x.config.engine, ...x.config.options});

el.innerHTML = Viz(x.diagram, format="svg", engine=x.config.engine, options=x.config.options);

makeResponsive(el);

Expand Down
2 changes: 1 addition & 1 deletion inst/htmlwidgets/grViz.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: viz
version: 3.11.0
version: 1.8.2
src: htmlwidgets/lib/viz
script: viz.js
- name: DiagrammeR-styles
Expand Down
209 changes: 203 additions & 6 deletions inst/htmlwidgets/lib/viz/viz.js

Large diffs are not rendered by default.

0 comments on commit eaf57eb

Please sign in to comment.