Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Canvas resizing (Read 1830 times)
RJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: Sep 4th, 2015
Canvas resizing
Sep 25th, 2015 at 2:56pm
Print Post  
How to make the diagram canvas the same size as the surrounding div. I have the following code
Code (HTML)
Select All
<div dojoType="dijit/layout/ContentPane" region="center" style="overflow:none; margin:0; padding:0; width=100% height: 100%">
            <canvas id="diagram">
              This page requires a browser that supports HTML 5 Canvas element.
            </canvas> 




The diagram canvas always occupies only 80% of the content pane. How to resize the diagram canvas?

Thanks,
Raji
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Canvas resizing
Reply #1 - Sep 25th, 2015 at 3:46pm
Print Post  
Set larger diagram.Bounds value to cover larger area, the default is A4 size. If you need to make the diagram exactly as large as the div so no scrolling is required, you could call clientToDoc method to find matching size in logical coordinates. The code here show this for filling the window size, you could replace the x/yPixels values with your div's size instead:
http://mindfusion.eu/Forum/YaBB.pl?num=1376539327/1#1
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint