Skip to content

Commit 6f4ba17

Browse files
committed
[dev] temporarily remove updates for pdf()/png() methods
1 parent f200b4b commit 6f4ba17

File tree

2 files changed

+8
-28
lines changed

2 files changed

+8
-28
lines changed

docs/api/export/pdf_method.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ To avoid problems during export, all images for Diagram shapes must be set eithe
1717
### Usage
1818

1919
~~~jsx
20-
pdf(config?: object): Promise<void>;
20+
pdf(config?: object): void;
2121
~~~
2222

23-
### Returns
24-
25-
A promise of data export
26-
2723
### Parameters
2824

2925
- `config` - (optional) an object with export settings. You can specify the following settings for export to PDF:
@@ -57,26 +53,20 @@ A promise of data export
5753

5854
### Example
5955

60-
~~~jsx
56+
~~~jsx {7,10-13}
6157
const diagram = new dhx.Diagram("diagram_container", {
6258
// config options
6359
});
6460
diagram.data.parse(data);
6561

6662
// default export
67-
diagram.export.pdf()
68-
.then(() => console.log("success"))
69-
.catch(() => console.log("failure"))
70-
.finally(() => console.log("finished"));
63+
diagram.export.pdf();
7164

7265
// export with config settings
7366
diagram.export.pdf({
7467
url: "https://export.dhtmlx.com/diagram/pdf/5.0.0",
7568
name:"result_pdf"
76-
})
77-
.then(() => console.log("success"))
78-
.catch(() => console.log("failure"))
79-
.finally(() => console.log("finished"));
69+
});
8070
~~~
8171

8272
### Details

docs/api/export/png_method.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ To avoid problems during export, all images for Diagram shapes must be set eithe
1717
### Usage
1818

1919
~~~jsx
20-
png(config?: object): Promise<void>;
20+
png(config?: object): void;
2121
~~~
2222

23-
### Returns
24-
25-
A promise of data export
26-
2723
### Parameters
2824

2925
- `config` - (optional) an object with export settings. You can specify the following settings for export to PNG:
@@ -34,25 +30,19 @@ A promise of data export
3430

3531
### Example
3632

37-
~~~jsx
33+
~~~jsx {7,10-13}
3834
const diagram = new dhx.Diagram("diagram_container", {
3935
// config options
4036
});
4137
diagram.data.parse(data);
4238

4339
// default export
44-
diagram.export.png()
45-
.then(() => console.log("success"))
46-
.catch(() => console.log("failure"))
47-
.finally(() => console.log("finished"));
40+
diagram.export.png();
4841

4942
// export with config settings
5043
diagram.export.png({
5144
name: "result_png"
52-
})
53-
.then(() => console.log("success"))
54-
.catch(() => console.log("failure"))
55-
.finally(() => console.log("finished"));
45+
});
5646
~~~
5747

5848
**Related articles**: [Exporting Diagram](../../../guides/data_export/)

0 commit comments

Comments
 (0)