Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

v5.3.2 — Layout View Switching Fix

Choose a tag to compare

@Roberdan Roberdan released this 22 Mar 10:50
· 209 commits to main since this release
96e2c35

Fixed

  • layout.showView() now toggles data-view children inside #mn-slot-center — previously only updated internal state without switching the visible view panel. Add data-view="<viewId>" to your center slot children.
  • syncDOM() uses live DOM queries — slot refs are no longer cached at createLayout() time. Fixes stale ref bug when slots are added to the DOM after initialization (common in framework consumers).
  • toggleStrip() / toggleLeft() / toggleRight() now reliably manipulate the DOM on all browsers including Safari/WebKit.

Consumer Pattern

<div id="mn-grid">
  <div id="mn-slot-strip">sidebar</div>
  <div id="mn-slot-center">
    <div data-view="dashboard">Dashboard</div>
    <div data-view="settings" hidden>Settings</div>
  </div>
</div>
const layout = Maranello.createLayout(grid);
layout.register('dashboard', { label: 'Dashboard' });
layout.register('settings', { label: 'Settings', fullpage: true });
layout.showView('dashboard'); // shows matching data-view, hides others

Full changelog: CHANGELOG.md