Class LayoutStylesAssembler

java.lang.Object
io.meeds.layout.service.LayoutStylesAssembler

public class LayoutStylesAssembler extends Object
Writes the styling of a set_layout_styles call, or the device visibility of a set_layout_visibility call, onto a stored page or site tree, for one call, leaving its structure and every element the call does not address as stored. The elements addressed are the ones the read gives an id to and offers styling for: on a page built with the editor's sections, a section and an application of a dynamic column or of a grid cell; on a site, a topbar, a bottom bar, a sidebar by the id of the cell the read answers, and an application of one of them. Each one takes the call's blocks merged over its stored styling, written for its place in the editor's matrix, as the two layout assemblers write them; every other application the caller can see is saved with its generated margin and radius tokens stripped, as the two assemblers save theirs. A grid cell, which the editor styles through its section and its application, is refused, and so is a device visibility given to set_layout_styles or a styling given to set_layout_visibility; an id the read does not answer, an element the caller cannot see included, does not exist. A device visibility is written as the editor writes it, on the element's own class: a section hidden on a device hides what it holds there through the page's styles, whatever its applications are set to. A grid section, which the editor offers no visibility, refuses a hiding and takes both as it already is.