Add property to snap automatic routing of orthogonal connectors/lines to grid
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript
- Ambito
- design
Direzione di ricerca
Start by reading the orthogonalEdgeStyle and elbowEdgeStyle routing logic and how line style properties are defined and applied; the issue does not name specific files or tests. Work out how automatic routing can align to the grid even when connector endpoints are off-grid, while preserving automatic adjustment when shapes move. Done means an optional per-line property produces grid-aligned automatic routing without requiring waypoints.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Is your feature request related to a problem? Please describe.
I usually try to align my diagrams to the grid to maintain consistent visual spacing, and I very often use orthogonal connector/line styles.
I prefer to leave the default orthogonal routing alone if I am happy with it (in other words, avoiding manually dragging the edges/placing waypoints) to avoid the need to manually re-adjust the line positioning/placement of the connectors if I move the connected shapes.
However, the default routing of orthogonal connectors seems to place the middle perpendicular segment exactly halfway between the ends of the connector, so it is not aligned to the grid if the spacing between the connected shapes is not an even multiple of the grid spacing.
I would like a way to force the automatic routing to align to the grid, without having to manually place a waypoint.
As an example, here is what the current automatic routing looks like (note that the vertical segment is slightly offset from the grid):
I would like it to look like this (snapped/aligned to the grid):
This would help maintain consistent visual spacing with densely packed routing/diagrams like circuit diagrams (annotations added to show areas that would look more visually pleasing if all the routing was aligned to the grid):
Describe the solution you'd like
I would like an additional style property (perhaps "Snap Routing to Grid"?) that can be set on lines that would force the automatic routing (i.e., how they are routed without any manually placed waypoints) of orthogonal connectors (edgeStyle of orthogonalEdgeStyle or elbowEdgeStyle) to snap to the defined grid.
This would be sort of similar to how the "Autosize Grid" property of shapes works (the shape width and height are rounded to multiples of the grid size when autosizing), although unlike "Autosize Grid" the implementation of this new property should align the routing to the underlying grid even if the connector end points aren't aligned to the grid.
Describe alternatives you've considered
An option that is global to the diagram may work, but it would be much more flexible to implement this as an additional style property that can be enabled or disabled on individual lines as needed.
As mentioned above, it's possible to manually align the line to the grid by dragging the line to create a waypoint, but then the routing will no longer automatically adjust when the connecting shapes are moved.
- Lingua principale
- JavaScript
- Stelle
- 9.4k
- Fork
- 1.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jgraph/drawio
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Requesting a VPAT for app.diagrams.netForse già presa @alderg l’ha presa 24 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Import TablesApertaenhancement possible-duplicate
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di jgraph/drawio
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 82/100
Leonxlnx/taste-skill#216 ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: 11 broken linksAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
all-contributors/cli#690 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui Bug Payload OSS
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
payloadcms/payload#19839 ·
I maintainer di solito rispondono entro 1 giorno