Skip to content

Commit 2a56787

Browse files
authored
Merge pull request #62 from ansu5555/fix/multiple-pdf-render
Fix multiple pdf render & render failure on rapid page change
2 parents 05e657c + 15e5b3b commit 2a56787

10 files changed

Lines changed: 1688 additions & 83 deletions

File tree

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ module.exports = {
1919
plugins: ['react', 'prettier'],
2020
rules: {
2121
'prettier/prettier': 'error',
22+
'arrow-parens': [2, 'as-needed'],
2223
},
2324
settings: {
2425
react: {
25-
version: 'detect',
26+
version: '>=16.8.6',
2627
},
2728
},
2829
}

.stylelintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: ['stylelint-config-recommended'],
3+
rules: {
4+
indentation: 2,
5+
'max-empty-lines': 2,
6+
'no-empty-first-line': true,
7+
},
8+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Every element can be styled upon your preferences using default classes your own
1212

1313
Initially it was forked from [mgr-pdf-viewer-react](https://github.com/MGrin/mgr-pdf-viewer-react)
1414

15+
### Hit the :star: in gihub if you like it
16+
1517
### Example: Live demo is available [here](https://ansu5555.github.io/pdf-viewer-reactjs/)
1618

1719
# How to install

dist/pdf-viewer-reactjs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/src/App.css

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
.customViewer {
2-
border-color: #fa5b35;
3-
border-width: 1px;
4-
border-style: solid;
2+
border-color: #fa5b35;
3+
border-width: 1px;
4+
border-style: solid;
55
}
66
.customCanvas {
7-
height: 500px;
8-
max-height: 500px;
9-
min-width: 500px;
10-
max-width: 500px;
11-
overflow: auto;
7+
height: 500px;
8+
max-height: 500px;
9+
min-width: 500px;
10+
max-width: 500px;
11+
overflow: auto;
1212
}
1313
.customPrevBtn {
14-
cursor: pointer;
15-
display: inline-block;
16-
margin: 0;
17-
width: auto;
18-
color: #fa5b35;
19-
background-color: #f3f3f3;
20-
border-color: #fa5b35;
21-
border-width: 1px;
22-
border-style: solid;
23-
border-radius: 6px;
14+
cursor: pointer;
15+
display: inline-block;
16+
margin: 0;
17+
width: auto;
18+
color: #fa5b35;
19+
background-color: #f3f3f3;
20+
border-color: #fa5b35;
21+
border-width: 1px;
22+
border-style: solid;
23+
border-radius: 6px;
2424
}
2525
.customNextBtn {
26-
cursor: pointer;
27-
display: inline-block;
28-
margin: 0;
29-
width: auto;
30-
color: #fa5b35;
31-
background-color: #f3f3f3;
32-
border-color: #333333;
33-
border-width: 1px;
34-
border-style: solid;
35-
border-radius: 6px;
26+
cursor: pointer;
27+
display: inline-block;
28+
margin: 0;
29+
width: auto;
30+
color: #fa5b35;
31+
background-color: #f3f3f3;
32+
border-color: #333333;
33+
border-width: 1px;
34+
border-style: solid;
35+
border-radius: 6px;
3636
}
3737
.customResetBtn {
38-
cursor: pointer;
39-
display: inline-block;
40-
margin: 0;
41-
width: auto;
42-
color: #45fa35;
43-
background-color: #f3f3f3;
44-
border-color: #45fa35;
45-
border-width: 1px;
46-
border-style: solid;
47-
border-radius: 6px;
38+
cursor: pointer;
39+
display: inline-block;
40+
margin: 0;
41+
width: auto;
42+
color: #45fa35;
43+
background-color: #f3f3f3;
44+
border-color: #45fa35;
45+
border-width: 1px;
46+
border-style: solid;
47+
border-radius: 6px;
4848
}
4949
.customPages {
50-
font-size: medium;
51-
margin: 0.5rem;
50+
font-size: medium;
51+
margin: 0.5rem;
5252
}
5353
.customWrapper {
54-
height: 40px;
55-
font-size: 24px;
56-
padding: 12px;
57-
padding-bottom: 0;
58-
background-color: #fff;
54+
height: 40px;
55+
font-size: 24px;
56+
padding: 12px;
57+
padding-bottom: 0;
58+
background-color: #fff;
5959
}

example/src/index.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
body {
2-
margin: 0;
3-
padding: 0;
4-
font-family: sans-serif;
5-
background-color: #fafafa;
2+
margin: 0;
3+
padding: 0;
4+
font-family: sans-serif;
5+
background-color: #fafafa;
66
}

0 commit comments

Comments
 (0)