File

src/app/shared/flo/decoration/decoration.component.ts

Description

Component for displaying application properties and capturing their values.

Extends

ElementComponent

Example

Metadata

encapsulation ViewEncapsulation.None
selector app-flo-decoration
styleUrls decoration.component.scss
templateUrl decoration.component.html

Index

Methods
Accessors

Methods

getMessages
getMessages()
Returns : Array<string>

Accessors

kind
getkind()
Returns : string
import { Component, ViewEncapsulation } from '@angular/core';
import { dia } from 'jointjs';
import { ElementComponent } from '../support/shape-component';

/**
 * Component for displaying application properties and capturing their values.
 *
 * @author Alex Boyko
 * @author Andy Clement
 */
@Component({
  selector: 'app-flo-decoration',
  templateUrl: 'decoration.component.html',
  styleUrls: [ 'decoration.component.scss' ],
  encapsulation: ViewEncapsulation.None
})
export class DecorationComponent extends ElementComponent {

  getMessages(): Array<string> {
    return this.view && Array.isArray(this.view.model.attr('messages')) ? this.view.model.attr('messages') : [];
  }

  get kind(): string {
    return this.view ? this.view.model.attr('./kind') : '';
  }

}

<svg:g class="rotatable" [tooltip]="markerTooltip" placement="right"
       containerClass="{{ kind + '-marker-tooltip' }}" container="body">
  <svg:g class="scalable">
    <svg:image/>
  </svg:g>
</svg:g>

<ng-template #markerTooltip>
  <ul class="marker-tooltip">
    <li *ngFor="let msg of getMessages()">{{ msg }}</li>
  </ul>
</ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""