neuronetio / gantt-elastic

Gantt Chart [ javascript gantt chart, gantt component, vue gantt, vue gantt chart, responsive gantt, project manager , vue projects ]

Home Page:https://neuronet.io/gantt-elastic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug with user's font size.

demershov opened this issue · comments

There is the bug with processing the user's font size (dynamicStyle). On line 286 in GanttElastic.vue, fontSize property was got from userOptions.

function prepareStyle(userStyle) {
 let fontSize = '12px';
  let fontFamily = window
    .getComputedStyle(document.body)
    .getPropertyValue('font-family')
    .toString();
  if (typeof userStyle !== 'undefined') {
    if (typeof userStyle.fontSize !== 'undefined') {
      fontSize = userOptions.fontSize;
    }
    if (typeof userStyle.fontFamily !== 'undefined') {
      fontFamily = userStyle.fontFamily;
    }
  }
  return getStyle(fontSize, fontFamily);
}
fontSize = userOptions.fontSize;

The correct behavior is't to get fontSize property from userStyle object.

fontSize = userStyle.fontSize;

aww, ok, thanks

thanks :)

1.0.10