UNPKG

basicprimitives

Version:

Basic Primitives Diagrams for JavaScript - data visualization components library that implements organizational chart and multi-parent dependency diagrams, contains implementations of JavaScript Controls and PDF rendering plugins.

21 lines (15 loc) 631 B
import Rect from './Rect'; import { LabelType, TextOrientationType, HorizontalAlignmentType, VerticalAlignmentType } from '../../enums'; export default function Label() { this.text = null; this.position = null; // Rect this.weight = 0; this.isActive = true; this.labelType = LabelType.Regular; this.labelOrientation = TextOrientationType.Horizontal; this.horizontalAlignmentType = HorizontalAlignmentType.Center; this.verticalAlignmentType = VerticalAlignmentType.Bottom; this.parent = Rect.prototype; this.parent.constructor.apply(this, arguments); }; Label.prototype = new Rect();