Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying image sizes #233

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Support specifying image sizes #233

merged 2 commits into from
Feb 21, 2024

Conversation

mdaines
Copy link
Owner

@mdaines mdaines commented Feb 14, 2024

This adds support for an images option, similar to the previous version. See #191.

Sizes of images referenced by the image attribute can be specified using an "images" render option:

viz.render("graph { a[image=\"test.png\"] }", {
  images: [
    { name: "test.png", width: 300, height: 200 }
  ]
});

The property "name" is used instead of "path" to match the Graphviz documentation.

@mdaines mdaines mentioned this pull request Feb 14, 2024
@mdaines mdaines force-pushed the viz-images-option branch 2 times, most recently from 8d5c9d3 to f12dd13 Compare February 21, 2024 13:42
This adds support for an images option, similar to the previous version.

Sizes of images referenced by the image attribute can be specified using an "images" render option:

  viz.render("graph { a[image=\"test.png\"] }", {
    images: [
      { name: "test.png", width: 300, height: 200 }
    ]
  });
@mdaines mdaines merged commit eebfaf8 into v3 Feb 21, 2024
5 checks passed
@mdaines mdaines deleted the viz-images-option branch February 21, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant