Skip to content

Commit 3ede51f

Browse files
feat: [UEPR-44] added ability to stop project when playing
1 parent 01f493f commit 3ede51f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/containers/gui.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ class GUI extends React.Component {
7272
// At this time the project view in www doesn't need to know when a project is unloaded
7373
this.props.onProjectLoaded();
7474
}
75+
if (this.props.shouldStopProject && !prevProps.shouldStopProject) {
76+
this.props.vm.stopAll();
77+
}
7578
}
7679
render () {
7780
if (this.props.isError) {
@@ -130,6 +133,7 @@ GUI.propTypes = {
130133
onVmInit: PropTypes.func,
131134
projectHost: PropTypes.string,
132135
projectId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
136+
shouldStopProject: PropTypes.bool,
133137
telemetryModalVisible: PropTypes.bool,
134138
vm: PropTypes.instanceOf(VM).isRequired
135139
};

0 commit comments

Comments
 (0)