Skip to content

#1082: Fixed Fit to Window Functionality#1168

Merged
dondi merged 14 commits intobetafrom
cecilia-1082
Jan 29, 2025
Merged

#1082: Fixed Fit to Window Functionality#1168
dondi merged 14 commits intobetafrom
cecilia-1082

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.

…ng host_site to https://localhost:8080
… 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 😁


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