Skip to content
Snippets Groups Projects
Commit 5ab1d722 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

The info area now also supports additional images.

parent 02140bc5
No related branches found
No related tags found
No related merge requests found
...@@ -74,13 +74,22 @@ class NodeInfoOverlay { ...@@ -74,13 +74,22 @@ class NodeInfoOverlay {
className: "detail-view-headline", className: "detail-view-headline",
}); });
const infoImageArea = Helpers.createDiv(
"detail-view-media-area",
infoArea
);
Helpers.createHTMLElement("img", infoImageArea, {
id: "infoAreaInfoImage",
src: Config.PLUGIN_PATH + "datasets/images/default.jpg",
});
const textArea = Helpers.createDiv("detail-view-text-area", infoArea); const textArea = Helpers.createDiv("detail-view-text-area", infoArea);
Helpers.createHTMLElement("p", textArea, { Helpers.createHTMLElement("p", textArea, {
id: "infoOverlayDescription", id: "infoOverlayDescription",
innerText: "Default Text", innerText: "Default Text",
}); });
const videoDiv = Helpers.createDiv("detail-view-video-area", infoArea); const videoDiv = Helpers.createDiv("detail-view-media-area", infoArea);
const video = document.createElement("video"); const video = document.createElement("video");
video.id = "infoOverlayVideo"; video.id = "infoOverlayVideo";
...@@ -111,10 +120,7 @@ class NodeInfoOverlay { ...@@ -111,10 +120,7 @@ class NodeInfoOverlay {
//jQuery("#infoOverlayImage").removeClass("hidden-tab"); //jQuery("#infoOverlayImage").removeClass("hidden-tab");
const overlayImage = jQuery("#infoOverlayImage"); const overlayImage = jQuery("#infoOverlayImage");
overlayImage.show(); overlayImage.show();
overlayImage.attr( overlayImage.attr("src", node.image);
"src",
Config.PLUGIN_PATH + "datasets/images/" + node.image
);
} else { } else {
headline.css("margin-top", "25px"); headline.css("margin-top", "25px");
jQuery("#infoOverlayImage").hide(); jQuery("#infoOverlayImage").hide();
...@@ -124,6 +130,14 @@ class NodeInfoOverlay { ...@@ -124,6 +130,14 @@ class NodeInfoOverlay {
// ); // );
} }
const infoImage = jQuery("#infoAreaInfoImage");
if ("infoImage" in node) {
infoImage.show();
infoImage.attr("src", node.infoImage);
} else {
infoImage.hide();
}
if ("description" in node) { if ("description" in node) {
jQuery("#infoOverlayDescription").text(node.description); jQuery("#infoOverlayDescription").text(node.description);
} else { } else {
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
.detail-view-text-area { .detail-view-text-area {
display: block; display: block;
margin-top: 10px;
padding-left: 25px; padding-left: 25px;
padding-right: 25px; padding-right: 25px;
/*padding-bottom: 130px;*/ /*padding-bottom: 130px;*/
...@@ -124,7 +125,7 @@ ...@@ -124,7 +125,7 @@
padding-right: 5px; padding-right: 5px;
} }
.detail-view-video-area { .detail-view-media-area {
width: 100%; width: 100%;
margin-top: 15px; margin-top: 15px;
padding: 10px; padding: 10px;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment