Changeset 37951 for gs3-installations/thewillow
- Timestamp:
- 2023-08-14T22:20:29+12:00 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-installations/thewillow/trunk/interfaces/thewillow/js/thumbnail-timeline.js
r37945 r37951 50 50 TimelineState.PosJump = TimelineState.CardWidthAndGap * 2; /* nav-block move, two upper-cards at a time */ 51 51 52 53 let pos = TimelineState.StartPos; 52 TimelineState.pos = TimelineState.StartPos; 54 53 55 54 … … 61 60 TimelineState.NumCards = num_cards; 62 61 TimelineState.CardsTotalWidth = Math.ceil((num_cards/2) * TimelineState.CardWidthAndGap) - ((TimelineState.CardWidth*2) + TimelineState.StartPos); 63 console.log("cards total width = " + TimelineState.CardsTotalWidth);62 // console.log("cards total width = " + TimelineState.CardsTotalWidth); 64 63 65 66 64 var httpPath = gs.collectionMetadata["httpPath"]; 67 65 var assocfilepath = gs.documentMetadata["assocfilepath"]; … … 102 100 function timelineBlockMove(event,inputs){ 103 101 var dir = Array.from(inputs).indexOf(event.target); 104 pos += (dir > 0) ? TimelineState.PosJump * -1 : TimelineState.PosJump102 TimelineState.pos += (dir > 0) ? TimelineState.PosJump * -1 : TimelineState.PosJump 105 103 106 console.log("*** pos = " +pos);104 //console.log("*** pos = " + TimelineState.pos); 107 105 108 106 var container = document.getElementsByClassName("timeline-container")[0]; 109 container.style.transform = "translate3d(" + pos + "px, " + 0 + "px, 0)";107 container.style.transform = "translate3d(" + TimelineState.pos + "px, " + 0 + "px, 0)"; 110 108 111 if ( pos < TimelineState.StartPos) {109 if (TimelineState.pos < TimelineState.StartPos) { 112 110 $('#timeline-nav-block-left').show(); 113 111 } … … 116 114 } 117 115 118 if ( pos > -TimelineState.CardsTotalWidth ) {116 if (TimelineState.pos > -TimelineState.CardsTotalWidth ) { 119 117 $('#timeline-nav-block-right').show(); 120 118 } … … 134 132 // Initialize thumbnail-timeline area 135 133 // .timeline-container is a static div 136 document.getElementsByClassName("timeline-container")[0].style.transform = "translate3d(" + pos + "px, " + 0 + "px, 0)";134 document.getElementsByClassName("timeline-container")[0].style.transform = "translate3d(" + TimelineState.pos + "px, " + 0 + "px, 0)"; 137 135 138 136 // Attach listeners to move in "chunks" (blocks) the section of the timeline area on display
Note:
See TracChangeset
for help on using the changeset viewer.