OpenC3/cosmos

View on GitHub
openc3-cosmos-init/plugins/packages/openc3-cosmos-ace-diff/src/visuals/createArrow.js

Summary

Maintainability
A
0 mins
Test Coverage
export default function createArrow(info) {
  const el = document.createElement('div')
  const props = {
    class: info.className,
    style: `top:${info.topOffset}px`,
    title: info.tooltip,
    'data-diff-index': info.diffIndex,
  }
  for (const key in props) {
    el.setAttribute(key, props[key])
  }
  el.innerHTML = info.arrowContent
  return el
}