@hailin-zheng/editor-core 2.0.37 → 2.0.38
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.
- package/index-cjs.js +9 -2
- package/index-cjs.js.map +1 -1
- package/index.js +9 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -28223,7 +28223,14 @@ class DocEditor {
|
|
28223
28223
|
elm.style.left = (position.x - elmRect.width + 10) + 'px';
|
28224
28224
|
}
|
28225
28225
|
if (elmRect.top + elmRect.height > parentRect.top + parentRect.height) {
|
28226
|
-
|
28226
|
+
const newTop = position.y - position.height - elmRect.height;
|
28227
|
+
const oldTop = position.y + 5 + position.height;
|
28228
|
+
//计算前后的高度的差距,然后判断新的值是否在父元素的范围内,如果不在则使用旧的值
|
28229
|
+
if (oldTop - newTop < elmRect.top - parentRect.top) {
|
28230
|
+
elm.style.top = (position.y - position.height - elmRect.height) + 'px';
|
28231
|
+
}
|
28232
|
+
//elm.style.top = (top - (elmRect.top + elmRect.height - (parentRect.top + parentRect.height))) + 'px';
|
28233
|
+
//elm.style.top = (position.y - position.height - elmRect.height) + 'px';
|
28227
28234
|
}
|
28228
28235
|
}
|
28229
28236
|
}
|
@@ -28331,7 +28338,7 @@ class DocEditor {
|
|
28331
28338
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28332
28339
|
}
|
28333
28340
|
version() {
|
28334
|
-
return "2.0.
|
28341
|
+
return "2.0.38";
|
28335
28342
|
}
|
28336
28343
|
}
|
28337
28344
|
|