Removed unused code

FEA: ItEr68S04BugFixing
This commit is contained in:
Lorenzo Tilve 2011-01-13 15:29:06 +01:00
parent 5df9b18a63
commit 5c173ee71d

View file

@ -92,156 +92,3 @@ zkPlanner.drawArrow = function(dependency, orig, dest) {
zkPlanner.drawArrowEndStart(dependency, orig, dest);
}
}
zkPlanner.drawArrowStartStart = function(arrow, orig, dest){
var xorig = orig[0] - zkTask.HALF_DEPENDENCY_PADDING;
var yorig = orig[1] - zkTask.CORNER_WIDTH/2 + zkTask.HALF_DEPENDENCY_PADDING;
var xend = dest[0] + zkTask.HALF_DEPENDENCY_PADDING;
var yend = dest[1] - zkTask.HALF_DEPENDENCY_PADDING;
if (yend < yorig) {
yorig = orig[1] + zkTask.DEPENDENCY_PADDING;
}
width1 = zkTask.CORNER_WIDTH;
width2 = Math.abs(xend - xorig) + zkTask.CORNER_WIDTH;
height = Math.abs(yend - yorig);
if (xorig > xend) {
width1 = width2;
width2 = zkTask.CORNER_WIDTH;
}
// First segment
var depstart = this.findImageElement(arrow, 'start');
depstart.style.left = (xorig - width1) + "px";
depstart.style.top = yorig + "px";
depstart.style.width = width1 + "px";
depstart.style.display = "inline";
// Second segment
var depmid = this.findImageElement(arrow, 'mid');
depmid.style.left = depstart.style.left;
if (yend > yorig) {
depmid.style.top = yorig + "px";
} else {
depmid.style.top = yend + "px";
}
depmid.style.height = height + "px";
// Third segment
var depend = this.findImageElement(arrow, 'end');
depend.style.left = depstart.style.left;
depend.style.top = yend + "px";
depend.style.width = width2 - zkTask.HALF_HEIGHT + "px";
var deparrow = this.findImageElement(arrow, 'arrow');
deparrow.src = this.getImagesDir()+"arrow.png";
deparrow.style.top = yend - zkTask.HALF_HEIGHT + "px";
deparrow.style.left = xend - 15 + "px";
}
zkPlanner.drawArrowEndEnd = function(arrow, orig, dest){
var xorig = orig[0] - zkTask.DEPENDENCY_PADDING;
var yorig = orig[1] - zkTask.CORNER_WIDTH/2 + zkTask.HALF_DEPENDENCY_PADDING;
var xend = dest[0] + zkTask.HALF_DEPENDENCY_PADDING;
var yend = dest[1] - zkTask.DEPENDENCY_PADDING;
width1 = Math.abs(xend - xorig) + zkTask.CORNER_WIDTH;
width2 = zkTask.CORNER_WIDTH;
height = Math.abs(yend - yorig);
if (xorig > xend) {
width2 = width1;
width1 = zkTask.CORNER_WIDTH;
}
// First segment
var depstart = this.findImageElement(arrow, 'start');
depstart.style.left = xorig + "px";
if (yend > yorig) {
depstart.style.top = yorig + "px";
} else {
depstart.style.top = yorig + zkTask.HEIGHT + "px";
}
depstart.style.width = width1 + "px";
depstart.style.display = "inline";
// Second segment
var depmid = this.findImageElement(arrow, 'mid');
depmid.style.left = (xorig + width1) + "px";
if (yend > yorig) {
depmid.style.top = yorig + "px";
} else {
depmid.style.top = yend + "px";
height = height + 10;
}
depmid.style.height = height + "px";
// Third segment
var depend = this.findImageElement(arrow, 'end');
depend.style.left = (xorig + width1 - width2) + "px";
depend.style.top = yend + "px";
depend.style.width = width2 + "px";
var deparrow = this.findImageElement(arrow, 'arrow');
deparrow.src = this.getImagesDir()+"arrow3.png";
deparrow.style.top = yend - 5 + "px";
deparrow.style.left = xend - 8 + "px";
}
zkPlanner.drawArrowEndStart = function(arrow, orig, dest){
var xorig = orig[0] - zkTask.DEPENDENCY_PADDING;
var yorig = orig[1] - zkTask.HALF_DEPENDENCY_PADDING;
var xend = dest[0] - zkTask.DEPENDENCY_PADDING;
var yend = dest[1] - zkTask.HALF_DEPENDENCY_PADDING;
var width = (xend - xorig);
var xmid = xorig + width;
// First segment not used
var depstart = this.findImageElement(arrow, 'start');
depstart.style.display = "none";
// Second segment not used
var depmid = this.findImageElement(arrow, 'mid');
if (yend > yorig) {
depmid.style.top = yorig + "px";
depmid.style.height = yend - yorig + "px";
} else {
depmid.style.top = yend + "px";
depmid.style.height = yorig - yend + "px";
}
depmid.style.left = xorig + "px";
var depend = this.findImageElement(arrow, 'end');
depend.style.top = yend + "px";
depend.style.left = xorig + "px";
depend.style.width = width + "px";
if (width < 0) {
depend.style.left = xend + "px";
depend.style.width = Math.abs(width) + "px";
}
var deparrow = this.findImageElement(arrow, 'arrow');
if ( width == 0 ) {
deparrow.src = this.getImagesDir()+"arrow2.png";
deparrow.style.top = yend - 10 + "px";
deparrow.style.left = xend - 5 + "px";
if ( yorig > yend ) {
deparrow.src = this.getImagesDir()+"arrow4.png";
deparrow.style.top = yend + "px";
}
} else {
deparrow.style.top = yend - 5 + "px";
deparrow.style.left = xend - 10 + "px";
deparrow.src = this.getImagesDir()+"arrow.png";
if (width < 0) {
deparrow.src = this.getImagesDir() + "arrow3.png";
deparrow.style.left = xend + "px";
deparrow.style.top = yend - 5 + "px";
}
}
}