Skip to content

Commit 94c8f71

Browse files
committed
Merge branch 'disabling-fix' of https://github.com/parteekcoder/concore-editor into disabling-fix
2 parents a21758b + 481ec55 commit 94c8f71

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
@@ -89,7 +89,7 @@ async function saveGraphMLFile(state) {
8989
await stream.write(getGraphFun(state).saveToFolder());
9090
await stream.close();
9191
toast.success('File saved Successfully');
92-
} else if (graph.fileHandle === null) {
92+
} else if (!graph.fileHandle) {
9393
getGraphFun(state).saveWithoutFileHandle();
9494
} else {
9595
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)