@ninebone/grid 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nine-grid.js +15 -6
- package/dist/nine-grid.js.map +1 -1
- package/dist/nine-grid.umd.js +1 -1
- package/dist/nine-grid.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-grid.js
CHANGED
|
@@ -28604,12 +28604,21 @@ class tf extends HTMLElement {
|
|
|
28604
28604
|
tt(this, rs, !0), this.shiftY = t.offsetY + f(this, ge).track.getBoundingClientRect().y, this.trackHeight = $(f(this, ge).track).height(), this.thumbHeight = $(f(this, ge).thumb).height(), this.nodataHeight = $(".ng-container .ng-table tr.nodata", f(this, qt).body).height(), this.bodyHeight = $(".ng-container-body", f(this, qt).body).height(), this.templateHeight = f(this, qt).template.height(), this.theadHeight = $(".ng-container-body table > thead", f(this, qt).body).height() || 0, this.tfootHeight = $(".ng-container-body table > tfoot", f(this, qt).body).height() || 0, this.fixedHeight = $(".ng-container-body tbody.fixed", f(this, qt).body).height(), this.tableHeight = $(".ng-container-body .ng-table", f(this, qt).body).height(), tt(this, _n, !0), document.addEventListener("mousemove", f(this, Sn)), typeof this.onDragStart == "function" && this.onDragStart();
|
|
28605
28605
|
});
|
|
28606
28606
|
Y(this, Sn, (t) => {
|
|
28607
|
-
if (
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
|
|
28607
|
+
if (f(this, rs)) {
|
|
28608
|
+
t.preventDefault(), f(this, _n) && (H.j.querySelectorAll("th,td", f(this, qt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"), tt(this, _n, !1));
|
|
28609
|
+
var l = this.trackHeight, c = f(this, kn).call(this), o = l - c, r = t.clientY - this.shiftY;
|
|
28610
|
+
r = Math.max(0, Math.min(r, o > 0 ? o : 0));
|
|
28611
|
+
var n = f(this, qt).matrix.totalHeight || 0, s = o > 0 ? r / o : 0, e = s * Math.max(0, n - this.bodyHeight), { index: i, offset: u } = f(this, qt).matrix.getRowInfoAt(e);
|
|
28612
|
+
if (i = isNaN(i) ? 0 : i, u = isNaN(u) ? 0 : u, f(this, qt).dataManager.viewRecords.rawIndex !== i) {
|
|
28613
|
+
f(this, qt).scrollToV2(i);
|
|
28614
|
+
const a = f(this, qt).body.querySelector(".ng-container-body tbody.bindable");
|
|
28615
|
+
a && (a.style.transform = "translateY(0px)");
|
|
28616
|
+
} else {
|
|
28617
|
+
const a = f(this, qt).body.querySelector(".ng-container-body tbody.bindable");
|
|
28618
|
+
a && (a.style.transform = `translateY(-${u}px)`);
|
|
28619
|
+
}
|
|
28620
|
+
Wr.log("#thumb_onMouseMove", i, u, e);
|
|
28621
|
+
}
|
|
28613
28622
|
});
|
|
28614
28623
|
Y(this, kn, () => parseInt(f(this, ge).thumb.dataset.height));
|
|
28615
28624
|
this.attachShadow({ mode: "open" });
|