@hailin-zheng/editor-core 2.1.7 → 2.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 +9 -6
- package/index-cjs.js.map +1 -1
- package/index.js +9 -6
- package/index.js.map +1 -1
- package/med_editor/framework/element-define.d.ts +1 -0
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -1581,6 +1581,9 @@ class PageOptions {
|
|
1581
1581
|
set height(value) {
|
1582
1582
|
this._height = value;
|
1583
1583
|
}
|
1584
|
+
clone() {
|
1585
|
+
return new PageOptions(this._width, this._height, this.orient);
|
1586
|
+
}
|
1584
1587
|
}
|
1585
1588
|
class ViewOptions {
|
1586
1589
|
copyRightInfo;
|
@@ -1855,7 +1858,7 @@ class TextProps extends INotifyPropertyChanged {
|
|
1855
1858
|
}
|
1856
1859
|
getSerializeProps(viewOptions) {
|
1857
1860
|
const props = {};
|
1858
|
-
if (this.color && this.color !== viewOptions.defaultColor) {
|
1861
|
+
if (this.color && this.color !== viewOptions.defaultColor && this.color !== '#000000') {
|
1859
1862
|
props["color"] = this.color;
|
1860
1863
|
}
|
1861
1864
|
if (this.fontName && this.fontName !== viewOptions.defaultFontName) {
|
@@ -26279,8 +26282,8 @@ class DocumentPrintOffscreenBase {
|
|
26279
26282
|
console.warn('无可打印页');
|
26280
26283
|
return;
|
26281
26284
|
}
|
26282
|
-
const docProps = this.docCtx.
|
26283
|
-
printNodes(canvasNodes,
|
26285
|
+
const docProps = this.docCtx.viewOptions.docPageSettings.clone();
|
26286
|
+
printNodes(canvasNodes, docProps, {
|
26284
26287
|
beforePrint: () => this.beforePrint.next(),
|
26285
26288
|
afterPrint: () => this.afterPrint.next()
|
26286
26289
|
});
|
@@ -26309,7 +26312,7 @@ class DocumentPrintOffscreenBase {
|
|
26309
26312
|
console.warn('无可打印页');
|
26310
26313
|
return;
|
26311
26314
|
}
|
26312
|
-
const docProps = this.docCtx.viewOptions.docPageSettings;
|
26315
|
+
const docProps = this.docCtx.viewOptions.docPageSettings.clone();
|
26313
26316
|
// if (docProps.orient === 'landscape') {
|
26314
26317
|
// svgNodes = svgNodes.map(item => 'data:image/svg+xml;base64,' + CommonUtil.btoa(item)).map(item => `<img src="${item}" width="${docProps.width}px" height="${docProps.height-1}px" style="display: block"/>`);
|
26315
26318
|
// }
|
@@ -27738,7 +27741,7 @@ class DocEditor {
|
|
27738
27741
|
docDblClickHandle(evt) {
|
27739
27742
|
//1.如果在数据元中双击,则默认选中数据元内部的所有内容
|
27740
27743
|
const currDataEle = this.getCurrentDataElement();
|
27741
|
-
if (currDataEle && currDataEle instanceof DataElementInlineGroup && currDataEle.length > 2) {
|
27744
|
+
if (currDataEle && currDataEle instanceof DataElementInlineGroup && currDataEle.length > 2 && this.selectionState.startControl instanceof TextGroupElement) {
|
27742
27745
|
const range = new SelectionRange();
|
27743
27746
|
range.setStart(currDataEle.startDecorate, 1);
|
27744
27747
|
range.setEnd(currDataEle.endDecorate, 0);
|
@@ -28738,7 +28741,7 @@ class DocEditor {
|
|
28738
28741
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28739
28742
|
}
|
28740
28743
|
version() {
|
28741
|
-
return "2.1.
|
28744
|
+
return "2.1.9";
|
28742
28745
|
}
|
28743
28746
|
}
|
28744
28747
|
|