优化:打开文件历史记录时,增加滚动条

new_specnew_spec
ChenX 3 years ago
parent 642ef8c45a
commit ef62eb7ebb

@ -66,7 +66,7 @@ export class GetKeyWordsServices implements EditorService
//更新上下文菜单的位置
private UpdateContextMenuPosition()
{
let menuHeight = this.keywordList.length * MENU_ITEM_HEIGHT + MENU_PADDING;
let menuHeight = Math.min(window.innerHeight, this.keywordList.length * MENU_ITEM_HEIGHT + MENU_PADDING);
if (this.ed.MouseCtrl._CurMousePointClient.y > window.innerHeight - menuHeight)
this.mousePositionY = this.ed.MouseCtrl._CurMousePointClient.y - menuHeight;

@ -28,6 +28,8 @@ export class KeyWordContextMenu extends React.Component<{ keywordStore?: GetKeyW
top: `${store.mousePositionY}px`,
cursor: "default",
zIndex: parseFloat(ZINDEX.RightMenu),
maxHeight: "100%",
overflow: "auto"
}
}
onMouseLeave={() => { this.props.keywordStore.m_ShowChildrenIndex = -1; }}

Loading…
Cancel
Save