e-virt-table 0.1.15 → 0.1.16

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/index.es.js CHANGED
@@ -1502,10 +1502,10 @@ class ri {
1502
1502
  this.ctx.emit("resetHeader", t), this.ctx.emit("resize", t);
1503
1503
  }
1504
1504
  handleMouseDown(t) {
1505
- t.preventDefault(), t.button === 0 && (this.ctx.mousedown = !0), this.ctx.emit("mousedown", t);
1505
+ t.button === 0 && (this.ctx.mousedown = !0), this.ctx.emit("mousedown", t);
1506
1506
  }
1507
1507
  handleMousemove(t) {
1508
- t.preventDefault(), this.ctx.emit("mousemove", t);
1508
+ this.ctx.emit("mousemove", t);
1509
1509
  }
1510
1510
  handleMouseUp(t) {
1511
1511
  t.button === 0 && (this.ctx.mousedown = !1), this.ctx.emit("mouseup", t);
@@ -2285,7 +2285,8 @@ class ee extends te {
2285
2285
  top: i,
2286
2286
  width: `${this.visibleWidth}px`,
2287
2287
  height: `${this.visibleHeight}px`,
2288
- pointerEvents: "initial"
2288
+ pointerEvents: "initial",
2289
+ userSelect: "none"
2289
2290
  };
2290
2291
  }
2291
2292
  draw() {
@@ -2550,7 +2551,8 @@ class ie extends te {
2550
2551
  top: `${this.drawY + 1}px`,
2551
2552
  width: `${this.width}px`,
2552
2553
  height: `${this.height - 2}px`,
2553
- pointerEvents: "initial"
2554
+ pointerEvents: "initial",
2555
+ userSelect: "none"
2554
2556
  };
2555
2557
  }
2556
2558
  }
@@ -3604,6 +3606,7 @@ class ui {
3604
3606
  constructor(t) {
3605
3607
  h(this, "isCut", !1);
3606
3608
  h(this, "isMultipleRow", !1);
3609
+ h(this, "mousedownHeader", !1);
3607
3610
  h(this, "ctx");
3608
3611
  h(this, "adjustPositionX", "");
3609
3612
  h(this, "adjustPositionY", "");
@@ -3617,7 +3620,7 @@ class ui {
3617
3620
  "mousemove",
3618
3621
  Zt((t) => {
3619
3622
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = this.ctx.isTarget() && i > 0 && i < this.ctx.body.visibleWidth && e > this.ctx.header.visibleHeight && e < this.ctx.header.visibleHeight + this.ctx.body.visibleHeight;
3620
- (this.ctx.selectorMove || this.ctx.autofillMove) && (s ? this.stopAdjustPosition() : this.startAdjustPosition(t));
3623
+ (this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
3621
3624
  }, 100)
3622
3625
  ), this.ctx.on("cellHoverChange", (t) => {
3623
3626
  if (!this.ctx.autofillMove) {
@@ -3636,13 +3639,14 @@ class ui {
3636
3639
  this.isMultipleRow = !1, this.click(e.shiftKey);
3637
3640
  }
3638
3641
  }), this.ctx.on("mouseup", () => {
3642
+ this.mousedownHeader = !1;
3639
3643
  const t = setTimeout(() => {
3640
3644
  this.ctx.adjustPositioning = !1, clearTimeout(t);
3641
3645
  }, 0);
3642
3646
  }), this.ctx.on("cellHeaderHoverChange", (t) => {
3643
3647
  this.ctx.mousedown && this.selectCols(t);
3644
3648
  }), this.ctx.on("cellHeaderMousedown", (t) => {
3645
- this.ctx.stageElement.style.cursor !== "pointer" && (this.ctx.isPointer || this.selectCols(t));
3649
+ this.ctx.stageElement.style.cursor !== "pointer" && (this.ctx.isPointer || (this.mousedownHeader = !0, this.selectCols(t)));
3646
3650
  }), this.ctx.on("keydown", (t) => {
3647
3651
  if (t.ctrlKey && t.code === "KeyV" || t.metaKey && t.code === "KeyV") {
3648
3652
  t.preventDefault(), this.paste();