зеркало из https://github.com/mozilla/pjs.git
Bug 343097 - Cleaner arrowscrollbox-clicktoscroll binding. r=sspitzer/mconnor.
This commit is contained in:
Родитель
ae404b15fe
Коммит
174b585bad
|
@ -1607,21 +1607,24 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (aDragSession.canDrop && aDragSession.sourceNode) {
|
if (aDragSession.canDrop && aDragSession.sourceNode) {
|
||||||
// autoscroll the tab strip if we drag over the autorepeat
|
var tabStrip = this.mTabContainer.mTabstrip;
|
||||||
|
|
||||||
|
// autoscroll the tab strip if we drag over the scroll
|
||||||
// buttons, even if we aren't dragging a tab, but then
|
// buttons, even if we aren't dragging a tab, but then
|
||||||
// return to avoid drawing the drop indicator
|
// return to avoid drawing the drop indicator
|
||||||
var isTabDrag = (aDragSession.sourceNode.parentNode == this.mTabContainer);
|
|
||||||
var pixelsToScroll = 0;
|
var pixelsToScroll = 0;
|
||||||
var tabStrip = this.mTabContainer.mTabstrip;
|
|
||||||
if (aEvent.originalTarget.localName == "autorepeatbutton") {
|
var targetAnonid = aEvent.originalTarget.getAttribute("anonid");
|
||||||
if (aEvent.originalTarget.getAttribute("class") ==
|
if (targetAnonid == "scrollbutton-up") {
|
||||||
"autorepeatbutton-up")
|
|
||||||
pixelsToScroll = tabStrip.scrollIncrement * -1;
|
pixelsToScroll = tabStrip.scrollIncrement * -1;
|
||||||
else
|
tabStrip.scrollByPixels(pixelsToScroll);
|
||||||
|
}
|
||||||
|
else if (targetAnonid == "scrollbutton-down") {
|
||||||
pixelsToScroll = tabStrip.scrollIncrement;
|
pixelsToScroll = tabStrip.scrollIncrement;
|
||||||
tabStrip.scrollByPixels(pixelsToScroll);
|
tabStrip.scrollByPixels(pixelsToScroll);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isTabDrag = (aDragSession.sourceNode.parentNode == this.mTabContainer);
|
||||||
if (!isTabDrag)
|
if (!isTabDrag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче