1/* 2 ãã©ãã°ã¹ã¯ãã¼ã«ãå¯è½ã«ããjs 3 https://junpei-sugiyama.com/scroll-drag/ ããã³ãã 4 5 æ¬ãã¡ã¤ã«ã¯ãheadã§ã¯ãªãbodyæä¸é¨ã§èªã¿è¾¼ãã㨠6*/ 7 8// ã¹ã¯ãã¼ã«ã®ãã©ãã°æå¹å 9jQuery.prototype.mousedragscrollable = function () { 10 let target; 11 $(this).each(function (i, e) { 12 $(e).mousedown(function (event) { 13 event.preventDefault(); 14 target = $(e); 15 $(e).data({ 16 down: true, 17 move: false, 18 x: event.clientX, 19 y: event.clientY, 20 scrollleft: $(e).scrollLeft(), 21 scrolltop: $(e).scrollTop(), 22 }); 23 return false; 24 }); 25 $(e).click(function (event) { 26 if ($(e).data("move")) { 27 return false; 28 } 29 }); 30 }); 31 $(document) 32 .mousemove(function (event) { 33 if ($(target).data("down")) { 34 event.preventDefault(); 35 let move_x = $(target).data("x") - event.clientX; 36 let move_y = $(target).data("y") - event.clientY; 37 if (move_x !== 0 || move_y !== 0) { 38 $(target).data("move", true); 39 } else { 40 return; 41 } 42 $(target).scrollLeft($(target).data("scrollleft") + move_x); 43 $(target).scrollTop($(target).data("scrolltop") + move_y); 44 return false; 45 } 46 }) 47 .mouseup(function (event) { 48 $(target).data("down", false); 49 return false; 50 }); 51}; 52$(".drag-scroll").mousedragscrollable();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.