mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -0,0 +1,6 @@
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusInner" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-circle [elementId]="data.id" [center]="center" [radius]="circleRadiusOuter" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<diagram-container-icon-event [data]="data" [type]="data.eventDefinition.type" [fillColor]="signalFillColor"></diagram-container-icon-event>
|
||||
<diagram-tooltip [data]="data"></diagram-tooltip>
|
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* @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-boundary-event',
|
||||
templateUrl: './diagram-boundary-event.component.html'
|
||||
})
|
||||
export class DiagramBoundaryEventComponent implements OnInit {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 1};
|
||||
|
||||
signalFillColor: string;
|
||||
|
||||
circleRadiusInner: number;
|
||||
circleRadiusOuter: number;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
|
||||
this.circleRadiusInner = 12;
|
||||
this.circleRadiusOuter = 15;
|
||||
|
||||
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.signalFillColor = 'none';
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusInner" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-circle [elementId]="data.id" [center]="center" [radius]="circleRadiusOuter" [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]="signalFillColor"></diagram-container-icon-event>
|
||||
<diagram-tooltip [data]="data"></diagram-tooltip>
|
@@ -0,0 +1,59 @@
|
||||
/*!
|
||||
* @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-throw-event',
|
||||
templateUrl: './diagram-throw-event.component.html'
|
||||
})
|
||||
export class DiagramThrowEventComponent implements OnInit {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
error = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 1};
|
||||
|
||||
signalFillColor: string;
|
||||
|
||||
circleRadiusInner: number;
|
||||
circleRadiusOuter: number;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
|
||||
this.circleRadiusInner = 12;
|
||||
this.circleRadiusOuter = 15;
|
||||
|
||||
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.signalFillColor = 'black';
|
||||
}
|
||||
}
|
30
lib/insights/diagram/components/boundary-events/index.ts
Normal file
30
lib/insights/diagram/components/boundary-events/index.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @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 { DiagramBoundaryEventComponent } from './diagram-boundary-event.component';
|
||||
import { DiagramThrowEventComponent } from './diagram-throw-event.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-boundary-event.component';
|
||||
export * from './diagram-throw-event.component';
|
||||
|
||||
export const DIAGRAM_BOUNDARY_EVENTS_DIRECTIVES: any[] = [
|
||||
DiagramBoundaryEventComponent,
|
||||
DiagramThrowEventComponent
|
||||
];
|
Reference in New Issue
Block a user