Ortho > Documentation > Core - orthoLine

Ortho Documentation

Ortho Core JavaScript Classes
  orthoLine
   new orthoLine(parent, left, top, width, height [, options])
  parent: The parent Ortho object, typically a panel, in which the line will be placed
  left, top: The integer pixel coordinates within the panel that correspond to the TOP LEFT end of the line
  width, height: The width and height in pixels for the line.
  Lines can be Horizontal or Vertical. The same function is used to create both types. A horizontal line has a defined width and a height of 0. A vertical line has a width of 0 and defined height. The thickness of a line is defined in the associated CSS class, not here.
  options: A hash of options for this object. These can include the cssClass option which specifies a CSS class to use instead of the default for this object. Note that Horizontal lines use the default class '.orthoLineHorizontal' and vertical lines use '.orthoLineVertical'. The options hash is optional.
 
// Horizontal line - length 100px - at coordinate 50,50
var h_line = new orthoLine(panel, 50, 50, 100, 0);

// Vertical line - length 100px - at coordinate 50, 50
var v_line = new orthoLine(panel, 50, 50, 0, 100);
   
Click here for Usage Examples of orthoLine