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

#240 Polygon node #508

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

#240 Polygon node #508

wants to merge 17 commits into from

Conversation

thekingofcity
Copy link
Member

This should fix #240

…-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
; 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
@thekingofcity thekingofcity marked this pull request as draft November 23, 2023 12:08
@thekingofcity
Copy link
Member Author

Not ready due to off-putting input fields :(

@langonginc
Copy link
Member

Is there any way to add a click hook on each node of a polygon to move nodes' offset?

@thekingofcity
Copy link
Member Author

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.

@langonginc
Copy link
Member

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. 🤨

@thekingofcity
Copy link
Member Author

thekingofcity commented Nov 25, 2023

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 :(

@langonginc
Copy link
Member

we might be in a place where there is no node inside a polygon.

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.

@thekingofcity
Copy link
Member Author

thekingofcity commented Nov 25, 2023

we might be in a place where there is no node inside a polygon.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Polygon node
2 participants