Positioning
The block of texts can be positioned using the x
and y
properties. If a value is applied to the y
property, then by default the element will be positioned relative to its previous position. That is from its pre-calculated position.
In order to absolutely position the block use fromCurrentPosition:{y:false}
.
<div id="vara-container"></div>
var vara = new Vara("#vara-container","SatisfySL.json",[{
text:"Hello World!!",
y:50
},{
text:"Relative Positioning",
y:50
},{
text:"Absolute Positioned",
y:0,
color:"red",
fromCurrentPosition:{y:false}
}],{
fontSize:36,
strokeWidth:2
});