Skip to content

Commit

Permalink
refactor: rename isPDF and isExportingToPDF to isPdfExport
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Oct 16, 2024
1 parent 18fb246 commit ef76866
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DynamicStyles } from './styles.js'
export function renderSingleValueSVG() {
const { formattedValue, icon, subText, fontColor } =
this.userOptions.customSVGOptions
const dynamicStyles = new DynamicStyles(this.userOptions?.isPDF)
const dynamicStyles = new DynamicStyles(this.userOptions?.isPdfExport)
const valueElement = this.renderer
.text(formattedValue)
.css({ color: fontColor, visibility: 'hidden' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ const spacings = [
export const MIN_SIDE_WHITESPACE = 4

export class DynamicStyles {
constructor(isExportingToPDF) {
constructor(isPdfExport) {
this.currentIndex = 0
this.isExportingToPDF = isExportingToPDF
this.isPdfExport = isPdfExport
}
getStyle() {
return {
value: {
...valueStyles[this.currentIndex],
'font-weight': this.isExportingToPDF ? 'normal' : '300',
'font-weight': this.isPdfExport ? 'normal' : '300',
},
subText: subTextStyles[this.currentIndex],
spacing: spacings[this.currentIndex],
Expand Down

0 comments on commit ef76866

Please sign in to comment.