Update Timeline.js to remove qml1 references

parent dfa50c03
Pipeline #14124 passed with stage
in 19 minutes and 42 seconds
......@@ -19,12 +19,12 @@
function scrollIfNeeded() {
if (!scrollView) return;
var x = root.consumerPosition * timeline.scaleFactor;
if (x > scrollView.flickableItem.contentX + scrollView.width - 50)
scrollView.flickableItem.contentX = x - scrollView.width + 50;
if (x > scrollView.contentItem.contentX + scrollView.width - 50)
scrollView.contentItem.contentX = x - scrollView.width + 50;
else if (x < 50)
scrollView.flickableItem.contentX = 0;
else if (x < scrollView.flickableItem.contentX + 50)
scrollView.flickableItem.contentX = x - 50;
scrollView.contentItem.contentX = 0;
else if (x < scrollView.contentItem.contentX + 50)
scrollView.contentItem.contentX = x - 50;
}
function getTrackIndexFromPos(pos) {
......@@ -49,7 +49,7 @@ function getTrackIdFromPos(pos) {
}
function getTrackYFromId(id) {
var result = - scrollView.flickableItem.contentY
var result = - scrollView.contentItem.contentY
for (var i = 0; i < trackHeaderRepeater.count; i++) {
if (trackHeaderRepeater.itemAt(i).trackId == id) {
break;
......@@ -83,7 +83,7 @@ function getTrackYFromMltIndex(id) {
if (id <= 0) {
return 0
}
var result = - scrollView.flickableItem.contentY
var result = - scrollView.contentItem.contentY
for (var i = 0; i < trackHeaderRepeater.count - id; i++) {
result += trackHeaderRepeater.itemAt(i).height
}
......@@ -107,7 +107,7 @@ function getTracksList() {
}
function acceptDrop(xml) {
var position = Math.round((dropTarget.x + scrollView.flickableItem.contentX - headerWidth) / timeline.scaleFactor)
var position = Math.round((dropTarget.x + scrollView.contentItem.contentX - headerWidth) / timeline.scaleFactor)
timeline.insertClip(currentTrack, position, xml)
/*if (timeline.ripple)
timeline.insert(currentTrack, position, xml)
......
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