|
@@ -10,7 +10,6 @@ export default class EditorUtils {
|
|
|
public static getEditorMenuPos(eleTop, eleLeft): { top, left } {
|
|
|
const editorRect = EditorUtils.getEditorRect();
|
|
|
const editorMenuWidthAndHeight = EditorUtils.getEditorMenuWidthAndHeight();
|
|
|
- console.log('editorMenuWidthAndHeight >> ', editorMenuWidthAndHeight, eleLeft)
|
|
|
if (editorRect) {
|
|
|
return {
|
|
|
top: eleTop - editorRect.top - editorMenuWidthAndHeight?.height ?? 0 - 1,
|
|
@@ -31,9 +30,9 @@ export default class EditorUtils {
|
|
|
public static getEditorMenuWidthAndHeight() {
|
|
|
const editorMenuRect = EditorUtils.getEditorMenuObj()?.getBoundingClientRect();
|
|
|
return {
|
|
|
- width: editorMenuRect.right - editorMenuRect.left,
|
|
|
- height: editorMenuRect.bottom - editorMenuRect.top
|
|
|
- }
|
|
|
+ width: editorMenuRect.width !== 0 ? editorMenuRect.width : 27,
|
|
|
+ height: editorMenuRect.height !== 0 ? editorMenuRect.height : 200
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
public static showEditorMenu(elementRect) {
|