@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.js
CHANGED
@@ -28193,7 +28193,14 @@ class DocEditor {
|
|
28193
28193
|
elm.style.left = (position.x - elmRect.width + 10) + 'px';
|
28194
28194
|
}
|
28195
28195
|
if (elmRect.top + elmRect.height > parentRect.top + parentRect.height) {
|
28196
|
-
|
28196
|
+
const newTop = position.y - position.height - elmRect.height;
|
28197
|
+
const oldTop = position.y + 5 + position.height;
|
28198
|
+
//计算前后的高度的差距,然后判断新的值是否在父元素的范围内,如果不在则使用旧的值
|
28199
|
+
if (oldTop - newTop < elmRect.top - parentRect.top) {
|
28200
|
+
elm.style.top = (position.y - position.height - elmRect.height) + 'px';
|
28201
|
+
}
|
28202
|
+
//elm.style.top = (top - (elmRect.top + elmRect.height - (parentRect.top + parentRect.height))) + 'px';
|
28203
|
+
//elm.style.top = (position.y - position.height - elmRect.height) + 'px';
|
28197
28204
|
}
|
28198
28205
|
}
|
28199
28206
|
}
|
@@ -28301,7 +28308,7 @@ class DocEditor {
|
|
28301
28308
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28302
28309
|
}
|
28303
28310
|
version() {
|
28304
|
-
return "2.0.
|
28311
|
+
return "2.0.38";
|
28305
28312
|
}
|
28306
28313
|
}
|
28307
28314
|
|