Skip to content

Commit 481ec55

Browse files
authored
Merge branch 'ControlCore-Project:main' into disabling-fix
2 parents 49f4b4c + c480aab commit 481ec55

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/component/File-drag-drop.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const app = ({ superState, dispatcher }) => {
3939
fileRef.current.value = null;
4040
if (e.dataTransfer.files.length === 1
4141
&& e.dataTransfer.files[0].name.split('.').slice(-1)[0] === 'graphml') {
42-
readFile(superState, dispatcher, { target: e.dataTransfer });
42+
readFile(superState, dispatcher, e.dataTransfer.files[0]);
4343
}
4444
});
4545
}, []);

src/toolbarActions/toolbarFunctions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async function saveGraphMLFile(state) {
9292
await stream.write(getGraphFun(state).saveToFolder());
9393
await stream.close();
9494
toast.success('File saved Successfully');
95-
} else if (graph.fileHandle === null) {
95+
} else if (!graph.fileHandle) {
9696
getGraphFun(state).saveWithoutFileHandle();
9797
} else {
9898
toast.info('Switch to Edge/Chrome!');

src/toolbarActions/toolbarList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const toolbarList = (state, dispatcher) => [
5757
text: 'Save As',
5858
icon: FaSave,
5959
action: (s, d) => saveAction(s, d),
60-
active: true,
60+
active: state.curGraphInstance,
6161
visibility: true,
6262
},
6363
{
@@ -231,7 +231,7 @@ const toolbarList = (state, dispatcher) => [
231231
// visibility: true,
232232
// },
233233
{
234-
type: 'menu',
234+
type: state.curGraphInstance ? 'menu' : 'action',
235235
text: 'Export',
236236
icon: FaDownload,
237237
action: (s, d) => [

0 commit comments

Comments
 (0)