فهرست منبع

Fix file image previews jumping around with scroll

Leonardo Jeanteur 2 سال پیش
والد
کامیت
ac23b4e639
3فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      bin/cdb.css
  2. 1 1
      bin/cdb.less
  3. 1 1
      hide/comp/cdb/Cell.hx

+ 1 - 1
bin/cdb.css

@@ -389,7 +389,7 @@
 }
 .cdb .cdb-sheet td.t_file .preview .previewContent {
   display: none;
-  position: absolute;
+  position: fixed;
   background-color: #333;
   color: white;
   border: 1px solid black;

+ 1 - 1
bin/cdb.less

@@ -437,7 +437,7 @@
 						font-family : monospace;
 					}
 					display : none;
-					position : absolute;
+					position : fixed;
 					background-color : #333;
 					color: white;
 					border : 1px solid black;

+ 1 - 1
hide/comp/cdb/Cell.hx

@@ -437,7 +437,7 @@ class Cell {
 				var dimsText = dims != null ? dims.width+"x"+dims.height : "";
 				var onload = dims != null ? "" : 'onload="hide.comp.cdb.Cell.onImageLoad(this, \'$url\');"';
 				var img = '<img src="$url" $onload/>';
-				var previewHandler = ' onmouseenter="$(this).find(\'.previewContent\').css(\'top\', (this.getBoundingClientRect().bottom - this.offsetHeight) + \'px\')"';
+				var previewHandler = ' onmouseenter="$(this).find(\'.previewContent\').css(\'top\', this.getBoundingClientRect().bottom + \'px\')"';
 				if (getCellConfigValue("inlineImageFiles", false)) {
 					innerHtml = '<span class="preview inlineImage" $previewHandler>
 						<img src="$url"><div class="previewContent"><div class="inlineImagePath">$innerHtml</div><div class="label">$dimsText</div>$img</div>