Commit 0f348e91 authored by luyikei's avatar luyikei

Timeline: Fix scrolling too fast when a clip is being dragged at a certain position

parent 094a8a17
......@@ -35,6 +35,7 @@ Rectangle {
property var linkedClips: linkedClipsDict[uuid] // Uuid
property string type
property bool selected: false
property alias mouseX: dragArea.mouseX
property var clipInfo
......
......@@ -129,10 +129,10 @@ Item {
var newContentX = sView.flickableItem.contentX;
if ( sView.flickableItem.contentX + sView.width <
target.x + target.width + initPosOfCursor + sView.sViewPadding )
newContentX = target.x + target.width + initPosOfCursor + sView.sViewPadding - sView.width;
else if ( sView.flickableItem.contentX + sView.sViewPadding > target.x )
newContentX = target.x - sView.sViewPadding;
target.x + target.mouseX + initPosOfCursor + sView.sViewPadding )
newContentX = target.x + target.mouseX + initPosOfCursor + sView.sViewPadding - sView.width;
else if ( sView.flickableItem.contentX + sView.sViewPadding > target.x + target.mouseX )
newContentX = target.x + target.mouseX - sView.sViewPadding;
sView.flickableItem.contentX = Math.max( newContentX, 0 );
}
......
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