mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
#1052 - added tooltip component for diagram
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-tooltip',
|
||||
templateUrl: './diagram-tooltip.component.html',
|
||||
styleUrls: ['./diagram-tooltip-style.css']
|
||||
})
|
||||
export class DiagramTooltip {
|
||||
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
getTooltipHeader(data: any) {
|
||||
let headerValue = data.name || data.id;
|
||||
return data.type + ' ' + headerValue;
|
||||
}
|
||||
|
||||
getTooltipMessage(data: any) {
|
||||
return (data.value !== undefined && data.value !== null ) ? data.value + ' ' + data.dataType : '';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user