Skip to content
Snippets Groups Projects

Issue #3486050 by grimreaper, pdureau: POC Layout Builder: fix d&d and UI Styles support

Merged Issue #3486050 by grimreaper, pdureau: POC Layout Builder: fix d&d and UI Styles support
1 unresolved thread
1 unresolved thread
Files
2
@@ -4,7 +4,6 @@ namespace Drupal\ui_patterns_layouts\Element;
use Drupal\Core\Render\Element;
use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Template\Attribute;
/**
* Alter the rendering of a component element.
@@ -39,9 +38,8 @@ class ComponentAlterer implements TrustedCallbackInterface {
foreach (Element::children($element[$region_id]) as $block_id) {
$element["#slots"][$region_id][$block_id] = $element[$region_id][$block_id];
}
if (isset($element[$region_id]['#attributes']) && isset($element['#slots'][$region_id])) {
$element['#region_attributes'][$region_id] = new Attribute($element[$region_id]['#attributes']);
// Support for drag&drop and other attributes manipulation.
// Support for drag&drop and other attributes manipulation in preview.
if ($element['#layout']->isInPreview() && isset($element[$region_id]['#attributes']) && isset($element['#slots'][$region_id])) {
$element['#slots'][$region_id] = [
'#type' => 'html_tag',
'#tag' => 'div',
Loading