mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Fix diagram event properties color
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
|||||||
<raphael-circle [center]="center" [radius]="radius" [strokeWith]="strokeWidth"></raphael-circle>
|
<raphael-circle [center]="center" [radius]="data.radius" [strokeWidth]="data.strokeWidth" [stroke]="data.stroke"
|
||||||
|
[fillColors]="data.fillColors" [fillOpacity]="data.fillOpacity"></raphael-circle>
|
||||||
+9
-1
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||||
|
import { DiagramColorService } from './services/diagram-color.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: module.id,
|
moduleId: module.id,
|
||||||
@@ -38,11 +39,18 @@ export class DiagramEventComponent {
|
|||||||
|
|
||||||
center: any = {};
|
center: any = {};
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef) {}
|
constructor(public elementRef: ElementRef,
|
||||||
|
private diagramColorService: DiagramColorService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.elementRef);
|
console.log(this.elementRef);
|
||||||
this.center.x = this.data.x + (this.data.width / 2);
|
this.center.x = this.data.x + (this.data.width / 2);
|
||||||
this.center.y = this.data.y + (this.data.height / 2);
|
this.center.y = this.data.y + (this.data.height / 2);
|
||||||
|
|
||||||
|
this.data.radius = this.radius;
|
||||||
|
this.data.strokeWidth = this.strokeWidth;
|
||||||
|
this.data.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||||
|
this.data.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||||
|
this.data.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -32,7 +32,16 @@ export class RaphaelCircleDirective extends RaphaelBase implements OnInit {
|
|||||||
radius: number;
|
radius: number;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
strokeWith: number;
|
strokeWidth: number;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillColors: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
stroke: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillOpacity: any;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
onError = new EventEmitter();
|
onError = new EventEmitter();
|
||||||
@@ -44,7 +53,7 @@ export class RaphaelCircleDirective extends RaphaelBase implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.elementRef);
|
console.log(this.elementRef);
|
||||||
let opts = {'stroke-width': this.strokeWith};
|
let opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||||
this.draw(this.center, this.radius, opts);
|
this.draw(this.center, this.radius, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user