12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2014, 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define([], function () {
- var MediaBase = function () {
- function MediaBase(url, type) {
- _classCallCheck(this, MediaBase);
- this.url = url;
- this.type = type;
- }
- /**
- * Abstract: needs to be implemented by concrete subclass
- * @return an object with 'width' and 'height' members
- */
- MediaBase.prototype.getDimensions = function getDimensions() {
- return null;
- };
- /**
- * Abstract: needs to be implemented by concrete subclass
- * @param an object of parameters
- * @return the markup representing this media
- */
- MediaBase.prototype.getMarkup = function getMarkup() {
- return '';
- };
- /**
- * A callback for when markup is loaded into the DOM.
- * @param The root element into which the markup was placed
- */
- MediaBase.prototype.markupLoaded = function markupLoaded($el, mode) {
- if (mode === 'authoring') {
- this.showAuthoringMode();
- } else {
- this.showConsumeMode();
- }
- };
- /**
- * Invoke to render the media in authoring mode
- */
- MediaBase.prototype.showAuthoringMode = function showAuthoringMode() {};
- /**
- * Invoke to render the media in consume mode
- */
- MediaBase.prototype.showConsumeMode = function showConsumeMode() {};
- return MediaBase;
- }();
- return MediaBase;
- });
- //# sourceMappingURL=MediaBase.js.map
|