mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
committed by
Eugenio Romano
parent
53d96679ea
commit
e39a2b149b
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user