@hailin-zheng/editor-core 2.0.25 → 2.0.27
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 +14 -8
- package/index-cjs.js.map +1 -1
- package/index.js +14 -8
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +1 -1
- package/med_editor/framework/document-print-offscreen.d.ts +1 -1
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -3391,7 +3391,9 @@ class DocumentRenderObject extends BlockContainerRenderObject {
|
|
3391
3391
|
sel: 'g#page-num',
|
3392
3392
|
data: {
|
3393
3393
|
ns: 'http://www.w3.org/2000/svg',
|
3394
|
-
attrs: {
|
3394
|
+
attrs: {
|
3395
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
3396
|
+
}
|
3395
3397
|
},
|
3396
3398
|
children: []
|
3397
3399
|
};
|
@@ -4792,15 +4794,19 @@ class TextGroupRenderObject extends LeafRenderObject {
|
|
4792
4794
|
else if (props.vertAlign === 'superscript') ;
|
4793
4795
|
const fontSize = (props.vertAlign ? props.fontSize * 3 / 5 : props.fontSize);
|
4794
4796
|
const arr = [];
|
4797
|
+
let text = '';
|
4795
4798
|
this.textMeasures.reduce((prev, curr) => {
|
4796
|
-
|
4799
|
+
if (curr.char !== ' ') {
|
4800
|
+
arr.push(prev);
|
4801
|
+
text += curr.char;
|
4802
|
+
}
|
4797
4803
|
return curr.actualSize + prev;
|
4798
4804
|
}, this.rect.x);
|
4799
4805
|
const x = arr.join(' ');
|
4800
4806
|
const y = this.rect.y + vertHeight; //this.textMeasures.map(item => this.rect.y + vertHeight).join(' ');
|
4801
|
-
const text = this.textMeasures.map(item => {
|
4802
|
-
|
4803
|
-
}).join('');
|
4807
|
+
// const text = this.textMeasures.map(item => {
|
4808
|
+
// return item.char
|
4809
|
+
// }).join('');
|
4804
4810
|
const t = {
|
4805
4811
|
sel: 'text',
|
4806
4812
|
text: text,
|
@@ -27199,7 +27205,7 @@ class DocEditor {
|
|
27199
27205
|
if (!this.canSetCursor() || !this.documentEvent.startHitInfo) {
|
27200
27206
|
this.selectionState.editable = false;
|
27201
27207
|
this.docCtx.selectionState.cursorPos = null;
|
27202
|
-
this.hiddenInput();
|
27208
|
+
this.hiddenInput(false);
|
27203
27209
|
return false;
|
27204
27210
|
}
|
27205
27211
|
const cursorRect = this.getCursorRect();
|
@@ -27231,12 +27237,12 @@ class DocEditor {
|
|
27231
27237
|
this.editInput.focus();
|
27232
27238
|
}
|
27233
27239
|
}
|
27234
|
-
hiddenInput() {
|
27240
|
+
hiddenInput(reset = true) {
|
27235
27241
|
//this.input.style.display = 'none';
|
27236
27242
|
this.editInput.style.left = '-2px';
|
27237
27243
|
this.editInput.style.top = '-2px';
|
27238
27244
|
this.editInput.readOnly = true;
|
27239
|
-
this.editInput.focus();
|
27245
|
+
!reset && this.editInput.focus();
|
27240
27246
|
}
|
27241
27247
|
/**
|
27242
27248
|
* 设置光标位置
|