SinglePage.js 879 B

12345678910111213141516171819202122232425262728293031323334
  1. 'use strict';
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Watson Analytics (C) Copyright IBM Corp. 2016, 2017
  5. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. */
  7. define(['./LayoutBaseView'], function (BaseLayout) {
  8. var SinglePage = null;
  9. SinglePage = BaseLayout.extend({
  10. init: function init() {
  11. SinglePage.inherited('init', this, arguments);
  12. this.layoutController.layoutReady(this.model.id).done(function () {
  13. var layoutView = this.layoutController.getLayoutView(this.model.id);
  14. layoutView.onShow();
  15. }.bind(this));
  16. },
  17. /**
  18. * Get selected layout model
  19. *
  20. * @return {Model} - selected layout model
  21. */
  22. getSelectedLayout: function getSelectedLayout() {
  23. return this.model.items[0];
  24. }
  25. });
  26. return SinglePage;
  27. });
  28. //# sourceMappingURL=SinglePage.js.map