@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-cjs.js CHANGED
@@ -4358,7 +4358,7 @@ class TableCellElement extends BlockContainerElement {
4358
4358
  const cellRender = new TableCellRenderObject(this);
4359
4359
  cellRender.rect.width = cellWidth;
4360
4360
  //cellRender.rect.maxWidth = cellWidth;
4361
- cellRender.padding = new PaddingProps(0, 0, 5, 5);
4361
+ cellRender.padding = new PaddingProps(0, 0, 0, 0);
4362
4362
  cellRender.rect.x = cellOffset;
4363
4363
  return cellRender;
4364
4364
  }
@@ -13613,8 +13613,10 @@ class DocumentContext {
13613
13613
  const dataEle = this.getControlById(id);
13614
13614
  if (dataEle) {
13615
13615
  dataEle.setValue(value);
13616
+ if (dataEle.isFocused) {
13617
+ this.ss.clear();
13618
+ }
13616
13619
  }
13617
- this.ss.clear();
13618
13620
  }
13619
13621
  setControlValueByName(name, val) {
13620
13622
  const dataEle = this.getControlByName(name);
@@ -14729,7 +14731,12 @@ class DocumentArrange {
14729
14731
  if (cutRow) {
14730
14732
  cloneTbRender.addChild(cutRow);
14731
14733
  sumHeight += cutRow.rect.height;
14732
- cutRows.push(currRow);
14734
+ if (currRow.getItems().every(item => item.length !== 0)) {
14735
+ cutRows.push(currRow);
14736
+ }
14737
+ else {
14738
+ tbRender.removeChild(currRow);
14739
+ }
14733
14740
  if (currRow === joinRow) {
14734
14741
  break;
14735
14742
  }
@@ -16871,6 +16878,7 @@ class DocumentEvent {
16871
16878
  hitInfoChanged = new Subject$1();
16872
16879
  clickEvent = new Subject$1();
16873
16880
  dblClickEvent = new Subject$1();
16881
+ tripleClickEvent = new Subject$1();
16874
16882
  changeCursor = new Subject$1();
16875
16883
  contextMenu = new Subject$1();
16876
16884
  trackTipsChanged = new Subject$1();
@@ -18147,6 +18155,35 @@ class DocumentEvent {
18147
18155
  };
18148
18156
  return cancelToken;
18149
18157
  }
18158
+ clicks = 0;
18159
+ timeout;
18160
+ /**
18161
+ * 处理三击事件
18162
+ */
18163
+ handleTripleClick() {
18164
+ this.clicks++;
18165
+ let curr = this;
18166
+ if (this.clicks === 1) {
18167
+ // 设置延时,等待第二次点击
18168
+ this.timeout = setTimeout(function () {
18169
+ curr.clicks = 0;
18170
+ }, 300);
18171
+ }
18172
+ else if (this.clicks === 2) {
18173
+ // 第二次点击后,清除延时
18174
+ clearTimeout(curr.timeout);
18175
+ // 设置延时,等待第三次点击
18176
+ curr.timeout = setTimeout(function () {
18177
+ curr.clicks = 0;
18178
+ }, 300);
18179
+ }
18180
+ else if (curr.clicks === 3) {
18181
+ // 第三次点击后,处理三击事件并清除延时
18182
+ clearTimeout(curr.timeout);
18183
+ this.tripleClickEvent.next();
18184
+ this.clicks = 0;
18185
+ }
18186
+ }
18150
18187
  }
18151
18188
 
18152
18189
  /**
@@ -27244,7 +27281,7 @@ class DocEditor {
27244
27281
  }
27245
27282
  }
27246
27283
  else if (!collapsed && ancestorCommonControl) {
27247
- return ElementUtil.getParent(startControl, validateDataEle);
27284
+ return ElementUtil.getParent(ancestorCommonControl, validateDataEle);
27248
27285
  }
27249
27286
  return null;
27250
27287
  }