How to use the @antv/x6.FontStyle.isUnderlined function in @antv/x6

To help you get started, we’ve selected a few @antv/x6 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / x6 / examples / x6-example-drawio / src / pages / graph / format-cell.tsx View on Github external
className={classnames('ant-btn-flag', {
                'ant-btn-checked': FontStyle.isBold(this.state.fontStyle),
              })}
              icon="bold"
              onClick={this.toggleBold}
            />
            <button>
            </button><button style="{{">
            </button><button>
              <i>
                </i></button>
github antvis / x6 / examples / x6-example-drawio / src / pages / graph / format-cell.tsx View on Github external
toggleUnderline = () => {
    this.executeCommand('underline')
    const current = (this.state.fontStyle as number) || 0
    const fontStyle = FontStyle.isUnderlined(this.state.fontStyle)
      ? current - FontStyle.underlined
      : current + FontStyle.underlined
    this.setState({ fontStyle })
  }