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.

30 lines (24 loc) 565 B
export default function LabelAnnotationTemplate() { function template() { return {}; } function getHashCode() { return 0; } function render(doc, position, data) { var itemConfig = data.context; doc.save(); doc.font('Helvetica', 12) .text(itemConfig.title, position.x, position.y, { width: position.width, height: position.height, align: 'center' }); doc.restore(); } return { template: template, getHashCode: getHashCode, render: render }; };