Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Possible solution to the problem of buttons randomly jumping away from under the mouse cursor. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | diff-js-fetchqueue |
Files: | files | file ages | folders |
SHA3-256: |
b4dbdec8f1442c95931f2b508dab77b4 |
User & Date: | florian 2021-09-25 08:57:00 |
Context
2021-09-25
| ||
08:57 | Possible solution to the problem of buttons randomly jumping away from under the mouse cursor. ... (Leaf check-in: b4dbdec8 user: florian tags: diff-js-fetchqueue) | |
2021-09-24
| ||
12:04 | Experiment to implement a click-queue for the buttons dynamically loading diff context. See Forum Post c8919e12dd for comments and potential TODOs. ... (check-in: c714f251 user: florian tags: diff-js-fetchqueue) | |
Changes
Changes to src/fossil.diff.js.
︙ | ︙ | |||
173 174 175 176 177 178 179 | this.pos.prev refers to the line numbers in the previous TR's chunk. */ if(this.pos.prev && this.pos.next && ((this.pos.next.startLhs - this.pos.prev.endLhs) <= Diff.config.chunkLoadLines)){ /* Place a single button to load the whole block, rather than separate up/down buttons. */ | | | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | this.pos.prev refers to the line numbers in the previous TR's chunk. */ if(this.pos.prev && this.pos.next && ((this.pos.next.startLhs - this.pos.prev.endLhs) <= Diff.config.chunkLoadLines)){ /* Place a single button to load the whole block, rather than separate up/down buttons. */ btnDown = this.createButton(this.FetchType.FillGap); btnUp = this.createButton(this.FetchType.FillGap); }else{ /* Figure out which chunk-load buttons to add... */ if(this.pos.prev){ btnDown = this.createButton(this.FetchType.PrevDown); } if(this.pos.next){ |
︙ | ︙ | |||
283 284 285 286 287 288 289 | As a special case, do not apply this at the start or bottom of the diff, only between two diff chunks. */ maybeReplaceButtons: function(){ if(this.pos.next && this.pos.prev && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ D.clearElement(this.e.btnWrapper); | > | > | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | As a special case, do not apply this at the start or bottom of the diff, only between two diff chunks. */ maybeReplaceButtons: function(){ if(this.pos.next && this.pos.prev && (this.pos.endLhs - this.pos.startLhs <= Diff.config.chunkLoadLines)){ D.clearElement(this.e.btnWrapper); for( var i=0; i<2; i++ ){ D.append(this.e.btnWrapper, this.createButton(this.FetchType.FillGap)); } if( this.$fetchQueue && this.$fetchQueue.length>0 ){ this.$fetchQueue = [this.FetchType.FillGap]; } } return this; }, |
︙ | ︙ |