@hailin-zheng/editor-core 2.1.22 → 2.1.23
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
@@ -4649,7 +4649,9 @@ class TableRowElement extends BlockContainerElement {
|
|
4649
4649
|
}
|
4650
4650
|
}
|
4651
4651
|
createRenderObject() {
|
4652
|
-
|
4652
|
+
const rowRender = new TableRowRenderObject(this);
|
4653
|
+
rowRender.minHeight = this.props.minHeight;
|
4654
|
+
return rowRender;
|
4653
4655
|
}
|
4654
4656
|
serialize(viewOptions) {
|
4655
4657
|
return {
|
@@ -4682,10 +4684,13 @@ class TableRowRenderObject extends MuiltBlockLineRenderObject {
|
|
4682
4684
|
remeasureState = true;
|
4683
4685
|
//当前行是否存在合并单元格
|
4684
4686
|
hasMergeCells = undefined;
|
4687
|
+
//行最小高度,用于标记当前行临时的最小高度状态
|
4688
|
+
minHeight = -1;
|
4685
4689
|
clone() {
|
4686
4690
|
const cloneRender = new TableRowRenderObject(this.element);
|
4687
4691
|
cloneRender.remeasureState = this.remeasureState;
|
4688
4692
|
cloneRender.hasMergeCells = this.hasMergeCells;
|
4693
|
+
cloneRender.minHeight = this.minHeight;
|
4689
4694
|
cloneRender.rect = ElementUtil.cloneRect(this.rect);
|
4690
4695
|
for (let i = 0; i < this.length; i++) {
|
4691
4696
|
cloneRender.addChild(this.getChild(i).clone());
|
@@ -11071,7 +11076,7 @@ class ElementUtil {
|
|
11071
11076
|
canvas.style.height = scaleHeight + 'px';
|
11072
11077
|
canvas.width = scaleWidth * dpr;
|
11073
11078
|
canvas.height = scaleHeight * dpr;
|
11074
|
-
ctx.textBaseline = 'top';
|
11079
|
+
//ctx.textBaseline = 'top';
|
11075
11080
|
ctx.scale(dpr, dpr);
|
11076
11081
|
}
|
11077
11082
|
// static setOffscreenCanvas(canvas: OffscreenCanvas, ctx: OffscreenCanvasRenderingContext2D, viewOptions: { width: number, height: number }, scale: number = 1): void {
|
@@ -11221,8 +11226,7 @@ class ElementUtil {
|
|
11221
11226
|
return innerRect.height;
|
11222
11227
|
}
|
11223
11228
|
static remeasureTableRow(rowRender, forceColIndex = -1) {
|
11224
|
-
|
11225
|
-
let maxCellHeight = rowEle.props.minHeight > 20 ? rowEle.props.minHeight : 20;
|
11229
|
+
let maxCellHeight = rowRender.minHeight > 20 ? rowRender.minHeight : 20;
|
11226
11230
|
//限制行最小高度
|
11227
11231
|
maxCellHeight = maxCellHeight < 20 ? 20 : maxCellHeight;
|
11228
11232
|
//获取行内非纵向合并单元格的最高单元格高度
|
@@ -12770,6 +12774,13 @@ class ElementUtil {
|
|
12770
12774
|
}
|
12771
12775
|
}
|
12772
12776
|
|
12777
|
+
var TextUnitsHolder;
|
12778
|
+
(function (TextUnitsHolder) {
|
12779
|
+
TextUnitsHolder[TextUnitsHolder["char"] = 0] = "char";
|
12780
|
+
TextUnitsHolder[TextUnitsHolder["sourceSize"] = 1] = "sourceSize";
|
12781
|
+
TextUnitsHolder[TextUnitsHolder["actualSize"] = 2] = "actualSize";
|
12782
|
+
TextUnitsHolder[TextUnitsHolder["actualBoundingBoxAscent"] = 3] = "actualBoundingBoxAscent";
|
12783
|
+
})(TextUnitsHolder || (TextUnitsHolder = {}));
|
12773
12784
|
class RenderContext {
|
12774
12785
|
mainContext;
|
12775
12786
|
contentContext;
|
@@ -14985,13 +14996,15 @@ class DocumentArrange {
|
|
14985
14996
|
let currRow = rows[j];
|
14986
14997
|
const cutRows = [];
|
14987
14998
|
while (currRow) {
|
14988
|
-
const minHeight = currRow.
|
14999
|
+
const minHeight = currRow.minHeight;
|
14989
15000
|
const rowContentHeight = this.getBlockLineHeight(currRow);
|
14990
15001
|
if (rowContentHeight + sumHeight > limitHeight) {
|
14991
15002
|
//行存在最小高度,且当前行内容的高度小于最小高度,且当前行跨页的情况下,不截断该行
|
14992
15003
|
if (minHeight > 0 && minHeight > rowContentHeight) {
|
14993
15004
|
break;
|
14994
15005
|
}
|
15006
|
+
//设定最小高度不生效
|
15007
|
+
currRow.minHeight = -1;
|
14995
15008
|
//限制的外框尺寸
|
14996
15009
|
const availHeight = limitHeight - sumHeight;
|
14997
15010
|
const limitRenderInnerHeight = ElementUtil.innerRectMaxHeight(tbRender, availHeight);
|
@@ -15042,6 +15055,9 @@ class DocumentArrange {
|
|
15042
15055
|
// }
|
15043
15056
|
render.remeasureState = true;
|
15044
15057
|
const cloneRowRender = render.element.createRenderObject();
|
15058
|
+
if (cloneRowRender.minHeight > 0 && render.minHeight <= 0) {
|
15059
|
+
cloneRowRender.minHeight = render.minHeight;
|
15060
|
+
}
|
15045
15061
|
cloneRowRender.rect.width = render.rect.width;
|
15046
15062
|
//cloneRowRender.rect.maxWidth = render.rect.height;
|
15047
15063
|
const cellRenders = [...render.getItems()];
|
@@ -27820,7 +27836,7 @@ class DocEditor {
|
|
27820
27836
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
27821
27837
|
}
|
27822
27838
|
version() {
|
27823
|
-
return "2.1.
|
27839
|
+
return "2.1.23";
|
27824
27840
|
}
|
27825
27841
|
switchPageHeaderEditor() {
|
27826
27842
|
this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);
|
@@ -28024,5 +28040,5 @@ function removeDuplicatesEvent(events) {
|
|
28024
28040
|
return arr;
|
28025
28041
|
}
|
28026
28042
|
|
28027
|
-
export { BlockContainerElement, BlockContainerRenderObject, BlockContentElement, BlockContentRenderObject, BlockLineRectRenderObject, BodyPartProps, BooleanEnum, BorderProps, BranchElement, BranchRenderObject, BreakElement, BreakFactory, BreakRenderObject, CheckBoxElement, CheckBoxFactory, CheckBoxProps, CheckBoxRenderObject, ColumnPatchUtil, CommContentBaseElement, CommContentBaseRenderObject, CommContentElement, CommContentProps, CommContentRenderObject, CommProps, CommentContentFactory, CommentElement, CommentFactory, CommentRenderObject, CommentsFactory, CommentsUtil, CommonUtil, CommsContainerElement, CommsContainerRenderObject, ContentMenuItem, ContextMenuElementEvent, CopyElementEvent, DOMEventSource, DOMSubscription, DataDecorateElement, DataDecorateProps, DataDecorateRenderObject, DataEleBaseProps, DataEleBaseTextProps, DataEleCheckProps, DataEleDateProps, DataEleImageProps, DataEleListProps, DataEleMHProps, DataElementBarcode, DataElementBarcodeFactory, DataElementBarcodeProps, DataElementBarcodeRenderObject, DataElementBaseFactory, DataElementCheck, DataElementCheckFactory, DataElementCheckRenderObject, DataElementDate, DataElementDateFactory, DataElementDateRenderObject, DataElementGroupElement, DataElementGroupFactory, DataElementGroupProps, DataElementGroupRenderObject, DataElementImage, DataElementImgFactory, DataElementInlineGroup, DataElementLeaf, DataElementList, DataElementListFactory, DataElementListRenderObject, DataElementMH, DataElementMHFactory, DataElementRenderObject, DataElementText, DataElementTextFactory, DataElementTextRenderObject, DataImageRenderObject, DataRenderMH, DocEditor, DocMode, DocumentBodyElement, DocumentBodyFactory, DocumentBodyPartElement, DocumentBodyPartFactory, DocumentBodyPartRenderObject, DocumentBodyRenderObject, DocumentChange, DocumentCombine, DocumentComment, DocumentContainerRender, DocumentContext, DocumentCursor, DocumentElement, DocumentEvalFunc, DocumentEvent, DocumentFactory, DocumentFooterElement, DocumentFooterFactory, DocumentFooterRenderObject, DocumentHeaderElement, DocumentHeaderFactory, DocumentHeaderRenderObject, DocumentInput, DocumentPaint, DocumentPrintOffscreen, DocumentPrintOffscreenBase, DocumentProps, DocumentRenderObject, DocumentSelection, DocumentTemplate, DropElementEvent, EditMode, EditorContext, Element, ElementEvent, ElementFactory, ElementPaint, ElementReader, ElementSerialize, ElementUtil, EventBus, EventMap, EventSourceCore$1 as EventSourceCore, FillNullSpaceElement, FillNullSpaceRenderObject, GetTrackTipsEvent, GotCursorEvent, IDispose, INotifyPropertyChanged, InlineBlockContainer, InlineGroupElement, InlineGroupInputElement, InlineGroupRenderObject, InlineMuiltBlockLineRenderObject, InputElementEvent, IsInSideDataElement, IsInSideInlineGroupInputElement, KeyboradElementEvent, LeafElement, LeafRenderObject, LostCursorEvent, MarginProps, ModifyFlag$1 as ModifyFlag, MouseElementEvent, MousedownElementEvent, MuiltBlockLineRenderObject, OnceSubject, PSymbolElement, PSymbolRenderObject, PaddingProps, PageBreakElement, PageBreakFactory, PageBreakRenderObject, PageOptions, PaintContent, ParagraphElement, ParagraphFactory, ParagraphLineRectRenderObject, ParagraphNumberType, ParagraphProps, ParagraphRenderObject, PasteElementEvent, PermanentTeethElement, PermanentTeethFactory, PermanentTeethProps, PermanentTeethRenderObject, PictureElement, PictureFactory, PictureProps, PictureRenderObject, RadioBoxElement, RadioBoxFactory, RadioBoxProps, RadioBoxRenderObject, RangeUtil, Rect, RenderContext, RenderObject, RenderObjectType, ResizeLeafRenderObject, RunElementFactory, SVGElement, SVGFactory, SVGProps, SVGRenderObject, SelectionOverlays, SelectionRange, SelectionState, Subject$1 as Subject, SubjectSubscription$1 as SubjectSubscription, Subscription$1 as Subscription, TabElement, TabFactory, TabRenderObject, TableCellElement, TableCellFactory, TableCellProps, TableCellRenderObject, TableElement, TableFactory, TableProps, TableRenderObject, TableRowElement, TableRowFactory, TableRowProps, TableRowRenderObject, TableSplitCell, TableUtil, TextGroupElement, TextGroupFactory, TextGroupRenderObject, TextProps, TrackRunElement, TrackRunProps, TrackRunRenderObject, TrackRunTypeEnum, ValidateCondition, ValidateElement, ValidateProps, ValidateRenderObject, ViewOptions, addReturn, clearChildrenRenderCache, clearTraces, cloneChildren, cloneElementBase, createPrintTemplate, defaultParaHanging, deleteCurrentParagraph, docOpsMap, documentPrint, drawDecorator, elementTypeEventHandler, exportDecoratorHTML, falseChar, fontMapFunc, formatEle, fromEvent, generatePatch, getCalleeName, getFocusTextSegment, inputText, insertEle, invokeTypeHandler, isDate, logUpdateEleProps, objectToString$4 as objectToString, onTableContextmenu, onceTask, parser, printNodes, reactiveMap, removeEle, removeText, runTextLineRender, setChildrenModifyFlag, setDataElementProps, setNotifyChangedCallback, setTraceTrackingFlag, suppressTracking, targetMaps, textLineRenderMode, toRawType, toTypeString, trueChar, validateDataEle, validateDataEleRenderObj, validateInlineInputRenderObj, watchChanged };
|
28043
|
+
export { BlockContainerElement, BlockContainerRenderObject, BlockContentElement, BlockContentRenderObject, BlockLineRectRenderObject, BodyPartProps, BooleanEnum, BorderProps, BranchElement, BranchRenderObject, BreakElement, BreakFactory, BreakRenderObject, CheckBoxElement, CheckBoxFactory, CheckBoxProps, CheckBoxRenderObject, ColumnPatchUtil, CommContentBaseElement, CommContentBaseRenderObject, CommContentElement, CommContentProps, CommContentRenderObject, CommProps, CommentContentFactory, CommentElement, CommentFactory, CommentRenderObject, CommentsFactory, CommentsUtil, CommonUtil, CommsContainerElement, CommsContainerRenderObject, ContentMenuItem, ContextMenuElementEvent, CopyElementEvent, DOMEventSource, DOMSubscription, DataDecorateElement, DataDecorateProps, DataDecorateRenderObject, DataEleBaseProps, DataEleBaseTextProps, DataEleCheckProps, DataEleDateProps, DataEleImageProps, DataEleListProps, DataEleMHProps, DataElementBarcode, DataElementBarcodeFactory, DataElementBarcodeProps, DataElementBarcodeRenderObject, DataElementBaseFactory, DataElementCheck, DataElementCheckFactory, DataElementCheckRenderObject, DataElementDate, DataElementDateFactory, DataElementDateRenderObject, DataElementGroupElement, DataElementGroupFactory, DataElementGroupProps, DataElementGroupRenderObject, DataElementImage, DataElementImgFactory, DataElementInlineGroup, DataElementLeaf, DataElementList, DataElementListFactory, DataElementListRenderObject, DataElementMH, DataElementMHFactory, DataElementRenderObject, DataElementText, DataElementTextFactory, DataElementTextRenderObject, DataImageRenderObject, DataRenderMH, DocEditor, DocMode, DocumentBodyElement, DocumentBodyFactory, DocumentBodyPartElement, DocumentBodyPartFactory, DocumentBodyPartRenderObject, DocumentBodyRenderObject, DocumentChange, DocumentCombine, DocumentComment, DocumentContainerRender, DocumentContext, DocumentCursor, DocumentElement, DocumentEvalFunc, DocumentEvent, DocumentFactory, DocumentFooterElement, DocumentFooterFactory, DocumentFooterRenderObject, DocumentHeaderElement, DocumentHeaderFactory, DocumentHeaderRenderObject, DocumentInput, DocumentPaint, DocumentPrintOffscreen, DocumentPrintOffscreenBase, DocumentProps, DocumentRenderObject, DocumentSelection, DocumentTemplate, DropElementEvent, EditMode, EditorContext, Element, ElementEvent, ElementFactory, ElementPaint, ElementReader, ElementSerialize, ElementUtil, EventBus, EventMap, EventSourceCore$1 as EventSourceCore, FillNullSpaceElement, FillNullSpaceRenderObject, GetTrackTipsEvent, GotCursorEvent, IDispose, INotifyPropertyChanged, InlineBlockContainer, InlineGroupElement, InlineGroupInputElement, InlineGroupRenderObject, InlineMuiltBlockLineRenderObject, InputElementEvent, IsInSideDataElement, IsInSideInlineGroupInputElement, KeyboradElementEvent, LeafElement, LeafRenderObject, LostCursorEvent, MarginProps, ModifyFlag$1 as ModifyFlag, MouseElementEvent, MousedownElementEvent, MuiltBlockLineRenderObject, OnceSubject, PSymbolElement, PSymbolRenderObject, PaddingProps, PageBreakElement, PageBreakFactory, PageBreakRenderObject, PageOptions, PaintContent, ParagraphElement, ParagraphFactory, ParagraphLineRectRenderObject, ParagraphNumberType, ParagraphProps, ParagraphRenderObject, PasteElementEvent, PermanentTeethElement, PermanentTeethFactory, PermanentTeethProps, PermanentTeethRenderObject, PictureElement, PictureFactory, PictureProps, PictureRenderObject, RadioBoxElement, RadioBoxFactory, RadioBoxProps, RadioBoxRenderObject, RangeUtil, Rect, RenderContext, RenderObject, RenderObjectType, ResizeLeafRenderObject, RunElementFactory, SVGElement, SVGFactory, SVGProps, SVGRenderObject, SelectionOverlays, SelectionRange, SelectionState, Subject$1 as Subject, SubjectSubscription$1 as SubjectSubscription, Subscription$1 as Subscription, TabElement, TabFactory, TabRenderObject, TableCellElement, TableCellFactory, TableCellProps, TableCellRenderObject, TableElement, TableFactory, TableProps, TableRenderObject, TableRowElement, TableRowFactory, TableRowProps, TableRowRenderObject, TableSplitCell, TableUtil, TextGroupElement, TextGroupFactory, TextGroupRenderObject, TextProps, TextUnitsHolder, TrackRunElement, TrackRunProps, TrackRunRenderObject, TrackRunTypeEnum, ValidateCondition, ValidateElement, ValidateProps, ValidateRenderObject, ViewOptions, addReturn, clearChildrenRenderCache, clearTraces, cloneChildren, cloneElementBase, createPrintTemplate, defaultParaHanging, deleteCurrentParagraph, docOpsMap, documentPrint, drawDecorator, elementTypeEventHandler, exportDecoratorHTML, falseChar, fontMapFunc, formatEle, fromEvent, generatePatch, getCalleeName, getFocusTextSegment, inputText, insertEle, invokeTypeHandler, isDate, logUpdateEleProps, objectToString$4 as objectToString, onTableContextmenu, onceTask, parser, printNodes, reactiveMap, removeEle, removeText, runTextLineRender, setChildrenModifyFlag, setDataElementProps, setNotifyChangedCallback, setTraceTrackingFlag, suppressTracking, targetMaps, textLineRenderMode, toRawType, toTypeString, trueChar, validateDataEle, validateDataEleRenderObj, validateInlineInputRenderObj, watchChanged };
|
28028
28044
|
//# sourceMappingURL=index.js.map
|