mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
@@ -0,0 +1 @@
|
||||
<diagram-event [data]="data" [options]="options" [iconFillColor]="iconFillColor"></diagram-event>
|
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
selector: 'diagram-end-event',
|
||||
templateUrl: './diagram-end-event.component.html'
|
||||
})
|
||||
export class DiagramEndEventComponent implements OnInit {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: ''};
|
||||
iconFillColor: any;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.options.radius = 14;
|
||||
this.options.strokeWidth = 4;
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
|
||||
this.iconFillColor = 'black';
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<raphael-circle [elementId]="data.id" [center]="center" [radius]="options.radius" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<diagram-container-icon-event [data]="data" [type]="data.eventDefinition && data.eventDefinition.type"
|
||||
[fillColor]="iconFillColor"></diagram-container-icon-event>
|
||||
<diagram-tooltip [data]="data"></diagram-tooltip>
|
@@ -0,0 +1,48 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'diagram-event',
|
||||
templateUrl: './diagram-event.component.html'
|
||||
})
|
||||
export class DiagramEventComponent implements OnInit {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Input()
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: ''};
|
||||
|
||||
@Input()
|
||||
iconFillColor: any;
|
||||
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
<diagram-event [data]="data" [options]="options" [iconFillColor]="iconFillColor"></diagram-event>
|
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
selector: 'diagram-start-event',
|
||||
templateUrl: './diagram-start-event.component.html'
|
||||
})
|
||||
export class DiagramStartEventComponent implements OnInit {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: ''};
|
||||
iconFillColor: any;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.options.radius = 15;
|
||||
this.options.strokeWidth = 1;
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
|
||||
this.iconFillColor = 'none';
|
||||
}
|
||||
}
|
33
lib/insights/diagram/components/events/index.ts
Normal file
33
lib/insights/diagram/components/events/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { DiagramEndEventComponent } from './diagram-end-event.component';
|
||||
import { DiagramEventComponent } from './diagram-event.component';
|
||||
import { DiagramStartEventComponent } from './diagram-start-event.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-event.component';
|
||||
export * from './diagram-start-event.component';
|
||||
export * from './diagram-end-event.component';
|
||||
|
||||
export const DIAGRAM_EVENTS_DIRECTIVES: any[] = [
|
||||
DiagramEventComponent,
|
||||
DiagramStartEventComponent,
|
||||
DiagramEndEventComponent
|
||||
];
|
Reference in New Issue
Block a user