@hailin-zheng/editor-core 2.0.19 → 2.0.21

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
@@ -4328,7 +4328,7 @@ class TableCellElement extends BlockContainerElement {
4328
4328
  const cellRender = new TableCellRenderObject(this);
4329
4329
  cellRender.rect.width = cellWidth;
4330
4330
  //cellRender.rect.maxWidth = cellWidth;
4331
- cellRender.padding = new PaddingProps(0, 0, 5, 5);
4331
+ cellRender.padding = new PaddingProps(0, 0, 0, 0);
4332
4332
  cellRender.rect.x = cellOffset;
4333
4333
  return cellRender;
4334
4334
  }
@@ -13583,8 +13583,10 @@ class DocumentContext {
13583
13583
  const dataEle = this.getControlById(id);
13584
13584
  if (dataEle) {
13585
13585
  dataEle.setValue(value);
13586
+ if (dataEle.isFocused) {
13587
+ this.ss.clear();
13588
+ }
13586
13589
  }
13587
- this.ss.clear();
13588
13590
  }
13589
13591
  setControlValueByName(name, val) {
13590
13592
  const dataEle = this.getControlByName(name);
@@ -14699,7 +14701,12 @@ class DocumentArrange {
14699
14701
  if (cutRow) {
14700
14702
  cloneTbRender.addChild(cutRow);
14701
14703
  sumHeight += cutRow.rect.height;
14702
- cutRows.push(currRow);
14704
+ if (currRow.getItems().every(item => item.length !== 0)) {
14705
+ cutRows.push(currRow);
14706
+ }
14707
+ else {
14708
+ tbRender.removeChild(currRow);
14709
+ }
14703
14710
  if (currRow === joinRow) {
14704
14711
  break;
14705
14712
  }
@@ -16841,6 +16848,7 @@ class DocumentEvent {
16841
16848
  hitInfoChanged = new Subject$1();
16842
16849
  clickEvent = new Subject$1();
16843
16850
  dblClickEvent = new Subject$1();
16851
+ tripleClickEvent = new Subject$1();
16844
16852
  changeCursor = new Subject$1();
16845
16853
  contextMenu = new Subject$1();
16846
16854
  trackTipsChanged = new Subject$1();
@@ -18117,6 +18125,35 @@ class DocumentEvent {
18117
18125
  };
18118
18126
  return cancelToken;
18119
18127
  }
18128
+ clicks = 0;
18129
+ timeout;
18130
+ /**
18131
+ * 处理三击事件
18132
+ */
18133
+ handleTripleClick() {
18134
+ this.clicks++;
18135
+ let curr = this;
18136
+ if (this.clicks === 1) {
18137
+ // 设置延时,等待第二次点击
18138
+ this.timeout = setTimeout(function () {
18139
+ curr.clicks = 0;
18140
+ }, 300);
18141
+ }
18142
+ else if (this.clicks === 2) {
18143
+ // 第二次点击后,清除延时
18144
+ clearTimeout(curr.timeout);
18145
+ // 设置延时,等待第三次点击
18146
+ curr.timeout = setTimeout(function () {
18147
+ curr.clicks = 0;
18148
+ }, 300);
18149
+ }
18150
+ else if (curr.clicks === 3) {
18151
+ // 第三次点击后,处理三击事件并清除延时
18152
+ clearTimeout(curr.timeout);
18153
+ this.tripleClickEvent.next();
18154
+ this.clicks = 0;
18155
+ }
18156
+ }
18120
18157
  }
18121
18158
 
18122
18159
  /**
@@ -27214,7 +27251,7 @@ class DocEditor {
27214
27251
  }
27215
27252
  }
27216
27253
  else if (!collapsed && ancestorCommonControl) {
27217
- return ElementUtil.getParent(startControl, validateDataEle);
27254
+ return ElementUtil.getParent(ancestorCommonControl, validateDataEle);
27218
27255
  }
27219
27256
  return null;
27220
27257
  }