Read/write a widget instance's geometry in the embedded item shape:
%{
"id" => "…", "widget_key" => "…", "settings" => %{…}, "view" => "…",
"pixel" => %{"fx" => .., "fy" => .., "fw" => .., "fh" => ..}, # pixel canvas
"bp" => %{"desktop" => %{"w" => .., "h" => .., "hidden" => ..}} # grid, per breakpoint
}Pixel dashboards use pixel; grid dashboards use bp[<breakpoint>] (flow order
= list position). Keeping geometry embedded per widget means add/remove is
atomic — no separate placement map to keep in sync.
Accessors default missing values and fall back to the legacy flat shape
("fx"/"w"/"h"… directly on the item) so pre-refactor local dashboards keep
rendering; a put_* write upgrades that widget to the nested shape.
Summary
Functions
Whether the widget is hidden on a breakpoint.
The widget's pixel-canvas geometry (fx/fy/fw/fh), defaulted.
The widget's grid placement (w/h/hidden) for a breakpoint, defaulted.
Set pixel geometry (string-keyed attrs), upgrading the item to nested shape.
Set a breakpoint's grid placement, upgrading the item to nested shape.
Functions
The widget's pixel-canvas geometry (fx/fy/fw/fh), defaulted.
The widget's grid placement (w/h/hidden) for a breakpoint, defaulted.
Set pixel geometry (string-keyed attrs), upgrading the item to nested shape.
Set a breakpoint's grid placement, upgrading the item to nested shape.