mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#1052 - start adding tooltip to diagram elements
This commit is contained in:
@@ -20,7 +20,7 @@ import { Point } from './models/point';
|
||||
import { RaphaelBase } from './raphael-base';
|
||||
import { RaphaelService } from './raphael.service';
|
||||
|
||||
@Directive({selector: 'raphael-rect'})
|
||||
@Directive({ selector: 'raphael-rect' })
|
||||
export class RaphaelRectDirective extends RaphaelBase implements OnInit {
|
||||
@Input()
|
||||
paper: any;
|
||||
@@ -49,6 +49,9 @@ export class RaphaelRectDirective extends RaphaelBase implements OnInit {
|
||||
@Input()
|
||||
fillOpacity: any;
|
||||
|
||||
@Input()
|
||||
elementId: string;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
@@ -59,8 +62,14 @@ export class RaphaelRectDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.elementRef);
|
||||
let opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
this.draw(this.leftCorner, this.width, this.height, this.radius, opts);
|
||||
let opts = {
|
||||
'stroke-width': this.strokeWidth,
|
||||
'fill': this.fillColors,
|
||||
'stroke': this.stroke,
|
||||
'fill-opacity': this.fillOpacity
|
||||
};
|
||||
let elementDraw = this.draw(this.leftCorner, this.width, this.height, this.radius, opts);
|
||||
elementDraw.node.id = this.elementId;
|
||||
}
|
||||
|
||||
public draw(leftCorner: Point, width: number, height: number, radius: number, opts: any) {
|
||||
|
Reference in New Issue
Block a user