mirror of https://github.com/node-red/node-red.git
Try to handle smaller screen sizes in tourGuide
parent
5329e803e2
commit
4422af26ec
|
@ -199,6 +199,11 @@ RED.tourGuide = (function() {
|
|||
shade.hide();
|
||||
throw new Error("Element not found")
|
||||
}
|
||||
if ($(window).width() < 400) {
|
||||
targetElement = $(".red-ui-editor");
|
||||
fullscreen = true;
|
||||
direction = "inset";
|
||||
}
|
||||
|
||||
zIndex = targetElement.css("z-index");
|
||||
if (!fullscreen) {
|
||||
|
@ -290,7 +295,7 @@ RED.tourGuide = (function() {
|
|||
if (fullscreen) {
|
||||
width = 500;
|
||||
}
|
||||
var maxWidth = Math.max(width || 0, 300);
|
||||
var maxWidth = Math.min($(window).width()-10,Math.max(width || 0, 300));
|
||||
if (!popover) {
|
||||
popover = RED.popover.create({
|
||||
target: targetElement,
|
||||
|
|
Loading…
Reference in New Issue