@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.js
CHANGED
@@ -1552,6 +1552,9 @@ class PageOptions {
|
|
1552
1552
|
set height(value) {
|
1553
1553
|
this._height = value;
|
1554
1554
|
}
|
1555
|
+
clone() {
|
1556
|
+
return new PageOptions(this._width, this._height, this.orient);
|
1557
|
+
}
|
1555
1558
|
}
|
1556
1559
|
class ViewOptions {
|
1557
1560
|
copyRightInfo;
|
@@ -1826,7 +1829,7 @@ class TextProps extends INotifyPropertyChanged {
|
|
1826
1829
|
}
|
1827
1830
|
getSerializeProps(viewOptions) {
|
1828
1831
|
const props = {};
|
1829
|
-
if (this.color && this.color !== viewOptions.defaultColor) {
|
1832
|
+
if (this.color && this.color !== viewOptions.defaultColor && this.color !== '#000000') {
|
1830
1833
|
props["color"] = this.color;
|
1831
1834
|
}
|
1832
1835
|
if (this.fontName && this.fontName !== viewOptions.defaultFontName) {
|
@@ -26250,8 +26253,8 @@ class DocumentPrintOffscreenBase {
|
|
26250
26253
|
console.warn('无可打印页');
|
26251
26254
|
return;
|
26252
26255
|
}
|
26253
|
-
const docProps = this.docCtx.
|
26254
|
-
printNodes(canvasNodes,
|
26256
|
+
const docProps = this.docCtx.viewOptions.docPageSettings.clone();
|
26257
|
+
printNodes(canvasNodes, docProps, {
|
26255
26258
|
beforePrint: () => this.beforePrint.next(),
|
26256
26259
|
afterPrint: () => this.afterPrint.next()
|
26257
26260
|
});
|
@@ -26280,7 +26283,7 @@ class DocumentPrintOffscreenBase {
|
|
26280
26283
|
console.warn('无可打印页');
|
26281
26284
|
return;
|
26282
26285
|
}
|
26283
|
-
const docProps = this.docCtx.viewOptions.docPageSettings;
|
26286
|
+
const docProps = this.docCtx.viewOptions.docPageSettings.clone();
|
26284
26287
|
// if (docProps.orient === 'landscape') {
|
26285
26288
|
// 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"/>`);
|
26286
26289
|
// }
|
@@ -27709,7 +27712,7 @@ class DocEditor {
|
|
27709
27712
|
docDblClickHandle(evt) {
|
27710
27713
|
//1.如果在数据元中双击,则默认选中数据元内部的所有内容
|
27711
27714
|
const currDataEle = this.getCurrentDataElement();
|
27712
|
-
if (currDataEle && currDataEle instanceof DataElementInlineGroup && currDataEle.length > 2) {
|
27715
|
+
if (currDataEle && currDataEle instanceof DataElementInlineGroup && currDataEle.length > 2 && this.selectionState.startControl instanceof TextGroupElement) {
|
27713
27716
|
const range = new SelectionRange();
|
27714
27717
|
range.setStart(currDataEle.startDecorate, 1);
|
27715
27718
|
range.setEnd(currDataEle.endDecorate, 0);
|
@@ -28709,7 +28712,7 @@ class DocEditor {
|
|
28709
28712
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28710
28713
|
}
|
28711
28714
|
version() {
|
28712
|
-
return "2.1.
|
28715
|
+
return "2.1.9";
|
28713
28716
|
}
|
28714
28717
|
}
|
28715
28718
|
|