Skip to content

Conversation

mssalvatore
Copy link
Collaborator

@mssalvatore mssalvatore commented Jan 21, 2021

What does this PR do?

Fixes #150 - Scale Monkey Island map to window size

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the documentation framework updated to reflect the changes? (N/A)

Testing Checklist

  • Added relevant unit tests? (N/A)
  • Have you successfully tested your changes locally? Elaborate:

    Tested by running the monkey in the monkeyzoo environment

  • If applicable, add screenshots or log transcripts of the feature working

map_resize

@codecov
Copy link

codecov bot commented Jan 21, 2021

Codecov Report

Merging #931 (e9b50ef) into develop (b191eff) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #931   +/-   ##
========================================
  Coverage    18.54%   18.54%           
========================================
  Files          338      338           
  Lines        11483    11483           
========================================
  Hits          2130     2130           
  Misses        9353     9353           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b191eff...e9b50ef. Read the comment docs.

return (<Graph graph={this.props.graph} options={newOptions} events={this.props.events}/>)
return (
<div class={'net-graph-wrapper'}>
<Graph graph={this.props.graph} options={newOptions} events={this.props.events}/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Tried it like this?

Suggested change
<Graph graph={this.props.graph} options={newOptions} events={this.props.events}/>
<Graph graph={this.props.graph} options={newOptions} events={this.props.events} className={'net-graph-wrapper'}/>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@VakarisZ Yeah, it doesn't work because the Graph component ignores the className property. https://github.com/crubier/react-graph-vis/blob/b86b4ebfe2112f3a6ae946ab3806c7d995502f3a/lib/index.js#L256-L260

I could add the style instead of adding a class name, but I'd rather we control as much of the style in .css files as possible, rather than having them hard coded in the JSX.

Copy link
Contributor

@VakarisZ VakarisZ left a comment

Choose a reason for hiding this comment

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

Wow, nice!

@mssalvatore mssalvatore merged commit 41d5a98 into guardicore:develop Jan 27, 2021
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.

Monkey Island Map component doesn't scale to window size
2 participants