Nano zoom fix #12
This commit is contained in:
21
.idea/workspace.xml
generated
21
.idea/workspace.xml
generated
@@ -4,10 +4,9 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="8497df64-d86b-4c98-ac58-c157d9d3fb1e" name="Changes" comment="Nano zoom fix #12">
|
<list default="true" id="8497df64-d86b-4c98-ac58-c157d9d3fb1e" name="Changes" comment="Nano zoom fix #11">
|
||||||
<change beforePath="$PROJECT_DIR$/frontend/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/frontend/package.json" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/frontend/src/App.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/frontend/src/App.jsx" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/frontend/src/App.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/frontend/src/App.jsx" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -113,7 +112,7 @@
|
|||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1733439468142</updated>
|
<updated>1733439468142</updated>
|
||||||
<workItem from="1733439479708" duration="5489000" />
|
<workItem from="1733439479708" duration="5489000" />
|
||||||
<workItem from="1733448523969" duration="279000" />
|
<workItem from="1733448523969" duration="687000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Nano zoom fix #11">
|
<task id="LOCAL-00001" summary="Nano zoom fix #11">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
@@ -123,15 +122,23 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1733447944692</updated>
|
<updated>1733447944692</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="2" />
|
<task id="LOCAL-00002" summary="Nano zoom fix #11">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1733448864234</created>
|
||||||
|
<option name="number" value="00002" />
|
||||||
|
<option name="presentableId" value="LOCAL-00002" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1733448864234</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="3" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
<option name="version" value="3" />
|
<option name="version" value="3" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="Nano zoom fix #11" />
|
|
||||||
<MESSAGE value="Nano zoom fix #12" />
|
<MESSAGE value="Nano zoom fix #12" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Nano zoom fix #12" />
|
<MESSAGE value="Nano zoom fix #11" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Nano zoom fix #11" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -22,15 +22,21 @@ const App = () => {
|
|||||||
theme: { background: '#1e1e1e', foreground: '#ffffff' },
|
theme: { background: '#1e1e1e', foreground: '#ffffff' },
|
||||||
macOptionIsMeta: true,
|
macOptionIsMeta: true,
|
||||||
allowProposedApi: true,
|
allowProposedApi: true,
|
||||||
fontSize: 14, // Set the default font size initially
|
fontSize: 14,
|
||||||
});
|
});
|
||||||
|
|
||||||
fitAddon.current = new FitAddon();
|
fitAddon.current = new FitAddon();
|
||||||
terminal.current.loadAddon(fitAddon.current);
|
terminal.current.loadAddon(fitAddon.current);
|
||||||
|
|
||||||
|
let resizeObserver = new ResizeObserver(() => {
|
||||||
|
fitAddon.current.fit();
|
||||||
|
notifyServerOfResize();
|
||||||
|
});
|
||||||
|
|
||||||
if (terminalRef.current) {
|
if (terminalRef.current) {
|
||||||
terminal.current.open(terminalRef.current);
|
terminal.current.open(terminalRef.current);
|
||||||
console.log('Terminal opened successfully.');
|
console.log('Terminal opened successfully.');
|
||||||
|
resizeObserver.observe(terminalRef.current);
|
||||||
} else {
|
} else {
|
||||||
console.error('Terminal reference is not valid!');
|
console.error('Terminal reference is not valid!');
|
||||||
}
|
}
|
||||||
@@ -72,6 +78,7 @@ const App = () => {
|
|||||||
socket.current.close();
|
socket.current.close();
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', resizeTerminal);
|
window.removeEventListener('resize', resizeTerminal);
|
||||||
|
resizeObserver.disconnect();
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user