Skip to content

Commit 25b0a69

Browse files
Fixed onRotation function trigger issue
1 parent 122fc5b commit 25b0a69

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

dist/pdf-viewer-reactjs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ var PDFViewer = function (_React$Component) {
582582
});
583583
}
584584

585-
if (_this.props.onZoom) {
585+
if (_this.props.onRotation) {
586586
_this.props.onRotation(-90);
587587
}
588588
}, _this.handleResetRotation = function () {
@@ -592,7 +592,7 @@ var PDFViewer = function (_React$Component) {
592592
});
593593
}
594594

595-
if (_this.props.onZoom) {
595+
if (_this.props.onRotation) {
596596
_this.props.onRotation(0);
597597
}
598598
}, _this.handleRotateRight = function () {
@@ -602,7 +602,7 @@ var PDFViewer = function (_React$Component) {
602602
});
603603
}
604604

605-
if (_this.props.onZoom) {
605+
if (_this.props.onRotation) {
606606
_this.props.onRotation(90);
607607
}
608608
}, _temp), possibleConstructorReturn(_this, _ret);

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class PDFViewer extends React.Component {
105105
});
106106
}
107107

108-
if (this.props.onZoom) {
108+
if (this.props.onRotation) {
109109
this.props.onRotation(-90);
110110
}
111111
};
@@ -120,7 +120,7 @@ class PDFViewer extends React.Component {
120120
});
121121
}
122122

123-
if (this.props.onZoom) {
123+
if (this.props.onRotation) {
124124
this.props.onRotation(0);
125125
}
126126
};
@@ -132,7 +132,7 @@ class PDFViewer extends React.Component {
132132
});
133133
}
134134

135-
if (this.props.onZoom) {
135+
if (this.props.onRotation) {
136136
this.props.onRotation(90);
137137
}
138138
};

0 commit comments

Comments
 (0)