-
Notifications
You must be signed in to change notification settings - Fork 19
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
#240 Polygon node #508
base: main
Are you sure you want to change the base?
#240 Polygon node #508
Conversation
…ails-panel' into #240-Polygon-node
…-in-the-details-panel ; Conflicts: ; src/components/svgs/lines/styles/bjsubway-dotted.tsx ; src/components/svgs/lines/styles/bjsubway-tram.tsx ; src/components/svgs/lines/styles/mtr-light-rail.tsx ; src/components/svgs/lines/styles/mtr-race-day.tsx ; src/components/svgs/lines/styles/single-color.tsx ; src/components/svgs/nodes/gzmtr-line-badge/gzmtr-line-badge.tsx ; src/components/svgs/nodes/text.tsx ; src/components/svgs/stations/suzhourt-basic.tsx
…ails-panel' into #240-Polygon-node
; Conflicts: ; docs/line-styles.md ; docs/stations.md ; src/components/panels/details/details.tsx ; src/components/svgs/nodes/gzmtr-line-badge/gzmtr-line-badge.tsx ; src/components/svgs/nodes/misc-nodes.ts ; src/components/svgs/stations/gzmtr-basic.tsx ; src/components/svgs/stations/gzmtr-int.tsx ; src/constants/edges.ts ; src/constants/lines.ts ; src/constants/nodes.ts
Not ready due to off-putting input fields :( |
Is there any way to add a click hook on each node of a polygon to move nodes' offset? |
Sure. It's possible to add some hooks for nodes of a polygon and change the shape of it when nodes are moving. This is exactly what I want to implement. But there are two obstacles :( Time/priority and the performance effect this particular hook may cause. I'm talking about hundreds of polygons with thousands of nodes inside each of them. |
Yep, it is quite massive. 🤨 |
Another thing about this approach is whether to make a strong reference between nodes inside a polygon and the polygon itself. If there is no constraint about node deletion, we might be in a place where there is no node inside a polygon. However, if there is such a constraint, how will such a constraint be implemented is still an open question. To name a few. Will polygon reference be a special case for virtual nodes? And how to handle constraints during copy and paste. If only a weak reference exists, then how will a polygon behave on empty nodes? Where should it be placed without any children's node information? I would prefer the latter way but so many questions need to be figured out but this does not have enough priority to be worked on :( |
What is the meaning of no node inside a polygon? IMO, node is on the polygon so there is no way that a node is in a polygon. |
Nodes that are attached to a polygon. Or a polygon uses these nodes as its information. Nodes may be virtual nodes or a new type. |
; Conflicts: ; src/components/panels/details/details.tsx ; src/components/svgs/nodes/misc-nodes.ts ; src/constants/lines.ts ; src/constants/nodes.ts
; Conflicts: ; src/components/svgs/nodes/misc-nodes.ts ; src/constants/lines.ts ; src/constants/nodes.ts
This should fix #240