DiagramNode zoom and pan

hi all,

          am trying to add zoom and pan function in my DiagramNode. i don't know how to done.
any one can help me.

thanks,
ganesh 

1 Reply

SG Shyam G Syncfusion Team July 17, 2018 05:54 AM UTC

Hi Ganesh, 
 
Please set tool as ZoomPan in created event to achieve your requirement. please refer to the code example below. 
 
Code example: 
 
Diagram.cshtml 
 
<ejs-diagram id="diagram" width="100%" height="550px" created="diagramCreated"> 
 </ejs-diagram> 
 
<script type="text/javascript"> 
 
        function diagramCreated() { 
            var diagram = document.getElementById("diagram").ej2_instances[0]; 
            //set zoompan for diagram 
            diagram.tool = ej.diagrams.DiagramTools.ZoomPan; 
            diagram.dataBind(); 
        } 
</script> 
 
Here is the online sample link in which we have set ZoomPan for our diagram 
 
 
Please let us know if any concerns. 
 
Regards, 
Shyam G 


Loader.
Up arrow icon