How to enable "Zoom to Fit" as a one time action, as opposed to having it constantly on?

Hi,

I am having an issue with the gantt control.
When I click zoom to fit in the tool bar, it displays fine. The issue is when I make a change to the data on the gannt, the zoom to fit is reapplied.
Is it possible to stop it from continuously reszing to "Zoom to fit"? Ideally it would only happen one time when the user clicks the zoom to fit button.
I have attached a zip file containing a video displaying the issue I am describing. As you can see the chart zoom "jumps" when I update the task bar.
I want to avoid this if possible, ideally zoom to fit would be a once off action triggered by the user.

Any help on this would be greatly appreciated

Attachment: Gantt___Project_Central__Google_Chrome_20200508_151249_6d31abb8.zip

2 Replies

SA sosyal adres May 15, 2020 04:58 PM UTC



LG Logeswari Gopalakrishnan Syncfusion Team May 18, 2020 12:49 PM UTC

Hi Shane 
  
 We can resolved the reported problem by using fitToProject method after edit action completes using taskbarEdited and actionComplete event.  
   
taskbarEdited: function(args){  
              if (args) {  
                var obj = document.getElementById("Zooming").ej2_instances[0];  
                obj.dataSource = zoomingData;  
                obj.fitToProject();  
              }  
            },  
actionComplete: function (args) {  
              if (args.action === "CellEditing" && args.requestType === "save") {  
                var obj = document.getElementById("Zooming").ej2_instances[0];  
                obj.dataSource = zoomingData;  
                obj.fitToProject();  
              } else if (args.action === "DialogEditing" && args.requestType === "save") {  
                var obj = document.getElementById("Zooming").ej2_instances[0];  
                obj.dataSource = zoomingData;  
                obj.fitToProject();  
              }  
            }  
  
   
Please find the below sample link.  
  
   
  
   
Please find below UG link for zooming actions.   
  
   
  
   
Please let us know if you need further details on this.  
 
  
 Regards,  
Logeswari G 


Loader.
Up arrow icon