@seafile/sdoc-editor 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WIKI_EDITOR, DOCUMENT_PLUGIN_EDITOR } from '../constants';
|
|
2
2
|
export const getDomHeight = dom => {
|
|
3
3
|
const styles = window.getComputedStyle(dom);
|
|
4
4
|
const rect = dom.getBoundingClientRect();
|
|
@@ -58,9 +58,10 @@ export const getHeaderHeight = editor => {
|
|
|
58
58
|
} = editor;
|
|
59
59
|
switch (editorType) {
|
|
60
60
|
case WIKI_EDITOR:
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
61
|
+
// Wiki header is async value
|
|
62
|
+
const headerTop = document.querySelector('.wiki-page-header-wrapper').offsetHeight;
|
|
63
|
+
// top nav is 44px
|
|
64
|
+
return headerTop + 44;
|
|
64
65
|
case DOCUMENT_PLUGIN_EDITOR:
|
|
65
66
|
return 67 + 48 + 49 + 37;
|
|
66
67
|
default:
|