1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Watson Analytics (C) Copyright IBM Corp. 2016, 2017
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['./TemplateContainer'], function (BaseLayout) {
- var PageLayout = null;
- /**
- * Single page layout used by infographics
- */
- PageLayout = BaseLayout.extend({
- DEF_TIMEOUT: 120000, //120s
- init: function init(options) {
- PageLayout.inherited('init', this, arguments);
- this.services = options.services;
- this.eventRouter = this.layoutController.eventRouter;
- var layoutController = this.consumeView.layoutController;
- var id = this.consumeView.id;
- this.layoutController.layoutReady(id).then(function () {
- var layoutView = layoutController.getLayoutView(id);
- layoutView.onShow();
- });
- if (this.model.items.length < 1) {
- this.eventRouter.trigger('singlePage:no-layout-selected');
- }
- },
- showView: function showView(model) {
- if (this.eventRouter) {
- this.eventRouter.trigger('layout:createDropZones', {
- modelId: model.id
- });
- }
- },
- add: function add(layoutView) {
- PageLayout.inherited('add', this, arguments);
- this.showView(layoutView.model);
- }
- });
- return PageLayout;
- });
- //# sourceMappingURL=SinglePage.js.map
|