diff --git a/build/bundle.js b/build/bundle.js index d8218a61..c3ad5dde 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -17140,8 +17140,7 @@ var VisBranch = VisBase.extend({ if (!this.get('gitVisuals').getIsGoalVis()) { return ''; } - - return (this.getIsLevelBranchCompared()) ? '' : '- '; + return (this.getIsLevelBranchCompared()) ? '' : '--'; }, getIsGoalAndNotCompared: function() { @@ -17520,6 +17519,24 @@ var VisBranch = VisBase.extend({ }); }, + getArrowOpacity: function() { + if (this.getIsGoalAndNotCompared() && + !this.get('isHead') && + this.getBranchStackIndex() === 0) { + return 0.5; + } + return this.getNonTextOpacity(); + }, + + getRectOpacity: function() { + if (this.getIsGoalAndNotCompared() && + !this.get('isHead') && + this.getBranchStackIndex() === 0) { + return 0.8; + } + return this.getNonTextOpacity(); + }, + getNonTextOpacity: function() { if (this.get('isHead')) { return this.gitEngine.getDetachedHead() ? 1 : 0; @@ -17537,14 +17554,21 @@ var VisBranch = VisBase.extend({ } if (this.getIsGoalAndNotCompared()) { - return 0.3; + return (this.getBranchStackIndex() === 0) ? 0.7 : 0.3; } return 1; }, + getStrokeWidth: function() { + if (this.getIsGoalAndNotCompared()) { + return this.get('stroke-width') / 5.0; + } + + return this.get('stroke-width'); + }, + getAttributes: function() { - var nonTextOpacity = this.getNonTextOpacity(); var textOpacity = this.getTextOpacity(); this.updateName(); @@ -17572,19 +17596,20 @@ var VisBranch = VisBase.extend({ y: rectPos.y, width: rectSize.w, height: rectSize.h, - opacity: nonTextOpacity, + opacity: this.getRectOpacity(), fill: this.getFill(), stroke: this.get('stroke'), 'stroke-dasharray': dashArray, - 'stroke-width': this.get('stroke-width') + 'stroke-width': this.getStrokeWidth() }, arrow: { path: arrowPath, - opacity: nonTextOpacity, + opacity: this.getArrowOpacity(), fill: this.getFill(), stroke: this.get('stroke'), transform: this.getArrowTransform(), - 'stroke-width': this.get('stroke-width') + 'stroke-dasharray': dashArray, + 'stroke-width': this.getStrokeWidth() } }; }, @@ -33744,8 +33769,7 @@ var VisBranch = VisBase.extend({ if (!this.get('gitVisuals').getIsGoalVis()) { return ''; } - - return (this.getIsLevelBranchCompared()) ? '' : '- '; + return (this.getIsLevelBranchCompared()) ? '' : '--'; }, getIsGoalAndNotCompared: function() { @@ -34124,6 +34148,24 @@ var VisBranch = VisBase.extend({ }); }, + getArrowOpacity: function() { + if (this.getIsGoalAndNotCompared() && + !this.get('isHead') && + this.getBranchStackIndex() === 0) { + return 0.5; + } + return this.getNonTextOpacity(); + }, + + getRectOpacity: function() { + if (this.getIsGoalAndNotCompared() && + !this.get('isHead') && + this.getBranchStackIndex() === 0) { + return 0.8; + } + return this.getNonTextOpacity(); + }, + getNonTextOpacity: function() { if (this.get('isHead')) { return this.gitEngine.getDetachedHead() ? 1 : 0; @@ -34141,14 +34183,21 @@ var VisBranch = VisBase.extend({ } if (this.getIsGoalAndNotCompared()) { - return 0.3; + return (this.getBranchStackIndex() === 0) ? 0.7 : 0.3; } return 1; }, + getStrokeWidth: function() { + if (this.getIsGoalAndNotCompared()) { + return this.get('stroke-width') / 5.0; + } + + return this.get('stroke-width'); + }, + getAttributes: function() { - var nonTextOpacity = this.getNonTextOpacity(); var textOpacity = this.getTextOpacity(); this.updateName(); @@ -34176,19 +34225,20 @@ var VisBranch = VisBase.extend({ y: rectPos.y, width: rectSize.w, height: rectSize.h, - opacity: nonTextOpacity, + opacity: this.getRectOpacity(), fill: this.getFill(), stroke: this.get('stroke'), 'stroke-dasharray': dashArray, - 'stroke-width': this.get('stroke-width') + 'stroke-width': this.getStrokeWidth() }, arrow: { path: arrowPath, - opacity: nonTextOpacity, + opacity: this.getArrowOpacity(), fill: this.getFill(), stroke: this.get('stroke'), transform: this.getArrowTransform(), - 'stroke-width': this.get('stroke-width') + 'stroke-dasharray': dashArray, + 'stroke-width': this.getStrokeWidth() } }; }, diff --git a/src/js/visuals/visBranch.js b/src/js/visuals/visBranch.js index 65090988..49c5100d 100644 --- a/src/js/visuals/visBranch.js +++ b/src/js/visuals/visBranch.js @@ -88,8 +88,7 @@ var VisBranch = VisBase.extend({ if (!this.get('gitVisuals').getIsGoalVis()) { return ''; } - - return (this.getIsLevelBranchCompared()) ? '' : '- '; + return (this.getIsLevelBranchCompared()) ? '' : '--'; }, getIsGoalAndNotCompared: function() { @@ -468,6 +467,24 @@ var VisBranch = VisBase.extend({ }); }, + getArrowOpacity: function() { + if (this.getIsGoalAndNotCompared() && + !this.get('isHead') && + this.getBranchStackIndex() === 0) { + return 0.5; + } + return this.getNonTextOpacity(); + }, + + getRectOpacity: function() { + if (this.getIsGoalAndNotCompared() && + !this.get('isHead') && + this.getBranchStackIndex() === 0) { + return 0.8; + } + return this.getNonTextOpacity(); + }, + getNonTextOpacity: function() { if (this.get('isHead')) { return this.gitEngine.getDetachedHead() ? 1 : 0; @@ -485,14 +502,21 @@ var VisBranch = VisBase.extend({ } if (this.getIsGoalAndNotCompared()) { - return 0.3; + return (this.getBranchStackIndex() === 0) ? 0.7 : 0.3; } return 1; }, + getStrokeWidth: function() { + if (this.getIsGoalAndNotCompared()) { + return this.get('stroke-width') / 5.0; + } + + return this.get('stroke-width'); + }, + getAttributes: function() { - var nonTextOpacity = this.getNonTextOpacity(); var textOpacity = this.getTextOpacity(); this.updateName(); @@ -520,19 +544,20 @@ var VisBranch = VisBase.extend({ y: rectPos.y, width: rectSize.w, height: rectSize.h, - opacity: nonTextOpacity, + opacity: this.getRectOpacity(), fill: this.getFill(), stroke: this.get('stroke'), 'stroke-dasharray': dashArray, - 'stroke-width': this.get('stroke-width') + 'stroke-width': this.getStrokeWidth() }, arrow: { path: arrowPath, - opacity: nonTextOpacity, + opacity: this.getArrowOpacity(), fill: this.getFill(), stroke: this.get('stroke'), transform: this.getArrowTransform(), - 'stroke-width': this.get('stroke-width') + 'stroke-dasharray': dashArray, + 'stroke-width': this.getStrokeWidth() } }; },