Chrome中Extjs中的RTL水平滚动条问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Chrome中Extjs中的RTL水平滚动条问题相关的知识,希望对你有一定的参考价值。
我有extjs项目。当我使用LTR模式或使用FirFox滚动条时效果很好。但是当我使用Chrome时,加载数据后的滚动条将转到左侧,而不是右侧。
我的RTl项目代码:
Ext.define('App.Application',
extend: 'Ext.app.Application',
name: 'App',
requires: [
'App.*',
'Ext.rtl.*'
],
launch: function ()
var whichView = 'mainview2';
var elem = document.getElementById("splash");
Ext.ariaWarn = Ext.emptyFn;
Ext.getBody().removeCls('launching');
elem.parentNode.removeChild(elem);
Ext.Ajax.request(
url: "URL",
method: "POST",
success: function (response, opts)
var result = Ext.decode(response.responseText);
if (result.success)
Ext.create(
xtype: whichView,
plugins: 'viewport',
rtl: true,
)
);
,
);
答案
我无法完全解决此问题,但此代码有所帮助
Ext.define("overrides.Ext.scroll.Scroller",
override: "Ext.scroll.Scroller",
privates:
updateDomScrollPosition: function (silent)
var me = this,
position = me.position,
oldX = position.x,
oldY = position.y,
x, y, xDelta, yDelta;
me.readPosition(position);
x = position.x;
y = position.y;
me.positionDirty = false;
if (!silent)
xDelta = x - oldX;
yDelta = y - oldY;
// If we already know about the position. then we've been coerced there by a partner
// and that will have been firing our event sequence synchronously, so they do not
// not need to be fire in response to the ensuing scroll event.
if (xDelta || yDelta)
if (x !== oldX && x !== xDelta)
if (!me.isScrolling)
me.isScrolling = Ext.isScrolling = true;
me.fireScrollStart(x, y, xDelta, yDelta);
me.fireScroll(x, y, xDelta, yDelta);
me.onDomScrollEnd(x, y, xDelta, yDelta);
return position;
,
onPartnerScroll: function (partner, x, y, xDelta, yDelta)
if (x !== xDelta)
this.doScrollTo(x, y, false);
// Update the known scroll position so that when it reacts to its DOM,
// it will not register a change and so will not invoke partners.
// All scroll intentions are propagated synchronously.
// The ensuing multiple scroll events are then ignored.
this.updateDomScrollPosition(true);
// Pass the signal on immediately to all partners.
this.fireScroll(x, y, xDelta, yDelta);
,
);
以上是关于Chrome中Extjs中的RTL水平滚动条问题的主要内容,如果未能解决你的问题,请参考以下文章