Skip to content

Commit 9d5d6ca

Browse files
authored
Merge pull request #38 from Aviral09/dev
Fixes modal issue
2 parents 39b609f + 99f6ac2 commit 9d5d6ca

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/GraphArea.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ function Graph({
99
const [instance, setInstance] = useState(null);
1010
const ref = useRef();
1111
const setContainerDim = (element) => {
12-
const elToAss = element;
13-
elToAss.style.width = `${graphContainerRef.current.offsetWidth - 2}px`;
14-
elToAss.style.height = `${graphContainerRef.current.offsetHeight - 2}px`;
12+
if (element) {
13+
const elToAss = element;
14+
elToAss.style.width = `${graphContainerRef.current.offsetWidth - 2}px`;
15+
elToAss.style.height = `${graphContainerRef.current.offsetHeight - 2}px`;
16+
}
1517
};
1618

1719
const initialiseNewGraph = () => {

src/component/HeaderComps.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ const ActionButton = ({
6262
onKeyDown={(ev) => active && ev.key === ' ' && action()}
6363
data-tip={hotkey ? hotkey.split(',')[0] : ''}
6464
>
65-
<div className="icon"><Icon size="25" /></div>
66-
<div style={{ fontSize: 16 }}>{text}</div>
65+
<div className="icon"><Icon size="20" /></div>
66+
<div style={{ fontSize: 14 }}>{text}</div>
6767
</div>
6868
);
6969

src/component/fileBrowser.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const LocalFileBrowser = ({ superState, dispatcher }) => {
4747
if (valueSubDir.kind === 'file') {
4848
const fileData = await valueSubDir.getFile();
4949
state = state.concat([{
50-
key: `${topLevel}/${value.name}/${key}`,
50+
key: `${topKey}/${value.name}/${key}`,
5151
modified: fileData.lastModified,
5252
size: fileData.size,
5353
fileObj: fileData,

src/component/header.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
padding-bottom: 5px;
1818
display: inline-flex;
1919
flex-direction: column;
20-
min-width: 64px;
20+
min-width: 60px;
2121
align-items: center;
2222
cursor: pointer;
2323
justify-content: space-between;
2424
box-sizing: border-box;
2525
color: rgba(0, 0, 0, 0.3);
2626
transition: none;
27-
height: 64px;
27+
height: 60px;
2828
}
2929

3030
.toolbar .tool.active {

src/component/modals/ParentModal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Modal = ({
3333
<ReactModal
3434
isOpen={isOpen}
3535
contentLabel="onRequestClose Example"
36-
onRequestClose={closeModal}
36+
// onRequestClose={closeModal} // prevent modal from closing when clicked outside
3737
className="Modal"
3838
overlayClassName={`Overlay ${curClass}`}
3939
>

0 commit comments

Comments
 (0)