mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
committed by
Eugenio Romano
parent
53d96679ea
commit
e39a2b149b
@@ -44,6 +44,7 @@ describe('Diagrams activities', () => {
|
||||
beforeEach(() => {
|
||||
jasmine.Ajax.install();
|
||||
component.processInstanceId = '38399';
|
||||
// cspell: disable-next
|
||||
component.processDefinitionId = 'fakeprocess:24:38399';
|
||||
component.metricPercentages = { startEvent: 0 };
|
||||
});
|
||||
|
@@ -81,7 +81,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -102,7 +102,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -123,7 +123,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -154,7 +154,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -178,7 +178,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -199,7 +199,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatwayActive] };
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -220,7 +220,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatwayCompleted] };
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -241,7 +241,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -262,7 +262,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatwayActive] };
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -283,7 +283,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatwayCompleted] };
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -304,7 +304,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -325,7 +325,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatwayActive] };
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -346,7 +346,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatwayCompleted] };
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -377,7 +377,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatway] };
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -408,7 +408,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatwayActive] };
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -439,7 +439,7 @@ describe('Diagrams gateways', () => {
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatwayCompleted] };
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -95,7 +95,7 @@ describe('Diagrams swim', () => {
|
||||
|
||||
let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes[2].value).toEqual('Beckend');
|
||||
expect(shapeText.attributes[2].value).toEqual('Backend');
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
@@ -137,7 +137,7 @@ describe('Diagrams swim', () => {
|
||||
|
||||
let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes[2].value).toEqual('Beckend');
|
||||
expect(shapeText.attributes[2].value).toEqual('Backend');
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
|
@@ -34,7 +34,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
|
||||
error = new EventEmitter();
|
||||
|
||||
ARROW_WIDTH = 4;
|
||||
SEQUENCEFLOW_STROKE = 1.5;
|
||||
SEQUENCE_FLOW_STROKE = 1.5;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
raphaelService: RaphaelService) {
|
||||
@@ -52,9 +52,9 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public drawLine(flow: any) {
|
||||
let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCEFLOW_STROKE, this.paper);
|
||||
let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCE_FLOW_STROKE, this.paper);
|
||||
polyline.element = this.paper.path(polyline.path);
|
||||
polyline.element.attr({'stroke-width': this.SEQUENCEFLOW_STROKE});
|
||||
polyline.element.attr({'stroke-width': this.SEQUENCE_FLOW_STROKE});
|
||||
polyline.element.attr({'stroke': '#585858'});
|
||||
|
||||
polyline.element.node.id = this.flow.id;
|
||||
@@ -75,7 +75,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
arrowHead.attr('fill', '#585858');
|
||||
|
||||
arrowHead.attr('stroke-width', this.SEQUENCEFLOW_STROKE);
|
||||
arrowHead.attr('stroke-width', this.SEQUENCE_FLOW_STROKE);
|
||||
arrowHead.attr('stroke', '#585858');
|
||||
|
||||
}
|
||||
|
@@ -78,8 +78,8 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
|
||||
let letterWidth = textPaper.getBBox().width / text.length;
|
||||
let removedLineBreaks = text.split('\n');
|
||||
let actualRowLength = 0, formattedText = [];
|
||||
removedLineBreaks.forEach(senteces => {
|
||||
let words = senteces.split(' ');
|
||||
removedLineBreaks.forEach(sentence => {
|
||||
let words = sentence.split(' ');
|
||||
words.forEach(word => {
|
||||
let length = word.length;
|
||||
if (actualRowLength + (length * letterWidth) > elementWidth) {
|
||||
|
@@ -61,8 +61,8 @@ export class RaphaelPentagonDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(center: Point, opts?: any) {
|
||||
let penta = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' +
|
||||
const shape = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' +
|
||||
' L 15.794545,8.389969 L 23.130481,13.720774 L 20.327514,22.344972 z').attr(opts);
|
||||
penta.transform('T' + (center.x + 4) + ',' + (center.y + 4));
|
||||
shape.transform('T' + (center.x + 4) + ',' + (center.y + 4));
|
||||
}
|
||||
}
|
||||
|
@@ -48,8 +48,6 @@ export class RaphaelService implements OnDestroy {
|
||||
throw new Error('insights configuration issue: Embedding Chart.js lib is mandatory');
|
||||
}
|
||||
let paper = new Raphael(ctx, this.width, this.height);
|
||||
// paper.setViewBox(0, 0, 583, 344.08374193550003, false);
|
||||
// paper.renderfix();
|
||||
return paper;
|
||||
}
|
||||
|
||||
|
@@ -72,7 +72,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all bound eventlisteners
|
||||
* Clear all bound event listeners
|
||||
*/
|
||||
ngOnDestroy() {
|
||||
window.removeEventListener('scroll', this.boundMouseLeaveAndScrollHandler, true);
|
||||
@@ -94,7 +94,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the tooltip's position and displays it
|
||||
* Calculates the tooltip position and displays it
|
||||
*
|
||||
* @param event mouseenter/touchend event
|
||||
*/
|
||||
|
Reference in New Issue
Block a user