@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.js CHANGED
@@ -14699,7 +14699,12 @@ class DocumentArrange {
14699
14699
  if (cutRow) {
14700
14700
  cloneTbRender.addChild(cutRow);
14701
14701
  sumHeight += cutRow.rect.height;
14702
- cutRows.push(currRow);
14702
+ if (currRow.getItems().every(item => item.length !== 0)) {
14703
+ cutRows.push(currRow);
14704
+ }
14705
+ else {
14706
+ tbRender.removeChild(currRow);
14707
+ }
14703
14708
  if (currRow === joinRow) {
14704
14709
  break;
14705
14710
  }
@@ -16841,6 +16846,7 @@ class DocumentEvent {
16841
16846
  hitInfoChanged = new Subject$1();
16842
16847
  clickEvent = new Subject$1();
16843
16848
  dblClickEvent = new Subject$1();
16849
+ tripleClickEvent = new Subject$1();
16844
16850
  changeCursor = new Subject$1();
16845
16851
  contextMenu = new Subject$1();
16846
16852
  trackTipsChanged = new Subject$1();
@@ -18117,6 +18123,35 @@ class DocumentEvent {
18117
18123
  };
18118
18124
  return cancelToken;
18119
18125
  }
18126
+ clicks = 0;
18127
+ timeout;
18128
+ /**
18129
+ * 处理三击事件
18130
+ */
18131
+ handleTripleClick() {
18132
+ this.clicks++;
18133
+ let curr = this;
18134
+ if (this.clicks === 1) {
18135
+ // 设置延时,等待第二次点击
18136
+ this.timeout = setTimeout(function () {
18137
+ curr.clicks = 0;
18138
+ }, 300);
18139
+ }
18140
+ else if (this.clicks === 2) {
18141
+ // 第二次点击后,清除延时
18142
+ clearTimeout(curr.timeout);
18143
+ // 设置延时,等待第三次点击
18144
+ curr.timeout = setTimeout(function () {
18145
+ curr.clicks = 0;
18146
+ }, 300);
18147
+ }
18148
+ else if (curr.clicks === 3) {
18149
+ // 第三次点击后,处理三击事件并清除延时
18150
+ clearTimeout(curr.timeout);
18151
+ this.tripleClickEvent.next();
18152
+ this.clicks = 0;
18153
+ }
18154
+ }
18120
18155
  }
18121
18156
 
18122
18157
  /**
@@ -27214,7 +27249,7 @@ class DocEditor {
27214
27249
  }
27215
27250
  }
27216
27251
  else if (!collapsed && ancestorCommonControl) {
27217
- return ElementUtil.getParent(startControl, validateDataEle);
27252
+ return ElementUtil.getParent(ancestorCommonControl, validateDataEle);
27218
27253
  }
27219
27254
  return null;
27220
27255
  }