Surfaces
Introduction
Surfaces are div
elements that surround other elements
and are designed to provide alignment onto a fixed coordinate.
var surface = new Surface(undefined, PrimitiveTools.$('#my-div-1'));
surface.setMode('point');
surface.top = 10;
surface.left = 200;
Types of Surfaces
There are four (4) types of surfaces: point, vertical, horizontal, area (default). Point surfaces only have a position with no width or height. Vertical surfaces only have height while horizontal ones only have width. Area surfaces (the default), allow you to specify both width and height in addition to position.
var surface = new Surface(undefined, PrimitiveTools.$('#my-div-1'));
surface.setMode('point');
surface.top = 10;
surface.left = 200;