Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 518725 - Allowing compareView rulers to redraw when there are ann…
…otation changes.
  • Loading branch information
libingw committed Jun 23, 2017
1 parent 7a48f39 commit d00c2ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -33,6 +33,9 @@ orion.CompareRuler = (function() {
}
return result;
},
getAnnotationTypePriority: function(type) {
return 1;
},
getWidestAnnotation: function() {
return {html: this.getHTML(-1), style: this.getStyle(-1)};
},
Expand Down
Expand Up @@ -377,7 +377,7 @@ exports.TwoWayCompareView = (function() {
//Create editor on the left side
this._editors.push(this._createEditor(initString, this._uiFactory.getEditorParentDiv(true), this._uiFactory.getStatusDiv(true), this.options.newFile, true));
//Create the overview ruler
this._overviewRuler = new mCompareRulers.CompareOverviewRuler(this._editors[1].getAnnotationModel(), "right", {styleClass: "ruler overview"} , null, //$NON-NLS-1$ //$NON-NLS-0$
this._overviewRuler = new mCompareRulers.CompareOverviewRuler(this._editors[0].getAnnotationModel(), "right", {styleClass: "ruler overview"} , null, //$NON-NLS-1$ //$NON-NLS-0$
function(lineIndex, ruler){this._diffNavigator.matchPositionFromOverview(lineIndex);}.bind(this));
//If either editor is dirty, popup the warning message.
if(this.options.postCreate) {
Expand Down Expand Up @@ -583,8 +583,8 @@ exports.TwoWayCompareView = (function() {

TwoWayCompareView.prototype.addRulers = function(){
if(this._editors && !this._hasRuler){
var lRuler = new mCompareRulers.LineNumberCompareRuler(this._diffNavigator, 0, this._editors[0].getAnnotationModel(), "left", {styleClass: "ruler lines"}, {styleClass: "rulerLines odd"}, {styleClass: "rulerLines even"}); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
var rRuler = new mCompareRulers.LineNumberCompareRuler(this._diffNavigator, 0, this._editors[1].getAnnotationModel(), "left", {styleClass: "ruler lines"}, {styleClass: "rulerLines odd"}, {styleClass: "rulerLines even"}); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
var lRuler = new mCompareRulers.LineNumberCompareRuler(this._diffNavigator, 0, this._editors[1].getAnnotationModel(), "left", {styleClass: "ruler lines"}, {styleClass: "rulerLines odd"}, {styleClass: "rulerLines even"}); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
var rRuler = new mCompareRulers.LineNumberCompareRuler(this._diffNavigator, 0, this._editors[0].getAnnotationModel(), "left", {styleClass: "ruler lines"}, {styleClass: "rulerLines odd"}, {styleClass: "rulerLines even"}); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
this._editors[1].getTextView().addRuler(lRuler);
this._editors[0].getTextView().addRuler(rRuler);
this._editors[0].getTextView().addRuler(this._overviewRuler);
Expand Down

0 comments on commit d00c2ad

Please sign in to comment.