@hailin-zheng/editor-core 2.1.2 → 2.1.4
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 -9
- package/index-cjs.js.map +1 -1
- package/index.js +15 -9
- package/index.js.map +1 -1
- package/med_editor/framework/editor-calendar-vnode.d.ts +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -16341,10 +16341,10 @@ class PermanentTeethElement extends LeafElement {
|
|
16341
16341
|
constructor() {
|
16342
16342
|
super('permanent-teeth');
|
16343
16343
|
this.props = new PermanentTeethProps();
|
16344
|
-
this.props.topLeft = '
|
16345
|
-
this.props.topRight = '
|
16346
|
-
this.props.bottomLeft = '
|
16347
|
-
this.props.bottomRight = '
|
16344
|
+
this.props.topLeft = '';
|
16345
|
+
this.props.topRight = '';
|
16346
|
+
this.props.bottomLeft = '';
|
16347
|
+
this.props.bottomRight = '';
|
16348
16348
|
}
|
16349
16349
|
clone(data) {
|
16350
16350
|
const clone = new PermanentTeethElement();
|
@@ -21126,13 +21126,18 @@ class DocumentSvg {
|
|
21126
21126
|
if (!this.viewOptions.virtualViewMode || this.mode === 'print') {
|
21127
21127
|
return true;
|
21128
21128
|
}
|
21129
|
+
const { scale } = this.viewOptions;
|
21129
21130
|
const viewBoxRect = {
|
21130
21131
|
x: this.viewOptions.pageOffset.x,
|
21131
21132
|
y: this.viewOptions.pageOffset.y,
|
21132
21133
|
width: this.viewOptions.viewSettings.width,
|
21133
21134
|
height: this.viewOptions.viewSettings.height
|
21134
21135
|
};
|
21135
|
-
const eleRect = item.rect;
|
21136
|
+
const eleRect = { ...item.rect };
|
21137
|
+
eleRect.x = eleRect.x * scale;
|
21138
|
+
eleRect.y = eleRect.y * scale;
|
21139
|
+
eleRect.width = eleRect.width * scale;
|
21140
|
+
eleRect.height = eleRect.height * scale;
|
21136
21141
|
return CommonUtil.isIntersect(viewBoxRect, eleRect);
|
21137
21142
|
}
|
21138
21143
|
getPageSvgVNode(item) {
|
@@ -26393,9 +26398,10 @@ class EditorCalendarVNode {
|
|
26393
26398
|
this.currTime.value = null;
|
26394
26399
|
this.selectedTime.value = null;
|
26395
26400
|
}
|
26396
|
-
render(position, dataValue) {
|
26401
|
+
render(position, dataValue, format = 'YYYY-MM-DD HH:mm:ss') {
|
26402
|
+
format = format ?? 'YYYY-MM-DD HH:mm:ss';
|
26397
26403
|
if (!this.currentDate && dataValue) {
|
26398
|
-
const currDataValue = moment(dataValue);
|
26404
|
+
const currDataValue = moment(dataValue, format);
|
26399
26405
|
this.currYear.value = currDataValue.year();
|
26400
26406
|
this.currMonth.value = currDataValue.month();
|
26401
26407
|
this.selectedDate.value = currDataValue.format('YYYY-MM-DD');
|
@@ -28555,7 +28561,7 @@ class DocEditor {
|
|
28555
28561
|
if (!dataEle.isValid(currVal)) {
|
28556
28562
|
currVal = '';
|
28557
28563
|
}
|
28558
|
-
return calendar.render(position, currVal);
|
28564
|
+
return calendar.render(position, currVal, dataEle.props.format);
|
28559
28565
|
}
|
28560
28566
|
calendar.reset();
|
28561
28567
|
return null;
|
@@ -28619,7 +28625,7 @@ class DocEditor {
|
|
28619
28625
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28620
28626
|
}
|
28621
28627
|
version() {
|
28622
|
-
return "2.1.
|
28628
|
+
return "2.1.4";
|
28623
28629
|
}
|
28624
28630
|
}
|
28625
28631
|
|