From e88600afc3340d2027ba3f6b70b017257eed659c Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sat, 27 Nov 2021 20:39:49 +0100 Subject: [PATCH] Add header buttons directly to the parent element. --- website/o3dv/js/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/o3dv/js/utils.js b/website/o3dv/js/utils.js index 5bcddc4..3f7bdd1 100644 --- a/website/o3dv/js/utils.js +++ b/website/o3dv/js/utils.js @@ -136,7 +136,7 @@ OV.SetSvgIconImageElement = function (iconElement, iconName) iconDiv.className = 'icon icon-' + iconName; }; -OV.CreateHeaderButton = function (iconName, title, link) +OV.CreateHeaderButton = function (parentElement, iconName, title, link) { let buttonLink = OV.CreateDomElement ('a'); buttonLink.setAttribute ('href', link); @@ -144,6 +144,7 @@ OV.CreateHeaderButton = function (iconName, title, link) buttonLink.setAttribute ('rel', 'noopener noreferrer'); OV.InstallTooltip (buttonLink, title); OV.AddSvgIconElement (buttonLink, iconName, 'header_button'); + parentElement.appendChild (buttonLink); return buttonLink; };