@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.js
CHANGED
@@ -11329,6 +11329,10 @@ class ParagraphMeasure {
|
|
11329
11329
|
}
|
11330
11330
|
else if (paraElement.props.textAlign === 'justify') {
|
11331
11331
|
const renderUnitCount = this.getRenderUnitLength(paraLineRender.line);
|
11332
|
+
if (paraLineIndex === counter - 1 || renderUnitCount === 1) {
|
11333
|
+
return;
|
11334
|
+
//return indent;
|
11335
|
+
}
|
11332
11336
|
const spaceWidth = (limitWidth - paraLineRender.line.rect.width) / (renderUnitCount - 1);
|
11333
11337
|
this.setAlignJustify(paraLineRender.line, 0, spaceWidth);
|
11334
11338
|
//return indent;
|
@@ -15846,12 +15850,14 @@ class DocumentChange {
|
|
15846
15850
|
}
|
15847
15851
|
/**
|
15848
15852
|
* 根据开始位置和结束位置,将字符切割成指定的区间
|
15849
|
-
* @param
|
15853
|
+
* @param text
|
15850
15854
|
* @param start
|
15851
15855
|
* @param end
|
15852
15856
|
* @returns
|
15853
15857
|
*/
|
15854
15858
|
static splitTextGroupByRange(text, start, end) {
|
15859
|
+
start = Math.floor(start);
|
15860
|
+
end = Math.floor(end);
|
15855
15861
|
end = end === -1 ? text.textMeasures.length : end;
|
15856
15862
|
if (start === end) {
|
15857
15863
|
return null;
|