Commit 3adf9b08 authored by luyikei's avatar luyikei

Clip.qml: Set hotSpot wisely

parent 284233f2
......@@ -63,6 +63,14 @@ Rectangle {
findClipItem( linkedClip ).selected = true;
}
onXChanged: {
if ( sView.flickableItem.contentX + sView.width <
x + width + initPosOfCursor + sView.sViewPadding )
Drag.hotSpot.x = 0;
else if ( sView.flickableItem.contentX + sView.sViewPadding > x + initPosOfCursor )
Drag.hotSpot.x = width;
}
onYChanged: {
y -= y % trackHeight;
// Don't move outside its TrackContainer
......
......@@ -183,7 +183,6 @@ Item {
// Never show the background behind the timeline
var newContentX = sView.flickableItem.contentWidth - sView.width;
if ( newContentX >= 0 ) {
drag.source.Drag.hotSpot.x = 0;
sView.flickableItem.contentX = newContentX;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment