mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Move the icons options as input parameters
This commit is contained in:
parent
e14876f8a7
commit
a93f72cf37
@ -1 +1,2 @@
|
|||||||
<raphael-icon-send [position]="position"></raphael-icon-send>
|
<raphael-icon-send [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||||
|
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-send>
|
@ -33,10 +33,14 @@ export class DiagramIconSendTaskComponent {
|
|||||||
|
|
||||||
position: any;
|
position: any;
|
||||||
|
|
||||||
|
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef,
|
constructor(public elementRef: ElementRef,
|
||||||
private diagramColorService: DiagramColorService) {}
|
private diagramColorService: DiagramColorService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||||
|
this.options.stroke = 'none' ;
|
||||||
|
this.options.fillColors = '#16964d' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1,2 @@
|
|||||||
<raphael-icon-service [position]="position"></raphael-icon-service>
|
<raphael-icon-service [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||||
|
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-service>
|
@ -33,10 +33,14 @@ export class DiagramIconServiceTaskComponent {
|
|||||||
|
|
||||||
position: any;
|
position: any;
|
||||||
|
|
||||||
|
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef,
|
constructor(public elementRef: ElementRef,
|
||||||
private diagramColorService: DiagramColorService) {}
|
private diagramColorService: DiagramColorService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||||
|
this.options.stroke = 'none' ;
|
||||||
|
this.options.fillColors = '#72a7d0' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1,2 @@
|
|||||||
<raphael-icon-user [position]="position"></raphael-icon-user>
|
<raphael-icon-user [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||||
|
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-user>
|
@ -33,10 +33,14 @@ export class DiagramIconUserTaskComponent {
|
|||||||
|
|
||||||
position: any;
|
position: any;
|
||||||
|
|
||||||
|
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef,
|
constructor(public elementRef: ElementRef,
|
||||||
private diagramColorService: DiagramColorService) {}
|
private diagramColorService: DiagramColorService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||||
|
this.options.stroke = 'none' ;
|
||||||
|
this.options.fillColors = '#d1b575' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,18 @@ export class RaphaelIconSendDirective extends RaphaelBase implements OnInit {
|
|||||||
@Output()
|
@Output()
|
||||||
onError = new EventEmitter();
|
onError = new EventEmitter();
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
strokeWidth: number;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillColors: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
stroke: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillOpacity: any;
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef,
|
constructor(public elementRef: ElementRef,
|
||||||
raphaelService: RaphaelService) {
|
raphaelService: RaphaelService) {
|
||||||
super(elementRef, raphaelService);
|
super(elementRef, raphaelService);
|
||||||
@ -47,8 +59,8 @@ export class RaphaelIconSendDirective extends RaphaelBase implements OnInit {
|
|||||||
public draw(position: Point) {
|
public draw(position: Point) {
|
||||||
let path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
|
let path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
|
||||||
L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({
|
L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({
|
||||||
'stroke': 'none',
|
'stroke': this.stroke,
|
||||||
'fill': '#16964d'
|
'fill': this.fillColors
|
||||||
});
|
});
|
||||||
return path1.transform('T' + position.x + ',' + position.y);
|
return path1.transform('T' + position.x + ',' + position.y);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,18 @@ export class RaphaelIconServiceDirective extends RaphaelBase implements OnInit {
|
|||||||
@Output()
|
@Output()
|
||||||
onError = new EventEmitter();
|
onError = new EventEmitter();
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
strokeWidth: number;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillColors: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
stroke: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillOpacity: any;
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef,
|
constructor(public elementRef: ElementRef,
|
||||||
raphaelService: RaphaelService) {
|
raphaelService: RaphaelService) {
|
||||||
super(elementRef, raphaelService);
|
super(elementRef, raphaelService);
|
||||||
@ -64,8 +76,8 @@ export class RaphaelIconServiceDirective extends RaphaelBase implements OnInit {
|
|||||||
' 10.5,2.875 10.5,2.875 L 10,1 8,1 z m 1,5 c 1.656854,0 3,1.3431458 3,3 0,1.656854 -1.343146,3 -3,3 C 7.3431458,12' +
|
' 10.5,2.875 10.5,2.875 L 10,1 8,1 z m 1,5 c 1.656854,0 3,1.3431458 3,3 0,1.656854 -1.343146,3 -3,3 C 7.3431458,12' +
|
||||||
' 6,10.656854 6,9 6,7.3431458 7.3431458,6 9,6 z').attr({
|
' 6,10.656854 6,9 6,7.3431458 7.3431458,6 9,6 z').attr({
|
||||||
'opacity': 1,
|
'opacity': 1,
|
||||||
'stroke': 'none',
|
'stroke': this.stroke,
|
||||||
'fill': '#72a7d0'
|
'fill': this.fillColors
|
||||||
});
|
});
|
||||||
return path1.transform('T' + position.x + ',' + position.y);
|
return path1.transform('T' + position.x + ',' + position.y);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,18 @@ export class RaphaelIconUserDirective extends RaphaelBase implements OnInit {
|
|||||||
@Output()
|
@Output()
|
||||||
onError = new EventEmitter();
|
onError = new EventEmitter();
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
strokeWidth: number;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillColors: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
stroke: any;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
fillOpacity: any;
|
||||||
|
|
||||||
constructor(public elementRef: ElementRef,
|
constructor(public elementRef: ElementRef,
|
||||||
raphaelService: RaphaelService) {
|
raphaelService: RaphaelService) {
|
||||||
super(elementRef, raphaelService);
|
super(elementRef, raphaelService);
|
||||||
@ -49,8 +61,8 @@ export class RaphaelIconUserDirective extends RaphaelBase implements OnInit {
|
|||||||
l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c
|
l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c
|
||||||
0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17`).attr({
|
0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17`).attr({
|
||||||
'opacity': 1,
|
'opacity': 1,
|
||||||
'stroke': 'none',
|
'stroke': this.stroke,
|
||||||
'fill': '#d1b575'
|
'fill': this.fillColors
|
||||||
});
|
});
|
||||||
return path1.transform('T' + position.x + ',' + position.y);
|
return path1.transform('T' + position.x + ',' + position.y);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user