/usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/mediacenter/elements/playlist/PlaylistDelegateLogic.js is in plasma-mediacenter 4:5.5.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | function onPositionChanged(dragItemArea, listViewItem)
{
dragItemArea.posEndX = listViewItem.x;
dragItemArea.posEndY = listViewItem.y;
}
function onReleased(dragItemArea, listViewItem, playlistList, playlistModel)
{
var newIndex = -1
if(!dragItemArea.delegateHeld)
return
if(Math.abs(dragItemArea.movedX) >= dragItemArea.parent.width/3)
playlistModel.removeFromPlaylist(index)
else
listViewItem.x = dragItemArea.posStartX
if (Math.abs(dragItemArea.movedY) == 0 && dragItemArea.delegateHeld == true){
listViewItem.y = dragItemArea.posStartY
}
else
{
listViewItem.z = 0
listViewItem.opacity = 1
if(dragItemArea.newPositionY < 1)
dragItemArea.newPositionY = 0
else if(dragItemArea.newPositionY > playlistList.count-1)
dragItemArea.newPositionY = playlistList.count - 1
playlistModel.moveItem(index, dragItemArea.newPositionY)
listViewItem.x = dragItemArea.posStartX
listViewItem.y = dragItemArea.posStartY
}
listViewItem.opacity =1
dragItemArea.drag.target = null
listViewItem.ListView.view.interactive = true
dragItemArea.delegateHeld = false
}
|