'use strict'; /** * Licensed Materials - Property of IBM * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2015, 2017 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['../../../../lib/@waca/core-client/js/core-client/ui/core/Events', '../../../util/EventConstants'], function (Events, EventConstants) { /** * Action to toggle between consume and authoring modes */ var ChangeModeAction = null; ChangeModeAction = Events.extend({ init: function init(authoredPageView, options) { ChangeModeAction.inherited('init', this, arguments); this.name = EventConstants.changeModeAction; this.sender = options && options.sender; this.value = authoredPageView.isAuthoringMode; this.prevValue = !authoredPageView.isAuthoringMode; this.senderContext = { applyFn: function (value, sender) { if (authoredPageView.isAuthoringMode !== value) { authoredPageView.toggleMode({ sender: sender }); } }.bind(this) }; } }); return ChangeModeAction; }); //# sourceMappingURL=ChangeModeAction.js.map