File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1970,7 +1970,12 @@ PanelZoneDNDHandler.prototype = {
1970
1970
1971
1971
let children = this . _panelZone . get_children ( ) ;
1972
1972
let curAppletPos = 0 ;
1973
- let insertAppletPos = 0 ;
1973
+ let insertAppletPos = - 1 ;
1974
+
1975
+ const {
1976
+ panel : { panelId : sourceAppletPanel } ,
1977
+ locationLabel : sourceAppletLocation ,
1978
+ } = source . actor . _applet ;
1974
1979
1975
1980
for ( let i = 0 , len = children . length ; i < len ; i ++ ) {
1976
1981
if ( children [ i ] . _delegate instanceof Applet . Applet ) {
@@ -1982,7 +1987,12 @@ PanelZoneDNDHandler.prototype = {
1982
1987
}
1983
1988
}
1984
1989
1985
- source . actor . _applet . _newOrder = insertAppletPos ;
1990
+ const isSameLocation = (
1991
+ sourceAppletPanel === this . _panelId
1992
+ && sourceAppletLocation === this . _zoneString
1993
+ && insertAppletPos === - 1
1994
+ ) ;
1995
+ if ( ! isSameLocation ) source . actor . _applet . _newOrder = insertAppletPos === - 1 ? 0 : insertAppletPos ;
1986
1996
source . actor . _applet . _newPanelLocation = this . _panelZone ;
1987
1997
source . actor . _applet . _zoneString = this . _zoneString ;
1988
1998
source . actor . _applet . _newPanelId = this . _panelId ;
You can’t perform that action at this time.
0 commit comments