Skip to content

Commit 6164029

Browse files
committed
Improvement - Add html2canvas options params to usePrinter calls
1 parent 4a1554d commit 6164029

40 files changed

+82
-42
lines changed

src/components/vue-ui-3d-bar.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ watch(() => props.config, (_newCfg) => {
109109
110110
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
111111
elementId: `3d_bar_${uid.value}`,
112-
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-3d-bar'
112+
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-3d-bar',
113+
options: FINAL_CONFIG.value.userOptions.print
113114
});
114115
115116
const customPalette = computed(() => {

src/components/vue-ui-age-pyramid.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ function prepareChart() {
143143
144144
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
145145
elementId: `vue-ui-age-pyramid_${uid.value}`,
146-
fileName: FINAL_CONFIG.value.style.title.text || 'vue-ui-age-pyramid'
146+
fileName: FINAL_CONFIG.value.style.title.text || 'vue-ui-age-pyramid',
147+
options: FINAL_CONFIG.value.userOptions.print
147148
});
148149
149150
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-bullet.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ const legendConfig = computed(() => {
332332
333333
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
334334
elementId: `bullet_${uid.value}`,
335-
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-bullet'
335+
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-bullet',
336+
options: FINAL_CONFIG.value.userOptions.print
336337
});
337338
338339
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-candlestick.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ onBeforeUnmount(() => {
205205
206206
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
207207
elementId: `vue-ui-candlestick_${uid.value}`,
208-
fileName: FINAL_CONFIG.value.style.title.text || 'vue-ui-candlestick'
208+
fileName: FINAL_CONFIG.value.style.title.text || 'vue-ui-candlestick',
209+
options: FINAL_CONFIG.value.userOptions.print
209210
});
210211
211212
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-carousel-table.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ watch(() => props.dataset, (_) => {
103103
104104
const { isPrinting, isImaging, generatePdf: makePdf, generateImage } = usePrinter({
105105
elementId: `carousel-table_${uid.value}`,
106-
fileName: FINAL_CONFIG.value.caption.text || 'vue-ui-carousel-table'
106+
fileName: FINAL_CONFIG.value.caption.text || 'vue-ui-carousel-table',
107+
options: FINAL_CONFIG.value.userOptions.print
107108
});
108109
109110
const mutableConfig = ref({

src/components/vue-ui-chestnut.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ watch(() => props.config, (_newCfg) => {
103103
104104
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
105105
elementId: `vue-ui-chestnut_${uid.value}`,
106-
fileName: FINAL_CONFIG.value.style.chart.layout.title.text || 'vue-ui-chestnut'
106+
fileName: FINAL_CONFIG.value.style.chart.layout.title.text || 'vue-ui-chestnut',
107+
options: FINAL_CONFIG.value.userOptions.print
107108
});
108109
109110
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-circle-pack.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ watch(() => props.config, (_newCfg) => {
116116
117117
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
118118
elementId: `vue-ui-circle-pack_${uid.value}`,
119-
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-circle-pack'
119+
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-circle-pack',
120+
options: FINAL_CONFIG.value.userOptions.print
120121
});
121122
122123
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-donut-evolution.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ watch(() => props.dataset, (_) => {
225225
226226
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
227227
elementId: uid.value,
228-
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-donut-evolution'
228+
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-donut-evolution',
229+
options: FINAL_CONFIG.value.userOptions.print
229230
});
230231
231232
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-donut.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ watch(() => props.config, (_newCfg) => {
186186
187187
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
188188
elementId: `donut__${uid.value}`,
189-
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-donut'
189+
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-donut',
190+
options: FINAL_CONFIG.value.userOptions.print
190191
});
191192
192193
const hasOptionsNoTitle = computed(() => {

src/components/vue-ui-dumbbell.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ onBeforeUnmount(() => {
175175
176176
const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
177177
elementId: `dumbbell_${uid.value}`,
178-
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-dumbbell'
178+
fileName: FINAL_CONFIG.value.style.chart.title.text || 'vue-ui-dumbbell',
179+
options: FINAL_CONFIG.value.userOptions.print
179180
});
180181
181182
const hasOptionsNoTitle = computed(() => {

0 commit comments

Comments
 (0)