Skip to content

Commit

Permalink
fix wrong syntax for the if
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Aug 1, 2024
1 parent 1c39a44 commit d982324
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions streamlit_pdf_viewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def pdf_viewer(input: Union[str, Path, bytes],
st.markdown("BAO")
viewer = pdf_viewer(
binary,
height=300,
width=400,
height=400,
annotations=annotations,
render_text=False,
key="bao"
Expand All @@ -123,7 +124,7 @@ def pdf_viewer(input: Union[str, Path, bytes],
st.markdown("Miao")
viewer2 = pdf_viewer(
binary2,
height=300,
height=400,
render_text=False,
key="miao"
)
6 changes: 4 additions & 2 deletions streamlit_pdf_viewer/frontend/src/PdfViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ export default {
// If the desired width is larger than the available inner width,
// we should not exceed it. To be revised
if (0 < window.innerWidth < maxWidth.value) {
maxWidth.value = window.innerWidth
if (window.innerWidth > 0) {
if (window.innerWidth < maxWidth.value) {
maxWidth.value = window.innerWidth
}
}
}
}
Expand Down

0 comments on commit d982324

Please sign in to comment.