Browse Source

调整框位置

laiguoran 4 years ago
parent
commit
2786e49792
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/view/advance/modal_audit.ejs

+ 4 - 2
app/view/advance/modal_audit.ejs

@@ -665,12 +665,14 @@
     }
     $('.sp-location-list').on('shown.bs.modal', function () {
         const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
+        // const scrollBox = $(this).find('div[id="end-target"]');
         console.log('scrollBox', scrollBox)
         const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
         scrollBox.scrollTop(0);
         const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
-        const hdheight = hdiv ? hdiv.parents('.list-group-item').offset().top : null;
-        if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 450 && hdheight - bdiv > 450) {
+        const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
+        console.log(bdiv, hdheight);
+        if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 390 && hdheight - bdiv > 390) {
             scrollBox.scrollTop(hdheight - bdiv);
         }
     });