You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
This commit is contained in:
committed by
GitHub
parent
725abbc167
commit
630a400181
@ -2,6 +2,7 @@ import PostMessageService, { MessageResponse, ResponderComponentType } from '@jo
|
||||
import * as React from 'react';
|
||||
const { connect } = require('react-redux');
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
import { SyncScrollMap, SyncScrollMapper } from './utils/SyncScrollMap';
|
||||
|
||||
interface Props {
|
||||
onDomReady: Function;
|
||||
@ -167,6 +168,17 @@ class NoteTextViewerComponent extends React.Component<Props, any> {
|
||||
}
|
||||
}
|
||||
|
||||
private syncScrollMapper_ = new SyncScrollMapper;
|
||||
|
||||
refreshSyncScrollMap(forced: boolean) {
|
||||
return this.syncScrollMapper_.refresh(forced);
|
||||
}
|
||||
|
||||
getSyncScrollMap(): SyncScrollMap {
|
||||
const doc = this.webviewRef_.current?.contentWindow?.document;
|
||||
return this.syncScrollMapper_.get(doc);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Wrap WebView functions (END)
|
||||
// ----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user