Commit 52979107 authored by Lukasz Starosta's avatar Lukasz Starosta

Mount tooltip and footer after widget

parent 918806e8
Pipeline #195742664 passed with stages
in 6 minutes and 16 seconds
{
"name": "@tecnojest/widget-base",
"version": "1.4.42",
"version": "1.4.43",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "@tecnojest/widget-base",
"author": "Tecnojest srl https://www.invidea.it",
"version": "1.4.42",
"version": "1.4.43",
"publishConfig": {
"registry": "https://npm.invidea.it"
},
......
......@@ -448,14 +448,17 @@ export default class EmbeddableWidget {
elementUid: UID;
state: State;
}): void {
let Footer: HTMLElement | undefined;
let Tooltip: HTMLDivElement | undefined;
if (parentElement) {
document.querySelector(parentElement).appendChild(el);
} else {
document.body.appendChild(el);
}
EmbeddableWidget.addElement(el, elementUid);
EmbeddableWidget.resetState(elementUid, state, props);
let Footer: HTMLElement | undefined;
let Tooltip: HTMLDivElement | undefined;
if (EmbeddableWidget.options.appendFooter) Footer = createFooter();
if (EmbeddableWidget.options.appendTooltip) {
......@@ -472,11 +475,8 @@ export default class EmbeddableWidget {
});
}
if (Footer) el.appendChild(Footer);
if (Tooltip) el.appendChild(Tooltip);
EmbeddableWidget.addElement(el, elementUid);
EmbeddableWidget.resetState(elementUid, state, props);
}
function resolve(): void {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment