Skip to content
Snippets Groups Projects
Commit 036adb45 authored by Justin Toupin's avatar Justin Toupin
Browse files

Dispatch event when a component is selected.

parent 27895143
No related branches found
No related tags found
No related merge requests found
Pipeline #435789 failed
...@@ -147,6 +147,11 @@ ...@@ -147,6 +147,11 @@
// Add the data-active attribute to the element. // Add the data-active attribute to the element.
element.setAttribute('data-active', 'true'); element.setAttribute('data-active', 'true');
element.setAttribute('data-active-within', 'true'); element.setAttribute('data-active-within', 'true');
// @Todo: Consider a different event name.
dispatch(element, 'lpb-component:focus', {
componentUuid: element.getAttribute('data-uuid'),
layoutId: element.closest(`[${idAttr}]`).getAttribute(idAttr),
});
setUiElementVisibility(); setUiElementVisibility();
setControlsPosition(); setControlsPosition();
// Add the data-active-within attribute to all parent elements. // Add the data-active-within attribute to all parent elements.
......
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