@hailin-zheng/editor-core 2.0.26 → 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.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
- arr.push(prev);
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
- return item.char;
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,