1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix sidebar separator draggable

This commit is contained in:
Nick O'Leary 2019-05-02 17:03:09 +01:00
parent 90b167eba1
commit 1e35a6ce5e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -82,6 +82,7 @@ RED.sidebar = (function() {
var sidebarSeparator = {}; var sidebarSeparator = {};
sidebarSeparator.dragging = false; sidebarSeparator.dragging = false;
function setupSidebarSeparator() {
$("#red-ui-sidebar-separator").draggable({ $("#red-ui-sidebar-separator").draggable({
axis: "x", axis: "x",
start:function(event,ui) { start:function(event,ui) {
@ -180,6 +181,7 @@ RED.sidebar = (function() {
sidebarControls.hide(); sidebarControls.hide();
} }
}); });
}
function toggleSidebar(state) { function toggleSidebar(state) {
if (!state) { if (!state) {
@ -208,6 +210,7 @@ RED.sidebar = (function() {
} }
function init () { function init () {
setupSidebarSeparator();
sidebar_tabs = RED.tabs.create({ sidebar_tabs = RED.tabs.create({
element: $('<ul id="red-ui-sidebar-tabs"></ul>').appendTo("#red-ui-sidebar"), element: $('<ul id="red-ui-sidebar-tabs"></ul>').appendTo("#red-ui-sidebar"),
onchange:function(tab) { onchange:function(tab) {