'use strict'; /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Dashboard *| (C) Copyright IBM Corp. 2018 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ define(['./BaseTask'], function (BaseTask) { 'use strict'; var VisControlTask = BaseTask.extend({ /** * Load the visControl (if any) and store in the visControl member of the renderContext. * @param renderContext - information collected by a particular call to render or reRender (such as the view, control, data etc). * @returns a promise */ process: function process(renderContext) { if (this._isStepComplete(renderContext, 'visControl')) { return Promise.resolve(renderContext); } return this.getRenderState().getCurrentContextData('visView').whenVisControlReady().then(function (visControl) { this._completeStep(renderContext, 'visControl', visControl); return renderContext; }.bind(this)).catch(function (error) { this.showError('dwErrorRenderingVisualization'); throw error; }.bind(this)); } }); return VisControlTask; }); //# sourceMappingURL=VisControlTask.js.map