'use strict'; /** * Licensed Materials - Property of IBM * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2014, 2017 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['../navigation/ui/AutoHidingControl'], function (View) { var NavControl = View.extend({ init: function init(options) { NavControl.inherited('init', this, arguments); this.subview = options.subview; }, remove: function remove() { NavControl.inherited('remove', this, arguments); }, _renderContent: function _renderContent() { if (this.subview) { this.subview.$el.appendTo(this.$el.empty()).show(); } return Promise.resolve(); }, _show: function _show(options) { var _this = this; var duration = options && options.duration || 'fast'; return new Promise(function (resolve) { _this.$el.css({ 'pointer-events': '' }); // You'd think it'd be slideUp here, but this is what works. _this.$el.slideDown(duration, function () { // Force refresh of the progress bar to ensure the scaleInfo is accurate. if (this.subview) { this.subview.updateProgressBar(); } resolve(); }.bind(_this)); }); }, _hide: function _hide(options) { var _this2 = this; var duration = options && options.duration || 'fast'; return new Promise(function (resolve) { if (_this2.subview && _this2.subview._flyout) { _this2.subview._flyout.close(); } _this2.$el.css({ 'pointer-events': 'none' }); // You'd think it'd be slideDown here, but this is what works. _this2.$el.slideUp(duration, function () { resolve(); }); }); } }); return NavControl; }); //# sourceMappingURL=StoryNavControl.js.map