123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 'use strict';
- define(['jquery', './ScrollBarUtil'], function ($, ScrollBarUtil) {
- var TextWidgetScrollBarUtil = null;
- TextWidgetScrollBarUtil = ScrollBarUtil.extend({
-
- init: function init(inner, outer, event) {
- ScrollBarUtil.inherited('init', this, arguments);
- this.inner = inner || null;
- this.outer = outer || null;
- this.event = event || null;
- },
-
- _hasStaticContentClass: function _hasStaticContentClass(element) {
- return element.context.classList.contains('staticContent');
- },
-
- _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;
- });
|