Fossil SCM
Possible solution to the problem of buttons randomly jumping away from under the mouse cursor.
Commit
b4dbdec8f1442c95931f2b508dab77b4f7e440d06d37ca86810de36473875204
Parent
c714f2515e06d00…
1 file changed
+4
-2
+4
-2
| --- src/fossil.diff.js | ||
| +++ src/fossil.diff.js | ||
| @@ -175,11 +175,11 @@ | ||
| 175 | 175 | if(this.pos.prev && this.pos.next |
| 176 | 176 | && ((this.pos.next.startLhs - this.pos.prev.endLhs) |
| 177 | 177 | <= Diff.config.chunkLoadLines)){ |
| 178 | 178 | /* Place a single button to load the whole block, rather |
| 179 | 179 | than separate up/down buttons. */ |
| 180 | - btnDown = false; | |
| 180 | + btnDown = this.createButton(this.FetchType.FillGap); | |
| 181 | 181 | btnUp = this.createButton(this.FetchType.FillGap); |
| 182 | 182 | }else{ |
| 183 | 183 | /* Figure out which chunk-load buttons to add... */ |
| 184 | 184 | if(this.pos.prev){ |
| 185 | 185 | btnDown = this.createButton(this.FetchType.PrevDown); |
| @@ -285,11 +285,13 @@ | ||
| 285 | 285 | */ |
| 286 | 286 | maybeReplaceButtons: function(){ |
| 287 | 287 | if(this.pos.next && this.pos.prev |
| 288 | 288 | && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ |
| 289 | 289 | D.clearElement(this.e.btnWrapper); |
| 290 | - D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); | |
| 290 | + for( var i=0; i<2; i++ ){ | |
| 291 | + D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); | |
| 292 | + } | |
| 291 | 293 | if( this.$fetchQueue && this.$fetchQueue.length>0 ){ |
| 292 | 294 | this.$fetchQueue = [this.FetchType.FillGap]; |
| 293 | 295 | } |
| 294 | 296 | } |
| 295 | 297 | return this; |
| 296 | 298 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -175,11 +175,11 @@ | |
| 175 | if(this.pos.prev && this.pos.next |
| 176 | && ((this.pos.next.startLhs - this.pos.prev.endLhs) |
| 177 | <= Diff.config.chunkLoadLines)){ |
| 178 | /* Place a single button to load the whole block, rather |
| 179 | than separate up/down buttons. */ |
| 180 | btnDown = false; |
| 181 | btnUp = this.createButton(this.FetchType.FillGap); |
| 182 | }else{ |
| 183 | /* Figure out which chunk-load buttons to add... */ |
| 184 | if(this.pos.prev){ |
| 185 | btnDown = this.createButton(this.FetchType.PrevDown); |
| @@ -285,11 +285,13 @@ | |
| 285 | */ |
| 286 | maybeReplaceButtons: function(){ |
| 287 | if(this.pos.next && this.pos.prev |
| 288 | && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ |
| 289 | D.clearElement(this.e.btnWrapper); |
| 290 | D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); |
| 291 | if( this.$fetchQueue && this.$fetchQueue.length>0 ){ |
| 292 | this.$fetchQueue = [this.FetchType.FillGap]; |
| 293 | } |
| 294 | } |
| 295 | return this; |
| 296 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -175,11 +175,11 @@ | |
| 175 | if(this.pos.prev && this.pos.next |
| 176 | && ((this.pos.next.startLhs - this.pos.prev.endLhs) |
| 177 | <= Diff.config.chunkLoadLines)){ |
| 178 | /* Place a single button to load the whole block, rather |
| 179 | than separate up/down buttons. */ |
| 180 | btnDown = this.createButton(this.FetchType.FillGap); |
| 181 | btnUp = this.createButton(this.FetchType.FillGap); |
| 182 | }else{ |
| 183 | /* Figure out which chunk-load buttons to add... */ |
| 184 | if(this.pos.prev){ |
| 185 | btnDown = this.createButton(this.FetchType.PrevDown); |
| @@ -285,11 +285,13 @@ | |
| 285 | */ |
| 286 | maybeReplaceButtons: function(){ |
| 287 | if(this.pos.next && this.pos.prev |
| 288 | && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ |
| 289 | D.clearElement(this.e.btnWrapper); |
| 290 | for( var i=0; i<2; i++ ){ |
| 291 | D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); |
| 292 | } |
| 293 | if( this.$fetchQueue && this.$fetchQueue.length>0 ){ |
| 294 | this.$fetchQueue = [this.FetchType.FillGap]; |
| 295 | } |
| 296 | } |
| 297 | return this; |
| 298 |