@seafile/sdoc-editor 3.0.199 → 3.0.200

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.
@@ -345,6 +345,13 @@ var getTopValue = exports.getTopValue = function getTopValue(editor, dom, contai
345
345
  var paddingTop = parseFloat(window.getComputedStyle(dom).getPropertyValue('padding-top'));
346
346
  var lineHeight = parseFloat(window.getComputedStyle(dom).getPropertyValue('line-height'));
347
347
  var disToolBarHeight = 21; // side toolbar icon line-height is 21
348
+ if (slateNode.type === _constants2.TOGGLE_HEADER) {
349
+ var rowDom = dom.querySelector('.sdoc-toggle-header-row');
350
+ if (rowDom) {
351
+ var rowRect = rowDom.getBoundingClientRect();
352
+ offsetY = rowRect.top - currentRect.top + rowRect.height / 2 - disToolBarHeight / 2 - 2;
353
+ }
354
+ }
348
355
  if (_constants2.ADD_POSITION_OFFSET_TYPE.includes(slateNode.type)) {
349
356
  paddingTop = slateNode.type === _constants2.CHECK_LIST_ITEM ? 5 : paddingTop;
350
357
  offsetY = lineHeight / 2 + paddingTop - disToolBarHeight / 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "3.0.199",
3
+ "version": "3.0.200",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "6962052b1367ce837cb6e322b56425c5000d059f"
75
+ "gitHead": "973ed1b0baa24aa5386665a1f0e1c3d482809fa7"
76
76
  }