123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 'use strict';
- define(['underscore', './VisSelectionInfo'], function (_, Class) {
- 'use strict';
- var VisTooltipInfo = Class.extend({
- init: function init() {
- VisTooltipInfo.inherited('init', this, arguments);
- this._aCustomSelections = [];
- },
- addCustomSelection: function addCustomSelection(label, value) {
- this._aCustomSelections.push({
- name: label,
- value: value
- });
- },
- getCustomLabelSelections: function getCustomLabelSelections() {
- return _.filter(this._aCustomSelections, function (selection) {
- return 'name' in selection && selection.name;
- });
- },
- getCustomTitleSelections: function getCustomTitleSelections() {
- return _.filter(this._aCustomSelections, function (selection) {
- return !('name' in selection) || !selection.name;
- });
- }
- });
- return VisTooltipInfo;
- });
|