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

#1082: Fixed Fit to Window Functionality #1168

Merged
merged 14 commits into from
Jan 29, 2025
Merged

#1082: Fixed Fit to Window Functionality #1168

merged 14 commits into from
Jan 29, 2025

Conversation

ceciliazaragoza
Copy link
Collaborator

Resolved Issue #1082 by adjusting logic in fitContainer function so that graph is updated with correct dimensions of window and adjusted communication between iframe and GRNsight.

… since empty dimensions are being sent and propogated throughout code before they are received, and will add a Promise to ensure that wait for dimensions to be sent before running the rest of the code for displaying graph.
…sole that width of grnstate.dimensions is undefined when run fitContainer
…p is called again after the grnState.dimensions are set. while grnState.dimensions are undefined, leave the container as the current size in fitContainer, and finally update the size in fitContainer when grnState.dimensions is not undefined
@ceciliazaragoza ceciliazaragoza requested a review from dondi January 29, 2025 16:11
Copy link
Owner

@dondi dondi left a comment

Choose a reason for hiding this comment

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

One more character 😁

@@ -40,7 +40,7 @@ const sendDimensions = (destination, origin) => {
};

window.addEventListener("message", event => {
if (event.origin.indexOf("https://grnsight.lmucs.org") !== 0) {
if (event.origin != "https://grnsight.lmucs.org") {
Copy link
Owner

Choose a reason for hiding this comment

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

Make sure to use !==

Copy link
Owner

@dondi dondi left a comment

Choose a reason for hiding this comment

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

LGTM

@dondi dondi merged commit 2893aef into beta Jan 29, 2025
3 checks passed
@dondi dondi deleted the cecilia-1082 branch January 29, 2025 17:21
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.

2 participants