extjs-gpl
Version:
GPL licensed version of Sencha Ext JS
16 lines (12 loc) • 451 B
JavaScript
Ext.define('KitchenSink.view.d3.TreeMapTooltipController', {
extend: 'Ext.app.ViewController',
alias: 'controller.treemap-tooltip',
onTooltip: function (component, tooltip, node, element, event) {
var view = this.getView(),
tpl = view.lookupTpl(node.isLeaf() ? 'leafTpl' : 'parentTpl'),
html;
component.setSelection(node);
html = tpl.apply(node);
tooltip.setHtml(html);
}
});