Skip to content

Commit e394a92

Browse files
committed
fixed issue where large image would render in different env #80
Updated the backend to send envID with the render information. Updated the Front End to ignore the incoming window when it is not in the current selected environment
1 parent 8edb898 commit e394a92

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

js/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,14 @@ class App extends React.Component {
472472
// If we're in compare mode and recieve an update to an environment
473473
// that is selected that isn't from the compare output, we need to
474474
// reload the compare output
475+
if(cmd.envID !== undefined && cmd.envID !== this.state.envID){
476+
// If env of the window is not same to the current env then ignore it
477+
break;
478+
}
479+
if(cmd.contentID === 'compare_legend' && this.state.envIDs.length < 2){
480+
// if compare_legend comes and only one env is selected then ignore it
481+
break;
482+
}
475483
if (this.state.envIDs.length > 1 && cmd.has_compare !== true) {
476484
this.postForEnv(this.state.envIDs);
477485
} else {

py/visdom/utils/server_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def window(args):
182182
'inflate': opts.get('inflate', True),
183183
'width': opts.get('width'),
184184
'height': opts.get('height'),
185+
'envID': args.get('eid'),
185186
'contentID': get_rand_id(), # to detected updated windows
186187
}
187188

0 commit comments

Comments
 (0)