mirror of
https://github.com/node-red/node-red
synced 2024-11-21 23:48:30 +00:00
use workspace width to contain the search box
This commit is contained in:
parent
886fb45ad2
commit
b62c17f94b
@ -280,8 +280,8 @@ RED.typeSearch = (function() {
|
||||
opts.y = opts.y - 275;
|
||||
}
|
||||
const dialogWidth = dialog.width() || 300 // default is 300 (defined in class .red-ui-search)
|
||||
const mainWidth = $("#red-ui-main-container").width()
|
||||
if (mainWidth > dialogWidth && mainWidth - opts.x - dialogWidth < 0) {
|
||||
const workspaceWidth = $('#red-ui-workspace').width()
|
||||
if (workspaceWidth > dialogWidth && workspaceWidth - opts.x - dialogWidth < 0) {
|
||||
opts.x = opts.x - (dialogWidth - RED.view.node_width)
|
||||
}
|
||||
dialog.css({left:opts.x+"px",top:opts.y+"px"}).show();
|
||||
|
Loading…
Reference in New Issue
Block a user