Skip to content
Snippets Groups Projects
text-field-simple-element.ts 696 B
Newer Older
  • Learn to ignore specific revisions
  • import {
      FontElement,
      FontProperties,
      InputElement,
      SurfaceElement,
      SurfaceProperties,
      UIElement
    } from '../../models/uI-element';
    import { initFontElement, initSurfaceElement } from '../../util/unit-interface-initializer';
    
    export class TextFieldSimpleElement extends InputElement implements FontElement, SurfaceElement{
      fontProps: FontProperties;
      surfaceProps: SurfaceProperties;
    
    rhenck's avatar
    rhenck committed
    
      constructor(serializedElement: UIElement) {
        super(serializedElement);
        Object.assign(this, serializedElement);
    
        this.fontProps = initFontElement(serializedElement);
        this.surfaceProps = initSurfaceElement(serializedElement);
    
    
        this.height = serializedElement.height || 25;