Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Limit inifinte panning #53

Closed
faguetan opened this issue Nov 22, 2022 · 3 comments
Closed

[Question] Limit inifinte panning #53

faguetan opened this issue Nov 22, 2022 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@faguetan
Copy link

Hello! First of all, thank you for your amazing job with Nodify! Wanted to ask what is the best possible way of limiting panning to actual contents of the editor? I am building an application that suggests placing nodes in ordered columns with user having an option to add more columns and further add nodes in these new columns. Therefore from the start user workspace will be limited to visible screen area and zooming is disabled by design for the whole app. It would be great to be able to have horizontal and vertical scrollbars so that user would interact with the working area in the canvas-style way (horizontal and vertical scroll with scrolling stopping when we reach the end of canvas). Canvas can expand when user adds sufficient number of nodes in a column (vertical expansion) or columns (horizontal expansion).

@faguetan faguetan added the question Further information is requested label Nov 22, 2022
@miroiu
Copy link
Owner

miroiu commented Nov 24, 2022

Hi @faguetan , one way to limit the panning to the actual contents of the editor is to bind to the ItemsExtent and limit the ViewportLocation based on it. For scrollbars, I suggest that you extend the NodifyEditor class and implement IScrollInfo, then wrap the instance in a ScrollViewer. I assume you want to build a Kanban board or something similar, and I don't believe Nodify is a good choice for this. There are a few open source projects and some paid libraries that can do exactly what you want.

@faguetan
Copy link
Author

Hi @faguetan , one way to limit the panning to the actual contents of the editor is to bind to the ItemsExtent and limit the ViewportLocation based on it. For scrollbars, I suggest that you extend the NodifyEditor class and implement IScrollInfo, then wrap the instance in a ScrollViewer. I assume you want to build a Kanban board or something similar, and I don't believe Nodify is a good choice for this. There are a few open source projects and some paid libraries that can do exactly what you want.

Dear @miroiu , thank you so much for the tip! I will try this approach. Actually, it is not a Kanban I am building but rather an app that allows to create chains for certain business processes. Therefore Nodify is a 100% hit for this task. I hope to be able to demonstrate it at some point.

@miroiu
Copy link
Owner

miroiu commented Apr 19, 2023

Hi! I hope Nodify was indeed a good choice for your specific requirements. Feel free to reopen this issue if you still need more information.

@miroiu miroiu closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants