mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-06-19 21:30:44 -04:00
fix bug
Former-commit-id: 684228395a8b8c403fbb1b227fb25a75602067d9
This commit is contained in:
@@ -19,6 +19,7 @@ class ImageViewer extends React.Component<ImageViewerProps, ImageViewerStates> {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
console.log(this.props.rendition);
|
||||
this.props.rendition.on("rendered", () => {
|
||||
let iframe = document.getElementsByTagName("iframe")[0];
|
||||
if (!iframe) return;
|
||||
|
||||
@@ -316,12 +316,6 @@ class Viewer extends React.Component<ViewerProps, ViewerState> {
|
||||
reader.readAsText(blob, "UTF-8");
|
||||
};
|
||||
render() {
|
||||
const imageViewerProps = {
|
||||
isShow: this.props.isShow,
|
||||
rendition: this.props.rendition,
|
||||
handleEnterReader: this.props.handleEnterReader,
|
||||
handleLeaveReader: this.props.handleLeaveReader,
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
@@ -361,7 +355,16 @@ class Viewer extends React.Component<ViewerProps, ViewerState> {
|
||||
.props.currentBook.key ? (
|
||||
<BackgroundWidget />
|
||||
) : null}
|
||||
{this.props.htmlBook && <ImageViewer {...imageViewerProps} />}
|
||||
{this.props.htmlBook && (
|
||||
<ImageViewer
|
||||
{...{
|
||||
isShow: this.props.isShow,
|
||||
rendition: this.props.htmlBook.rendition,
|
||||
handleEnterReader: this.props.handleEnterReader,
|
||||
handleLeaveReader: this.props.handleLeaveReader,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user