|
@@ -10,6 +10,12 @@ import { EditorView, ViewUpdate } from '@codemirror/view'
|
|
|
import { CurrentDoc } from '../../../../../../types/current-doc'
|
|
import { CurrentDoc } from '../../../../../../types/current-doc'
|
|
|
import { fullHeightCoordsAtPos } from '../../utils/layer'
|
|
import { fullHeightCoordsAtPos } from '../../utils/layer'
|
|
|
import { debounce } from 'lodash'
|
|
import { debounce } from 'lodash'
|
|
|
|
|
+import getMeta from '../../../../utils/meta'
|
|
|
|
|
+
|
|
|
|
|
+// If a toolbar row sits alongside the review panel, the review panel entries need to be shifted down by 32px.
|
|
|
|
|
+// Once the review panel is always inside the editor, this offset can be removed.
|
|
|
|
|
+const offsetTop =
|
|
|
|
|
+ getMeta('ol-showSourceToolbar') && !getMeta('ol-isReviewPanelReact') ? 32 : 0
|
|
|
|
|
|
|
|
// With less than this number of entries, don't bother culling to avoid
|
|
// With less than this number of entries, don't bother culling to avoid
|
|
|
// little UI jumps when scrolling.
|
|
// little UI jumps when scrolling.
|
|
@@ -79,7 +85,7 @@ export const createChangeManager = (
|
|
|
visibilityChanged = true
|
|
visibilityChanged = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- entry.screenPos = { y, height, editorPaddingTop }
|
|
|
|
|
|
|
+ entry.screenPos = { y: y + offsetTop, height, editorPaddingTop }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (allVisible) {
|
|
if (allVisible) {
|