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

Viewbox argument not applied for embed mode #4763

Open
fhg-isi opened this issue Nov 21, 2024 · 0 comments
Open

Viewbox argument not applied for embed mode #4763

fhg-isi opened this issue Nov 21, 2024 · 0 comments

Comments

@fhg-isi
Copy link

fhg-isi commented Nov 21, 2024

Preflight Checklist

  • [x ] I agree to follow the Code of Conduct that this project adheres to.
  • [x ] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug
I would like to appliy the viewbox url parameter to embed.diagrams.net to show the full diagram.

To Reproduce
Steps to reproduce the behavior:
Use the example html code posted here:
https://stackoverflow.com/questions/79210639/how-to-set-viewbox-for-embed-diagrams-net-draw-io

Expected behavior

  • The pan and zoom should be adapted to the specified view box.
    viewbox={"x":0,"y":0,"width":1000,"height":1000}
  • The pan and zoom should be kept, even when running layout actions.
  • Or there should be an action to update pan and zoom after running layout actions, e. g.
const iframe = document.getElementById('embedDiagram');
const config = {
    action: 'configure',
    config: {
        viewbox: { x: 0, y: 0, width: 1000, height: 1000 },
        pan: true,
        zoom: true
    }
};
iframe.contentWindow.postMessage(JSON.stringify(config), '*');
  • If the viewbox url argument is not supported by embed.diagrams.net, this should be clarified in the documentation.

Screenshots
If applicable, add screenshots to help explain your problem.

image

draw.io version (In the Help->About menu of the draw.io editor):

24.8.6

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Browser Version 131.0.6778.70 (Official Build) (64-bit)

Smartphone (please complete the following information):

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
no

Additional context
Add any other context about the problem here.

@fhg-isi fhg-isi changed the title Viewbox argument not appolied for embed mode Viewbox argument not applied for embed mode Nov 21, 2024
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

No branches or pull requests

1 participant