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.

23 lines (18 loc) 644 B
export default function HighlightItemTask(highlightItemOptionTask, activeItemsTask) { var _data = { highlightTreeItemId: null }; function process() { var treeItemId = highlightItemOptionTask.getHighlightItem(), activeItems = (activeItemsTask != null) ? activeItemsTask.getActiveItems() : {}; _data.highlightTreeItemId = (treeItemId != null && activeItems.hasOwnProperty(treeItemId)) ? treeItemId : null; return true; } function getHighlightTreeItem() { return _data.highlightTreeItemId; } return { process: process, getHighlightTreeItem: getHighlightTreeItem }; };