@websy/websy-designs 1.1.2 → 1.1.5

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.
@@ -22,11 +22,8 @@
22
22
  APIService
23
23
  ButtonGroup
24
24
  WebsyUtils
25
- <<<<<<< HEAD
26
25
  WebsyCarousel
27
- =======
28
26
  Pager
29
- >>>>>>> master
30
27
  */
31
28
 
32
29
  /* global XMLHttpRequest fetch ENV */
@@ -247,7 +244,7 @@ class WebsyCarousel {
247
244
  this.options.currentFrame++
248
245
  }
249
246
  this.showFrame(prevFrameIndex, this.options.currentFrame)
250
- // this.play()
247
+ this.play()
251
248
  // document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
252
249
  // .style.transform = `translateX(-100%)`
253
250
  // if (`${this.options.currentFrame === this.options.frames.length - 1}`) {
@@ -282,7 +279,7 @@ class WebsyCarousel {
282
279
  this.options.currentFrame--
283
280
  }
284
281
  this.showFrame(prevFrameIndex, this.options.currentFrame)
285
- // this.play()
282
+ this.play()
286
283
  // document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
287
284
  // .style.transform = `translateX(100%)`
288
285
  }
@@ -348,7 +345,7 @@ class WebsyCarousel {
348
345
  `
349
346
  el.innerHTML = html
350
347
  }
351
- // this.play()
348
+ this.play()
352
349
  // this.showFrameSelector()
353
350
  }
354
351
 
@@ -2057,7 +2054,14 @@ class WebsyPDFButton {
2057
2054
  <a href='${URL.createObjectURL(blob)}' target='_blank'
2058
2055
  `
2059
2056
  if (this.options.directDownload === true) {
2060
- msg += `download='${this.options.fileName || 'Export'}.pdf'`
2057
+ let fileName
2058
+ if (typeof this.options.fileName === 'function') {
2059
+ fileName = this.options.fileName() || 'Export'
2060
+ }
2061
+ else {
2062
+ fileName = this.options.fileName || 'Export'
2063
+ }
2064
+ msg += `download='${fileName}.pdf'`
2061
2065
  }
2062
2066
  msg += `
2063
2067
  >