mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
[outliner] Fix positioning of tips box
This commit is contained in:
@@ -28,6 +28,7 @@ RED.sidebar.info = (function() {
|
||||
|
||||
var selectedObject;
|
||||
|
||||
var tipContainer;
|
||||
var tipBox;
|
||||
|
||||
// TODO: remove this
|
||||
@@ -36,8 +37,10 @@ RED.sidebar.info = (function() {
|
||||
};
|
||||
|
||||
function resizeStack() {
|
||||
var h = $(content).parent().height();
|
||||
panels.resize(h)
|
||||
if (panels) {
|
||||
var h = $(content).parent().height() - tipContainer.outerHeight();
|
||||
panels.resize(h)
|
||||
}
|
||||
}
|
||||
function init() {
|
||||
|
||||
@@ -119,7 +122,7 @@ RED.sidebar.info = (function() {
|
||||
|
||||
|
||||
// Tip Box
|
||||
var tipContainer = $('<div class="red-ui-help-tips"></div>').appendTo(content);
|
||||
tipContainer = $('<div class="red-ui-help-tips"></div>').appendTo(content);
|
||||
tipBox = $('<div class="red-ui-help-tip"></div>').appendTo(tipContainer);
|
||||
var tipButtons = $('<div class="red-ui-help-tips-buttons"></div>').appendTo(tipContainer);
|
||||
|
||||
@@ -503,6 +506,7 @@ RED.sidebar.info = (function() {
|
||||
}
|
||||
function startTips() {
|
||||
$(".red-ui-sidebar-info").addClass('show-tips');
|
||||
resizeStack();
|
||||
if (enabled) {
|
||||
if (!startTimeout && !refreshTimeout) {
|
||||
if (tipCount === -1) {
|
||||
@@ -516,6 +520,7 @@ RED.sidebar.info = (function() {
|
||||
}
|
||||
function stopTips() {
|
||||
$(".red-ui-sidebar-info").removeClass('show-tips');
|
||||
resizeStack();
|
||||
clearInterval(refreshTimeout);
|
||||
clearTimeout(startTimeout);
|
||||
refreshTimeout = null;
|
||||
|
Reference in New Issue
Block a user