e-virt-table 0.1.12 → 0.1.14
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.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Context.js +1 -0
- package/dist/lib/Context.js.map +1 -1
- package/dist/lib/Editor.js +6 -1
- package/dist/lib/Editor.js.map +1 -1
- package/dist/lib/EventBrowser.js +4 -0
- package/dist/lib/EventBrowser.js.map +1 -1
- package/dist/lib/Selector.js +6 -6
- package/dist/lib/Selector.js.map +1 -1
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
|
@@ -1506,7 +1506,7 @@ class ri {
|
|
|
1506
1506
|
this.ctx.isInsideTargetContainer = !0, this.ctx.emit("mouseenter", t);
|
|
1507
1507
|
}
|
|
1508
1508
|
handleMouseLeave(t) {
|
|
1509
|
-
this.ctx.isInsideTargetContainer = !1, this.ctx.emit("mouseleave", t);
|
|
1509
|
+
this.ctx.editing || (this.ctx.isInsideTargetContainer = !1, this.ctx.emit("mouseleave", t));
|
|
1510
1510
|
}
|
|
1511
1511
|
handleDblclick(t) {
|
|
1512
1512
|
this.ctx.emit("dblclick", t);
|
|
@@ -2781,7 +2781,7 @@ class li {
|
|
|
2781
2781
|
h(this, "history");
|
|
2782
2782
|
h(this, "config");
|
|
2783
2783
|
const { containerElement: i, stageElement: s, canvasElement: r, overlayerElement: o, editorElement: a } = t;
|
|
2784
|
-
this.containerElement = i, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = a, this.config = new Wt(e.config || {}), this.eventBus = new oi(), this.eventBrowser = new ri(this), this.eventTable = new hi(this), this.paint = new ni(this.canvasElement), this.database = new ii(this, e), this.history = new si(this), this.icons = new ai(this);
|
|
2784
|
+
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = a, this.config = new Wt(e.config || {}), this.eventBus = new oi(), this.eventBrowser = new ri(this), this.eventTable = new hi(this), this.paint = new ni(this.canvasElement), this.database = new ii(this, e), this.history = new si(this), this.icons = new ai(this);
|
|
2785
2785
|
}
|
|
2786
2786
|
setConfig(t) {
|
|
2787
2787
|
this.config = new Wt(t);
|
|
@@ -3971,7 +3971,7 @@ class ui {
|
|
|
3971
3971
|
x && (y = a.visibleHeight);
|
|
3972
3972
|
const b = i.drawY + p - (t - y - d);
|
|
3973
3973
|
let m = c, E = f;
|
|
3974
|
-
g > 0 && !i.fixed ? m = c + g : u > 0 && !i.fixed && (m = c - u), w > 0 ? E = f - w : b > 0 && (E = f + b), (Math.abs(c - m) >
|
|
3974
|
+
g > 0 && !i.fixed ? m = Math.floor(c + g) : u > 0 && !i.fixed && (m = Math.floor(c - u)), w > 0 ? E = Math.floor(f - w) : b > 0 && (E = Math.floor(f + b)), (Math.abs(c - m) > 2 || Math.abs(f - E) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(m, E), this.ctx.emit("adjustBoundaryPosition", i));
|
|
3975
3975
|
}
|
|
3976
3976
|
destroy() {
|
|
3977
3977
|
this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
|
|
@@ -5135,12 +5135,12 @@ class qi {
|
|
|
5135
5135
|
}
|
|
5136
5136
|
initTextEditor() {
|
|
5137
5137
|
this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.addEventListener("keydown", (t) => {
|
|
5138
|
-
if (this.enable) {
|
|
5138
|
+
if (!t.isComposing && this.enable) {
|
|
5139
5139
|
if (t.stopPropagation(), (t.altKey || t.metaKey) && t.code === "Enter") {
|
|
5140
5140
|
t.preventDefault();
|
|
5141
5141
|
const e = this.inputEl.selectionStart, i = this.inputEl.value.substring(0, e), s = this.inputEl.value.substring(e);
|
|
5142
5142
|
this.inputEl.value = i + `
|
|
5143
|
-
` + s, this.inputEl.selectionStart = this.inputEl.selectionEnd = e + 1;
|
|
5143
|
+
` + s, this.inputEl.selectionStart = this.inputEl.selectionEnd = e + 1, this.autoSize();
|
|
5144
5144
|
return;
|
|
5145
5145
|
}
|
|
5146
5146
|
(t.code === "Escape" || t.code === "Enter") && (t.preventDefault(), this.inputEl.blur());
|
|
@@ -5150,9 +5150,8 @@ class qi {
|
|
|
5150
5150
|
}), this.editorEl = this.ctx.editorElement, this.inputEl.className = "e-virt-table-editor-textarea", this.editorEl.appendChild(this.inputEl), this.ctx.containerElement.appendChild(this.editorEl);
|
|
5151
5151
|
}
|
|
5152
5152
|
autoSize() {
|
|
5153
|
-
let t = this.inputEl.scrollHeight;
|
|
5154
5153
|
this.inputEl.style.height = "auto";
|
|
5155
|
-
let e = this.ctx.body.visibleHeight;
|
|
5154
|
+
let t = this.inputEl.scrollHeight, e = this.ctx.body.visibleHeight;
|
|
5156
5155
|
t > e && (t = e);
|
|
5157
5156
|
const {
|
|
5158
5157
|
stageHeight: i,
|