@hailin-zheng/editor-core 2.0.19 → 2.0.20
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/index-cjs.js +37 -2
- package/index-cjs.js.map +1 -1
- package/index.js +37 -2
- package/index.js.map +1 -1
- package/med_editor/framework/document-event.d.ts +7 -0
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -14729,7 +14729,12 @@ class DocumentArrange {
|
|
14729
14729
|
if (cutRow) {
|
14730
14730
|
cloneTbRender.addChild(cutRow);
|
14731
14731
|
sumHeight += cutRow.rect.height;
|
14732
|
-
|
14732
|
+
if (currRow.getItems().every(item => item.length !== 0)) {
|
14733
|
+
cutRows.push(currRow);
|
14734
|
+
}
|
14735
|
+
else {
|
14736
|
+
tbRender.removeChild(currRow);
|
14737
|
+
}
|
14733
14738
|
if (currRow === joinRow) {
|
14734
14739
|
break;
|
14735
14740
|
}
|
@@ -16871,6 +16876,7 @@ class DocumentEvent {
|
|
16871
16876
|
hitInfoChanged = new Subject$1();
|
16872
16877
|
clickEvent = new Subject$1();
|
16873
16878
|
dblClickEvent = new Subject$1();
|
16879
|
+
tripleClickEvent = new Subject$1();
|
16874
16880
|
changeCursor = new Subject$1();
|
16875
16881
|
contextMenu = new Subject$1();
|
16876
16882
|
trackTipsChanged = new Subject$1();
|
@@ -18147,6 +18153,35 @@ class DocumentEvent {
|
|
18147
18153
|
};
|
18148
18154
|
return cancelToken;
|
18149
18155
|
}
|
18156
|
+
clicks = 0;
|
18157
|
+
timeout;
|
18158
|
+
/**
|
18159
|
+
* 处理三击事件
|
18160
|
+
*/
|
18161
|
+
handleTripleClick() {
|
18162
|
+
this.clicks++;
|
18163
|
+
let curr = this;
|
18164
|
+
if (this.clicks === 1) {
|
18165
|
+
// 设置延时,等待第二次点击
|
18166
|
+
this.timeout = setTimeout(function () {
|
18167
|
+
curr.clicks = 0;
|
18168
|
+
}, 300);
|
18169
|
+
}
|
18170
|
+
else if (this.clicks === 2) {
|
18171
|
+
// 第二次点击后,清除延时
|
18172
|
+
clearTimeout(curr.timeout);
|
18173
|
+
// 设置延时,等待第三次点击
|
18174
|
+
curr.timeout = setTimeout(function () {
|
18175
|
+
curr.clicks = 0;
|
18176
|
+
}, 300);
|
18177
|
+
}
|
18178
|
+
else if (curr.clicks === 3) {
|
18179
|
+
// 第三次点击后,处理三击事件并清除延时
|
18180
|
+
clearTimeout(curr.timeout);
|
18181
|
+
this.tripleClickEvent.next();
|
18182
|
+
this.clicks = 0;
|
18183
|
+
}
|
18184
|
+
}
|
18150
18185
|
}
|
18151
18186
|
|
18152
18187
|
/**
|
@@ -27244,7 +27279,7 @@ class DocEditor {
|
|
27244
27279
|
}
|
27245
27280
|
}
|
27246
27281
|
else if (!collapsed && ancestorCommonControl) {
|
27247
|
-
return ElementUtil.getParent(
|
27282
|
+
return ElementUtil.getParent(ancestorCommonControl, validateDataEle);
|
27248
27283
|
}
|
27249
27284
|
return null;
|
27250
27285
|
}
|