dash: Fix placeholder jumps while dragging a dash item
We are currently taking "old" placeholders that are still animating out into account to calculate the new placeholder position - this causes an annoying bug, where dragging a dash item downwards triggers quick continous position changes of the placeholder. Just ignoring old placeholders fixes the issue. https://bugzilla.gnome.org/show_bug.cgi?id=651842
This commit is contained in:
parent
93a004b016
commit
47f7fcd4fe
@ -744,20 +744,10 @@ const Dash = new Lang.Class({
|
|||||||
numChildren--;
|
numChildren--;
|
||||||
}
|
}
|
||||||
|
|
||||||
let pos = Math.round(y * numChildren / boxHeight);
|
let pos = Math.floor(y * numChildren / boxHeight);
|
||||||
|
|
||||||
if (pos != this._dragPlaceholderPos && pos <= numFavorites) {
|
if (pos != this._dragPlaceholderPos && pos <= numFavorites && this._animatingPlaceholdersCount == 0) {
|
||||||
if (this._animatingPlaceholdersCount > 0) {
|
this._dragPlaceholderPos = pos;
|
||||||
let appChildren = children.filter(function(actor) {
|
|
||||||
return actor._delegate &&
|
|
||||||
actor._delegate.child &&
|
|
||||||
actor._delegate.child._delegate &&
|
|
||||||
actor._delegate.child._delegate.app;
|
|
||||||
});
|
|
||||||
this._dragPlaceholderPos = children.indexOf(appChildren[pos]);
|
|
||||||
} else {
|
|
||||||
this._dragPlaceholderPos = pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't allow positioning before or after self
|
// Don't allow positioning before or after self
|
||||||
if (favPos != -1 && (pos == favPos || pos == favPos + 1)) {
|
if (favPos != -1 && (pos == favPos || pos == favPos + 1)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user