UNPKG

basicprimitives

Version:

Basic Primitives Diagrams for JavaScript - data visualization components library that implements organizational chart and multi-parent dependency diagrams, contains implementations of JavaScript Controls and PDF rendering plugins.

28 lines (22 loc) 572 B
export default function HighlightTemplate(options, itemTemplateConfig) { var _config = itemTemplateConfig; function template() { return {}; } function getHashCode() { return 0; } function render(doc, position, _data) { doc.save(); /* border */ doc.roundedRect(position.x, position.y, position.width, position.height, 4) .lineWidth(_config.highlightBorderWidth) .stroke('#fbcb09'); doc.restore(); } return { template: template, getHashCode: getHashCode, render: render }; };