Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public draw() {
this.sortJobs();
const color = Raphael.getColor();
// calculate label offset
for (const job of this.jobs) {
const l = this.r.text(0, 0, job.name)
.attr({
"font": '13px Helvetica, Arial',
"font-weight": "bold",
"fill": "#676a6c"
});
const width = l.getBBox().width;
l.hide();
if (width > this.labelOffset) {
this.labelOffset = width + this.box_padding + this.box_width;
}
}
draw() {
this.sortJobs()
const color = Raphael.getColor()
// calculate label offset
for (const job of this.jobs) {
const l = this.r.text(0, 0, job.name)
.attr({
'font': '13px Helvetica, Arial',
'font-weight': 'bold',
'fill': '#676a6c'
})
const width = l.getBBox().width
l.hide()
if (width > this.labelOffset) {
this.labelOffset = width + this.box_padding + this.box_width
}
}
function cb() {
// The stroke object may have been already erased when we reach this timeout
if (stroke.object.path === null) {
return;
}
let color = options.stroke.attr.stroke;
if (options.stroke.attr.stroke === 'random') {
color = Raphael.getColor();
}
// Revert back to the default color.
stroke.object.path.node.style.stroke = color;
stroke.object.path.node.style.transition = stroke.object.path.node.style.WebkitTransition =
'stroke 400ms ease';
timeouts.shift();
}
draw() {
this.sortJobs()
const color = Raphael.getColor()
// calculate label offset
for (const job of this.jobs) {
const l = this.r.text(0, 0, job.name)
.attr({
'font': '13px Helvetica, Arial',
'font-weight': 'bold',
'fill': '#676a6c'
})
const width = l.getBBox().width
l.hide()
if (width > this.labelOffset) {
this.labelOffset = width + this.box_padding + this.box_width
}
}