Skip to content

Commit b6d4728

Browse files
committed
display disconnect always last
1 parent 0dca8bb commit b6d4728

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

renderer/viewer/three/documentRenderer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ export class DocumentRenderer {
6161
this.previousCanvasWidth = this.canvas.width
6262
this.previousCanvasHeight = this.canvas.height
6363

64+
const supportsWebGL2 = 'WebGL2RenderingContext' in window
6465
// Only initialize stats and DOM-related features in main thread
65-
if (!externalCanvas) {
66+
if (!externalCanvas && supportsWebGL2) {
6667
this.stats = new TopRightStats(this.canvas as HTMLCanvasElement, this.config.statsVisible)
6768
this.setupFpsTracking()
6869
}

src/devtools.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ function connectWebSocket () {
255255

256256
const wsUrl = getWebSocketUrl()
257257
if (!wsUrl) {
258-
console.log('WebSocket server not configured')
259258
return
260259
}
261260

src/react/PauseScreen.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,6 @@ export default () => {
289289
/>
290290
</div>
291291
) : null}
292-
{!lockConnect && <>
293-
<Button className="button" style={{ width: '204px' }} onClick={disconnect}>
294-
{fsState.inMemorySave && !fsState.syncFs && !fsState.isReadonly ? 'Save & Quit' : 'Disconnect & Reset'}
295-
</Button>
296-
</>}
297292
{(noConnection || appConfig?.alwaysReconnectButton) && (
298293
<div className={styles.row}>
299294
<Button className="button" style={{ width: appConfig?.reportBugButtonWithReconnect ? '98px' : '204px' }} onClick={reconnectReload}>
@@ -343,6 +338,11 @@ export default () => {
343338
)}
344339
</div>
345340
)}
341+
{!lockConnect && <>
342+
<Button className="button" style={{ width: '204px' }} onClick={disconnect}>
343+
{fsState.inMemorySave && !fsState.syncFs && !fsState.isReadonly ? 'Save & Quit' : 'Disconnect & Reset'}
344+
</Button>
345+
</>}
346346
</div>
347347
<LoadingTimer />
348348
</Screen>

0 commit comments

Comments
 (0)