Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CodeSnippetDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class CodeSnippetDisplay extends React.Component<
const intID = parseInt(id, 10);
const realTarget = document.getElementsByClassName(TITLE_CLASS)[intID];
// distDown is the number of pixels to shift the preview down
let distDown: number = realTarget.getBoundingClientRect().top - 40;
let distDown: number = realTarget.getBoundingClientRect().top - 43;
if (realTarget.getBoundingClientRect().top > window.screen.height / 2) {
distDown = distDown - 66;
}
Expand Down
2 changes: 1 addition & 1 deletion src/PreviewSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class Preview<T> extends Widget {
})
});
}
this.editor.setSize({ width: 200, height: 106 });
/*this.editor.setSize({ width: 150, height: 106 });*/
if (this.isVisible) {
this._hasRefreshedSinceAttach = true;
this.editor.refresh();
Expand Down
12 changes: 7 additions & 5 deletions style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,18 @@

.jp-codeSnippet-preview-content {
background: var(--jp-layout-color1);
padding: 10px;
/* min-width: 960px; */
width: 200px;
padding: 5px;
width: 180px;
/*height: fit-content;
max-height: 150px;*/
height: 106px;
box-sizing: border-box;
box-shadow: var(--jp-elevation-z2);
word-wrap: break-word;
border-radius: var(--jp-border-radius);
font-size: var(--jp-ui-font-size1);
color: var(--jp-ui-font-color1);
margin: 10px 10px 10px 10px;
margin: 10px 10px 10px 0px;
}

/* Code Snippet Drag and Drop CSS */
Expand Down Expand Up @@ -318,7 +319,7 @@
flex-direction: column;
height: 100%;
width: 98.5%;
padding: 12px;
padding-left: 12px;
}

.jp-codeSnippetInputArea-editor {
Expand Down Expand Up @@ -351,6 +352,7 @@
align-self: flex-end;
margin-top: 12px;
margin-right: 3%;
margin-bottom: 12px;
}

/* code snippet create button */
Expand Down