@hailin-zheng/editor-core 1.1.8 → 1.1.9
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 +7 -1
- package/index-cjs.js.map +1 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/med_editor/framework/document-change.d.ts +1 -1
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -11358,6 +11358,10 @@ class ParagraphMeasure {
|
|
11358
11358
|
}
|
11359
11359
|
else if (paraElement.props.textAlign === 'justify') {
|
11360
11360
|
const renderUnitCount = this.getRenderUnitLength(paraLineRender.line);
|
11361
|
+
if (paraLineIndex === counter - 1 || renderUnitCount === 1) {
|
11362
|
+
return;
|
11363
|
+
//return indent;
|
11364
|
+
}
|
11361
11365
|
const spaceWidth = (limitWidth - paraLineRender.line.rect.width) / (renderUnitCount - 1);
|
11362
11366
|
this.setAlignJustify(paraLineRender.line, 0, spaceWidth);
|
11363
11367
|
//return indent;
|
@@ -15875,12 +15879,14 @@ class DocumentChange {
|
|
15875
15879
|
}
|
15876
15880
|
/**
|
15877
15881
|
* 根据开始位置和结束位置,将字符切割成指定的区间
|
15878
|
-
* @param
|
15882
|
+
* @param text
|
15879
15883
|
* @param start
|
15880
15884
|
* @param end
|
15881
15885
|
* @returns
|
15882
15886
|
*/
|
15883
15887
|
static splitTextGroupByRange(text, start, end) {
|
15888
|
+
start = Math.floor(start);
|
15889
|
+
end = Math.floor(end);
|
15884
15890
|
end = end === -1 ? text.textMeasures.length : end;
|
15885
15891
|
if (start === end) {
|
15886
15892
|
return null;
|