@seafile/sdoc-editor 3.0.198 → 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/dist/outline/style.css
CHANGED
|
@@ -108,10 +108,16 @@
|
|
|
108
108
|
.sdoc-outline-header__close {
|
|
109
109
|
cursor: pointer;
|
|
110
110
|
font-size: 14px;
|
|
111
|
+
width: 24px;
|
|
112
|
+
height: 24px;
|
|
113
|
+
line-height: 24px;
|
|
114
|
+
text-align: center;
|
|
115
|
+
color: #666;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
.sdoc-outline-header__close:hover {
|
|
114
|
-
color: #
|
|
119
|
+
background-color: #EFEFEF;
|
|
120
|
+
border-radius: 2px;
|
|
115
121
|
}
|
|
116
122
|
|
|
117
123
|
.sdoc-outline-list-container {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
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": "
|
|
75
|
+
"gitHead": "973ed1b0baa24aa5386665a1f0e1c3d482809fa7"
|
|
76
76
|
}
|