123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2015
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['jquery', './ScrollBarUtil'], function ($, ScrollBarUtil) {
- var TextWidgetScrollBarUtil = null;
- TextWidgetScrollBarUtil = ScrollBarUtil.extend({
- /**
- * Initialize the utility with the specified models
- *
- * @param {JQuery|HTMLElement} inner - Inner DOM element
- * @param {JQuery|HTMLElement} outer - Outer DOM element
- * @param event
- */
- init: function init(inner, outer, event) {
- ScrollBarUtil.inherited('init', this, arguments);
- this.inner = inner || null;
- this.outer = outer || null;
- this.event = event || null;
- },
- /**
- * @param {JQuery} - DOM Element
- */
- _hasStaticContentClass: function _hasStaticContentClass(element) {
- return element.context.classList.contains('staticContent');
- },
- /**
- * TextWidget has a special case for getting the client width
- *
- * @param {JQuery} element - DOM element
- */
- _getContextClientWidth: function _getContextClientWidth(element) {
- TextWidgetScrollBarUtil.inherited('_getContextClientWidth', this, arguments);
- var clientWidth;
- if (this._hasStaticContentClass(element)) {
- clientWidth = element.context.clientWidth;
- } else {
- clientWidth = $(element.context).parents('.staticContent').get(0).clientWidth;
- }
- return clientWidth;
- }
- });
- return TextWidgetScrollBarUtil;
- });
- //# sourceMappingURL=TextWidgetScrollBarUtil.js.map
|