File tree Expand file tree Collapse file tree 4 files changed +2
-49
lines changed
instrument/window/history/items Expand file tree Collapse file tree 4 files changed +2
-49
lines changed Original file line number Diff line number Diff line change 144144 "react-dnd" : " ^15.1.2" ,
145145 "react-dnd-html5-backend" : " ^15.1.3" ,
146146 "react-dom" : " ^18.2.0" ,
147- "react-electron-web-view" : " ^2.0.1" ,
148147 "react-toastify" : " ^8.2.0" ,
149148 "react-virtualized-auto-sizer" : " ^1.0.6" ,
150149 "react-window" : " ^1.8.6" ,
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ const PdfPreview = observer(
112112 } > {
113113 thumbnail : string ;
114114 url : string ;
115- webView : any ;
116115 zoom : boolean = false ;
117116
118117 constructor ( props : any ) {
@@ -167,34 +166,20 @@ const PdfPreview = observer(
167166 }
168167 }
169168
170- bringToFocus = ( ) => {
171- if ( this . zoom && this . webView ) {
172- if ( this . webView . isReady ( ) ) {
173- this . webView . focus ( ) ;
174- } else {
175- setTimeout ( this . bringToFocus ) ;
176- }
177- }
178- } ;
179-
180169 componentDidMount ( ) {
181170 this . update ( ) ;
182- this . bringToFocus ( ) ;
183171 }
184172
185173 componentDidUpdate ( ) {
186174 this . update ( ) ;
187- this . bringToFocus ( ) ;
188175 }
189176
190177 render ( ) {
191178 let content ;
192179
193180 if ( this . zoom ) {
194- const WebView = require ( "react-electron-web-view" ) ;
195181 content = this . url && (
196- < WebView
197- ref = { ( ref : any ) => ( this . webView = ref ) }
182+ < webview
198183 src = {
199184 "../../libs/pdfjs/web/viewer.html?file=" +
200185 encodeURIComponent ( this . url )
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ export class EditorsStore {
212212 get tabsModel ( ) {
213213 return (
214214 this . getLayoutModel ( )
215- . getNodeById ( this . tabsetID )
215+ . getNodeById ( this . tabsetID ) !
216216 . getChildren ( ) [ 0 ] as FlexLayout . TabNode
217217 ) . getExtraData ( ) . model as FlexLayout . Model ;
218218 }
You can’t perform that action at this time.
0 commit comments