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

[New] Show result of spatial relationships #28

Merged
merged 20 commits into from
Jul 11, 2022

Conversation

clee088
Copy link
Contributor

@clee088 clee088 commented Jun 20, 2022

Description

This PR implements Show result of spatial relationships in Geometry category.
URL to README: URL

Linked Issue(s)

  • common-samples/issues/3627

How To Test

  1. Tap on a graphic to view its spatial relationships.
  2. Tap on another graphic.

Screenshots

show-result-of-spatial-relationships

To Discuss

Callout

How the information in the callout is shown could probably be improved. Maybe the addition of a divider could be nice; however, I would then have to specify a frame for the callout as the divider expands the width of the view.

@clee088 clee088 requested a review from yo1995 June 20, 2022 20:15
@clee088 clee088 self-assigned this Jun 20, 2022
Comment on lines 50 to 54
private var pointGraphic: Graphic { graphicsOverlay.graphics.last! }
/// The polyline graphic.
private var polylineGraphic: Graphic { graphicsOverlay.graphics[1] }
/// The polygon graphic.
private var polygonGraphic: Graphic { graphicsOverlay.graphics.first! }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private var pointGraphic: Graphic { graphicsOverlay.graphics.last! }
/// The polyline graphic.
private var polylineGraphic: Graphic { graphicsOverlay.graphics[1] }
/// The polygon graphic.
private var polygonGraphic: Graphic { graphicsOverlay.graphics.first! }
private var pointGraphic: Graphic { graphicsOverlay.graphics[2] }
/// The polyline graphic.
private var polylineGraphic: Graphic { graphicsOverlay.graphics[1] }
/// The polygon graphic.
private var polygonGraphic: Graphic { graphicsOverlay.graphics[0] }

😂 I'm not sure if it's the way to go, but using all subscripts make more sense to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using first and last is more swifty and safer even though we are force unwrapping in this case.

yo1995
yo1995 previously approved these changes Jun 21, 2022
@yo1995 yo1995 requested review from zkline101 and philium June 21, 2022 15:51
yo1995
yo1995 previously approved these changes Jun 23, 2022
@clee088 clee088 requested a review from zkline101 June 30, 2022 17:01
zkline101
zkline101 previously approved these changes Jun 30, 2022
@yo1995
Copy link
Collaborator

yo1995 commented Jul 8, 2022

Looks good with the changes. Please resolve the conflict and I'll approve again.

@clee088 clee088 merged commit 9b41006 into v.next Jul 11, 2022
@clee088 clee088 deleted the clee/New-ShowResultOfSpatialRelationship branch July 11, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants