Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram exceeds parent div's bounds (Read 1715 times)
Megan1717
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 39
Joined: Jun 20th, 2016
Diagram exceeds parent div's bounds
Jan 16th, 2020 at 4:20pm
Print Post  
Hello,

We are having trouble getting the diagram to display or react responsively. The code samples all seem to show fixed width and height for the DiagramView, e.g.:

Code
Select All
@Html.DiagramView((DiagramView)ViewBag.DiagramView, new { style = "width:1000px; height:600px;" }) 



However, what we want to do is place the diagram within a Bootstrap panel or modal, so it should be responsive as the browser/screen size changes.

Code (HTML)
Select All
<div class="panel panel-default">
  <div class="panel-body">
    Render diagram here
  </div>
</div> 



I have looked through the answers to similar questions, but all of those seem to be displaying the diagram within a window, which has specific X and Y bounds. Our diagram is only one feature of a page, and setting a specific pixel height and width does not make it responsive. Rather, it exceeds the bounds of its containing div (the panel body div).

We would greatly appreciate any suggestions on how to render the diagram so it is responsive. Thank you!

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Diagram exceeds parent div's bounds
Reply #1 - Jan 17th, 2020 at 10:16am
Print Post  
Hi,

The diagram's scroll range is as large as diagram.Bounds value. If you mean you want to always see whole diagram without having to scroll, you could change its scale from window's or div's resized handler -

Code
Select All
diagram.resizeToFitItems(0);
diagram.zoomToFit(); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint