@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.js
CHANGED
@@ -3361,7 +3361,9 @@ class DocumentRenderObject extends BlockContainerRenderObject {
|
|
3361
3361
|
sel: 'g#page-num',
|
3362
3362
|
data: {
|
3363
3363
|
ns: 'http://www.w3.org/2000/svg',
|
3364
|
-
attrs: {
|
3364
|
+
attrs: {
|
3365
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
3366
|
+
}
|
3365
3367
|
},
|
3366
3368
|
children: []
|
3367
3369
|
};
|
@@ -4762,15 +4764,19 @@ class TextGroupRenderObject extends LeafRenderObject {
|
|
4762
4764
|
else if (props.vertAlign === 'superscript') ;
|
4763
4765
|
const fontSize = (props.vertAlign ? props.fontSize * 3 / 5 : props.fontSize);
|
4764
4766
|
const arr = [];
|
4767
|
+
let text = '';
|
4765
4768
|
this.textMeasures.reduce((prev, curr) => {
|
4766
|
-
|
4769
|
+
if (curr.char !== ' ') {
|
4770
|
+
arr.push(prev);
|
4771
|
+
text += curr.char;
|
4772
|
+
}
|
4767
4773
|
return curr.actualSize + prev;
|
4768
4774
|
}, this.rect.x);
|
4769
4775
|
const x = arr.join(' ');
|
4770
4776
|
const y = this.rect.y + vertHeight; //this.textMeasures.map(item => this.rect.y + vertHeight).join(' ');
|
4771
|
-
const text = this.textMeasures.map(item => {
|
4772
|
-
|
4773
|
-
}).join('');
|
4777
|
+
// const text = this.textMeasures.map(item => {
|
4778
|
+
// return item.char
|
4779
|
+
// }).join('');
|
4774
4780
|
const t = {
|
4775
4781
|
sel: 'text',
|
4776
4782
|
text: text,
|
@@ -27169,7 +27175,7 @@ class DocEditor {
|
|
27169
27175
|
if (!this.canSetCursor() || !this.documentEvent.startHitInfo) {
|
27170
27176
|
this.selectionState.editable = false;
|
27171
27177
|
this.docCtx.selectionState.cursorPos = null;
|
27172
|
-
this.hiddenInput();
|
27178
|
+
this.hiddenInput(false);
|
27173
27179
|
return false;
|
27174
27180
|
}
|
27175
27181
|
const cursorRect = this.getCursorRect();
|
@@ -27201,12 +27207,12 @@ class DocEditor {
|
|
27201
27207
|
this.editInput.focus();
|
27202
27208
|
}
|
27203
27209
|
}
|
27204
|
-
hiddenInput() {
|
27210
|
+
hiddenInput(reset = true) {
|
27205
27211
|
//this.input.style.display = 'none';
|
27206
27212
|
this.editInput.style.left = '-2px';
|
27207
27213
|
this.editInput.style.top = '-2px';
|
27208
27214
|
this.editInput.readOnly = true;
|
27209
|
-
this.editInput.focus();
|
27215
|
+
!reset && this.editInput.focus();
|
27210
27216
|
}
|
27211
27217
|
/**
|
27212
27218
|
* 设置光标位置
|