@hailin-zheng/editor-core 1.1.8 → 1.1.10
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 +15 -2
- package/index-cjs.js.map +1 -1
- package/index.js +15 -2
- 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;
|
@@ -19037,6 +19043,8 @@ class SurfaceView extends NodeItems {
|
|
19037
19043
|
}
|
19038
19044
|
hiddenInput() {
|
19039
19045
|
this.input.style.display = 'none';
|
19046
|
+
this.input.style.left = '0';
|
19047
|
+
this.input.style.top = '0';
|
19040
19048
|
}
|
19041
19049
|
endInput() {
|
19042
19050
|
}
|
@@ -20484,6 +20492,10 @@ class CanvasTextEditor extends AbsolutePanel {
|
|
20484
20492
|
* 文档点击事件
|
20485
20493
|
*/
|
20486
20494
|
docClickHandle(evt) {
|
20495
|
+
const appCtx = getCurrentActiveAppContext();
|
20496
|
+
if (appCtx) {
|
20497
|
+
appCtx.root.hiddenInput();
|
20498
|
+
}
|
20487
20499
|
this.setCursor();
|
20488
20500
|
this.updateSelection();
|
20489
20501
|
this.onClickEvent.next(evt);
|
@@ -21201,7 +21213,8 @@ class CanvasTextEditor extends AbsolutePanel {
|
|
21201
21213
|
/**
|
21202
21214
|
* 注册编辑器格式读取器
|
21203
21215
|
*/
|
21204
|
-
registerReaderFactory(handler) {
|
21216
|
+
registerReaderFactory(handler) {
|
21217
|
+
}
|
21205
21218
|
}
|
21206
21219
|
|
21207
21220
|
/**
|