@hailin-zheng/editor-core 2.0.34 → 2.0.36
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 +20 -6
- package/index-cjs.js.map +1 -1
- package/index.js +20 -6
- package/index.js.map +1 -1
- package/med_editor/framework/document-event.d.ts +1 -1
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -1752,8 +1752,8 @@ class TextProps extends INotifyPropertyChanged {
|
|
1752
1752
|
super();
|
1753
1753
|
}
|
1754
1754
|
color;
|
1755
|
-
fontName;
|
1756
|
-
fontSize;
|
1755
|
+
fontName = '宋体';
|
1756
|
+
fontSize = 12;
|
1757
1757
|
fontWeight = 'normal';
|
1758
1758
|
fontStyle = 'normal';
|
1759
1759
|
//textDecoration: 'none' | 'underline' | 'overline' | 'line-through' = 'none';
|
@@ -14707,6 +14707,9 @@ class DocumentArrange {
|
|
14707
14707
|
blockLine = children[++j];
|
14708
14708
|
}
|
14709
14709
|
}
|
14710
|
+
// if (cloneRender.length === 0 && sumHeight === 0) {
|
14711
|
+
// return null;
|
14712
|
+
// }
|
14710
14713
|
ElementUtil.remeasure(cloneRender);
|
14711
14714
|
ElementUtil.remeasure(render);
|
14712
14715
|
if (cloneRender.length === 0) {
|
@@ -27255,13 +27258,16 @@ class DocEditor {
|
|
27255
27258
|
* 设置光标
|
27256
27259
|
*/
|
27257
27260
|
setCursor() {
|
27261
|
+
if (this.documentEvent.ismousedown) {
|
27262
|
+
return;
|
27263
|
+
}
|
27258
27264
|
this.selectionState;
|
27259
27265
|
if (!this.canSetCursor() || !this.selectionState.startHitInfo) {
|
27260
27266
|
this.selectionState.editable = false;
|
27261
27267
|
this.docCtx.selectionState.cursorPos = null;
|
27262
27268
|
const cursorRect = this.getCursorRect();
|
27263
27269
|
this.hiddenInput(false, cursorRect);
|
27264
|
-
return
|
27270
|
+
return;
|
27265
27271
|
}
|
27266
27272
|
const cursorRect = this.getCursorRect();
|
27267
27273
|
this.docCtx.cursorRect = ElementUtil.cloneRect(cursorRect);
|
@@ -27269,12 +27275,20 @@ class DocEditor {
|
|
27269
27275
|
const abPos = ElementUtil.cloneRect(cursorRect);
|
27270
27276
|
this.setCursorPosition(abPos);
|
27271
27277
|
//this.documentEvent.invokeCursor(startControl);
|
27272
|
-
return
|
27278
|
+
return;
|
27273
27279
|
}
|
27274
27280
|
getCursorRect() {
|
27275
27281
|
try {
|
27276
27282
|
const { startControl, startOffset } = this.selectionState;
|
27277
|
-
if (!this.documentEvent.startHitInfo || (startControl && !startControl.parent)) {
|
27283
|
+
if (!this.documentEvent.startHitInfo || !startControl || (startControl && !startControl.parent)) {
|
27284
|
+
if (this.documentEvent.mousedownPos) {
|
27285
|
+
return {
|
27286
|
+
x: this.documentEvent.mousedownPos.x,
|
27287
|
+
y: this.documentEvent.mousedownPos.y,
|
27288
|
+
width: 0,
|
27289
|
+
height: 0
|
27290
|
+
};
|
27291
|
+
}
|
27278
27292
|
return { x: 0, y: 0, width: 0, height: 0 };
|
27279
27293
|
}
|
27280
27294
|
const { startRegion, hitDocIndex } = this.documentEvent.startHitInfo;
|
@@ -28307,7 +28321,7 @@ class DocEditor {
|
|
28307
28321
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28308
28322
|
}
|
28309
28323
|
version() {
|
28310
|
-
return "2.0.
|
28324
|
+
return "2.0.36";
|
28311
28325
|
}
|
28312
28326
|
}
|
28313
28327
|
|