-
Notifications
You must be signed in to change notification settings - Fork 25
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
fixes label showing up in the upper left of the gsv view #3373
fixes label showing up in the upper left of the gsv view #3373
Conversation
@@ -268,8 +268,8 @@ function getCanvasCoordinate(origPov, newPov, canvasWidth, canvasHeight, iconWid | |||
outputCoord.x = offset.left; | |||
outputCoord.y = offset.top; | |||
} else { | |||
outputCoord.x = null; | |||
outputCoord.y = null; | |||
outputCoord.x = -iconWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason that this needed to be changed from null
to -iconWidth
? Couldn't your code just check if the values are null instead of checking if they are less than 0? I'm just concerned about the possibility that we don't know what the implications are of changing the output of this function!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were there other instances where this function was outputting negative values that were problematic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this also means that the label will disappear before it's fully off screen, correct? I think that the labels should continue to show until they would fully be off screen!
I haven't seen other instances where this function was outputting problematic negative values. I agree that using |
…Webpage into 3336-fixed-label-showing-in-upper-left-of-gsv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @tanayaxsharma !!
Resolves #3336
Changed the x and y coordinate values of the label to be negative when it is outside of the viewing region. Also made sure that the labels were not being drawn when this is the case.
Before/After screenshots (if applicable)
Before:
After:
https://github.com/ProjectSidewalk/SidewalkWebpage/assets/92968308/0af03497-f047-4ead-b115-afb16bb17e42