Restore opacity of dragged tabs correctly (again)
This commit is contained in:
parent
c1770fe9f0
commit
49810b0f31
@ -336,10 +336,15 @@ catch(e) {
|
|||||||
var sizeProp = sv.isVertical && pinned ? sv.invertedSizeProp : sv.sizeProp ;
|
var sizeProp = sv.isVertical && pinned ? sv.invertedSizeProp : sv.sizeProp ;
|
||||||
var boxPos = sv.getTabActualScreenPosition(tab);
|
var boxPos = sv.getTabActualScreenPosition(tab);
|
||||||
var boxUnit = Math.round(tab.boxObject[sizeProp] / dropAreasCount);
|
var boxUnit = Math.round(tab.boxObject[sizeProp] / dropAreasCount);
|
||||||
if (aEvent[screenPositionProp] < boxPos + boxUnit) {
|
var eventPosition = aEvent[screenPositionProp];
|
||||||
|
// if (this.window['piro.sakura.ne.jp'].tabsDragUtils
|
||||||
|
// .canAnimateDraggedTabs(aEvent)) {
|
||||||
|
// eventPosition = Math.round(sv.getTabActualScreenPosition(draggedTab) + (tab.boxObject[sizeProp] / 2))
|
||||||
|
// }
|
||||||
|
if (eventPosition < boxPos + boxUnit) {
|
||||||
info.position = isInverted ? sv.kDROP_AFTER : sv.kDROP_BEFORE ;
|
info.position = isInverted ? sv.kDROP_AFTER : sv.kDROP_BEFORE ;
|
||||||
}
|
}
|
||||||
else if (dropAreasCount == 2 || aEvent[screenPositionProp] > boxPos + boxUnit + boxUnit) {
|
else if (dropAreasCount == 2 || eventPosition > boxPos + boxUnit + boxUnit) {
|
||||||
info.position = isInverted ? sv.kDROP_BEFORE : sv.kDROP_AFTER ;
|
info.position = isInverted ? sv.kDROP_BEFORE : sv.kDROP_AFTER ;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -608,7 +613,7 @@ catch(e) {
|
|||||||
// clear drop position preview on Firefox 17 and later
|
// clear drop position preview on Firefox 17 and later
|
||||||
if (aOnFinish) {
|
if (aOnFinish) {
|
||||||
aTab.style.transform = '';
|
aTab.style.transform = '';
|
||||||
if (aTab.__treestyletab__opacityBeforeDragged) {
|
if ('__treestyletab__opacityBeforeDragged' in aTab) {
|
||||||
aTab.style.opacity = aTab.__treestyletab__opacityBeforeDragged;
|
aTab.style.opacity = aTab.__treestyletab__opacityBeforeDragged;
|
||||||
delete aTab.__treestyletab__opacityBeforeDragged;
|
delete aTab.__treestyletab__opacityBeforeDragged;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user