Scroll diagram on right-click and drag

Hi.
Is there option to allow user to moving on diagram by right-click on empty space and drag around?
I dont see any in scrollSettings...
I found DiagraTools.ZoomPan setting but with this option on I cannot select mutiple diagram elements.
Is there way to enable ZoomPan on right click mouse button?

1 Reply

AR Aravind Ravi Syncfusion Team May 11, 2020 01:03 PM UTC

Hi Robiar, 
 
We have created a sample to enable zoompan tool in diagram on right click. When you right click on the diagram “click” event gets triggered. In that event you can change the diagram tool as ZoomPan. Please find the below code snippet for how to change diagram tools as zoom pan. 
 
//app.component.html 
 
<ejs-diagram #diagram id="diagram" width="100%" height="700px" (click)="clicked($event)"> 
 
//app.component.ts 
 
public clicked(args: IClickEventArgs) { 
    if (this.count === 1) { 
      this.diagram.tool = DiagramTools.ZoomPan; 
      this.diagram.dataBind(); 
      this.count++; 
    } 
  } 
 
For more information about diagram tool please refer to below UG documentation link 
 
 
 
Regards 
Aravind Ravi 
 


Loader.
Up arrow icon