Comments (9)
So you want to implement smth like virtual grid that can be turned on/off and vertices can be aligned to that grid on demand? Am i correct?
from graphx.
Yeah, exactly! If you have little time, I can give it a stab.
from graphx.
This can be a handy feature, you can try to implement it :) I think it's all about DragBehaviour class as it is responsible for vertex movement, but not sure how to handle grid visualization if you'll want to implement it.
from graphx.
I'll have a look at the drag behaviour class this evening (this rare unbooked evening!) 😆
I'll probably do it in three steps:
- Get snapping in place (both against virtual grid and neighbors)
- Get drawing of snap grid working
- Get drawing of "virtual snap lines" against neighbors working
Of course, these changes will have an effect on the API, but I think they'll add to it, rather than change and/or delete from it.
About snap grid: I will not let the user set a size for the grid. I will make it use multiples of some constant (say 5 pixels). That way, I can adapt the grid dynamically depending on the zoom factor. Since GraphX is not an "exact drawing program", I think a dynamic grid should suffice the needs of most users that only want to organize nodes on the screen. What do you think?
from graphx.
Yeah, i think there will be minimal breaking changes needed for an API. Overall this thing looks good and will represent nice feature for GraphX :) Dynamic grid should be the right solution as it seems casual for usage and pro to develope at the same time. If you need any help/questions please let me know, currently i'm quite busy with my main work but i'll try to help in any way.
from graphx.
Sometimes instead of drawing grid lines they draw dots in the background where grid lines would intersect
from graphx.
Thanks for the tip! This could be an option.
from graphx.
in fact, such dots could even be custom objects at an extreme (more optimal though is maybe to have the API accept an object that knows to size and draw the "dot" - then could even have a "drawer" implementation that accepts XAML or a UIElement, draws it into a buffer and just paints that image [with transparency] every time it as asked to)
from graphx.
Implemented in a basic variation
from graphx.
Related Issues (20)
- The sample application not building
- [MVVM] Vertices text is not showing up correctly HOT 2
- Background Image of Vertex HOT 3
- How to remove label edge? HOT 2
- How to remove minimap of the view finder?
- How to export graph to png?
- Slow Drag Vertex
- Implementation of the mvvm model with GraphX
- Initialization error on pass false to tracePositionChange of VertexControl Constructor
- Graph virtualization
- is it possible to add new verticies/edges without having a full relayout of the graph?
- How to make arrows?
- How to make edges doesn't cross HOT 3
- How to add double click event to a vertex HOT 2
- How to change the type of edges?
- Release nuget version with support for QuikGraph HOT 1
- recent development HOT 1
- strange behavior HOT 2
- Edges with same source and target rendered as a star instead of an edge? HOT 1
- the additional api website is currently unavailable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphx.