Description
The second part of QDLayout.js project is a parser, that takes a pair of input data,
a JSON description that defines elements, layouts used in a web page, and a JSON data model,
that defines the content of these elements.
Example
If you define this data model:
\{
"data" : "CONTENT"
}
And a simple layout:
\{
"text" : \{
"text" : ".data",
"fontsize" : "16px",
"position" : "top",
"color" : "#000000"
}
}
You define a piece of code:
var aDataModel = \{
"data" : "CONTENT"
};
var aLayoutParser = new LayoutParser();
var aSimpleLayout = aLayoutParser.load("./res/text/parser/example.json",aDataModel);
The result is: