vexchords icon indicating copy to clipboard operation
vexchords copied to clipboard

Scalable chords?

Open Aduffy opened this issue 4 years ago • 1 comments

is there a way to generate chords that are scalable to fit their container instead of a fixed width / height in px?

Aduffy avatar Dec 02 '20 21:12 Aduffy

A bit hacky way to do this is by adding a viewBox to the svg and modify the width and height parameters:

  let svgElement = document.querySelector("#vexchordselector svg")
  svgElement.setAttribute("viewBox","0 0 130 150")
  svgElement.setAttribute("width", "100%")
  svgElement.setAttribute("height", "auto")

jami avatar Jan 12 '24 13:01 jami