We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Remember and set view position

Thread ID:

Created:

Updated:

Platform:

Replies:

151217 Feb 4,2020 09:50 AM UTC Feb 11,2020 10:05 AM UTC Angular - EJ 2 7
loading
Tags: Diagram
Gabo EE
Asked On February 4, 2020 09:50 AM UTC

Hello,
is there any way to remember and then set view position, aka how user views a diagram?

I have tried the following

const { verticalOffset, horizontalOffset, currentZoom, } = diagram.scrollSettings;

and then

diagram.pan(horizontalOffs, verticalOffset);
diagram.zoom(currentZoom);

But diagram does not behave as expected and view is not as requested

Is this the recommended solution?
Thank you

Shyam G [Syncfusion]
Replied On February 5, 2020 09:24 AM UTC

Hi Gabo, 

Please confirm us whether you need to update the diagram size at runtime or need to move the scrollbar programatically. We could not able to understand your exact requirement. Could you please elaborate your requirement in detail with the screenshot or video. 

Regards, 
Shyam G 


Gabo EE
Replied On February 5, 2020 03:44 PM UTC

Hi,
I am trying to close diagram and after that opening it. Problem is that users is seeing different view, because diagram has moved to initial position and diagram is not in position (view) as user remembers it.

Shyam G [Syncfusion]
Replied On February 6, 2020 12:44 PM UTC

Hi Gabo, 
 
Before closing the diagram, you can save the diagram using saveDiagram method. After opening a new page, you can load the diagram using loadDiagram method. The saved diagram position will be retained while loading the diagram. Please refer to a below sample and the help documentation below. 
 


 
Regards, 
Shyam G 


Gabo EE
Replied On February 7, 2020 02:17 PM UTC

Sorry, but I do not want to save diagram. Data representing diagram may change between closing and opening.

Shyam G [Syncfusion]
Replied On February 10, 2020 07:03 AM UTC

Hi Gabo,
Could you please confirm us whether you need a collaborative diagram which means when you perform a diagram interactions in one machine should change in the other machine. If yes, we don’t have a support for it. If we misunderstood your requirement, please share us more details such as elaborate your exact requirement in detail with the screenshot or video. 

Regards, 
Shyam G 


Gabo EE
Replied On February 10, 2020 02:03 PM UTC

I am not talking about real time changes among multiple users, just about changes made by one user, who may decide to close diagram at one moment and open it few seconds later with saved view position, so diagram does not appear as jumping

Shyam G [Syncfusion]
Replied On February 11, 2020 10:05 AM UTC

Hi Gabo, 
 
We don’t have any other option to retain the state of the diagram except saveDiagram and loadDiagram method. As mentioned earlier, Before closing the diagram, you can save the diagram using saveDiagram method. After opening a new page, you can load the diagram using loadDiagram method. The saved diagram position will be retained while loading the diagram. Please refer to a  help documentation below.  
   
 
 
 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon