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