Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
782b2a3c
Commit
782b2a3c
authored
Jan 29, 2020
by
Jean-Baptiste Mardelle
Browse files
Update Timeline.js to remove qml1 references
parent
dfa50c03
Pipeline
#14124
passed with stage
in 19 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Timeline.js
View file @
782b2a3c
...
...
@@ -19,12 +19,12 @@
function
scrollIfNeeded
()
{
if
(
!
scrollView
)
return
;
var
x
=
root
.
consumerPosition
*
timeline
.
scaleFactor
;
if
(
x
>
scrollView
.
flickable
Item
.
contentX
+
scrollView
.
width
-
50
)
scrollView
.
flickable
Item
.
contentX
=
x
-
scrollView
.
width
+
50
;
if
(
x
>
scrollView
.
content
Item
.
contentX
+
scrollView
.
width
-
50
)
scrollView
.
content
Item
.
contentX
=
x
-
scrollView
.
width
+
50
;
else
if
(
x
<
50
)
scrollView
.
flickable
Item
.
contentX
=
0
;
else
if
(
x
<
scrollView
.
flickable
Item
.
contentX
+
50
)
scrollView
.
flickable
Item
.
contentX
=
x
-
50
;
scrollView
.
content
Item
.
contentX
=
0
;
else
if
(
x
<
scrollView
.
content
Item
.
contentX
+
50
)
scrollView
.
content
Item
.
contentX
=
x
-
50
;
}
function
getTrackIndexFromPos
(
pos
)
{
...
...
@@ -49,7 +49,7 @@ function getTrackIdFromPos(pos) {
}
function
getTrackYFromId
(
id
)
{
var
result
=
-
scrollView
.
flickable
Item
.
contentY
var
result
=
-
scrollView
.
content
Item
.
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
.
flickable
Item
.
contentY
var
result
=
-
scrollView
.
content
Item
.
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
.
flickable
Item
.
contentX
-
headerWidth
)
/
timeline
.
scaleFactor
)
var
position
=
Math
.
round
((
dropTarget
.
x
+
scrollView
.
content
Item
.
contentX
-
headerWidth
)
/
timeline
.
scaleFactor
)
timeline
.
insertClip
(
currentTrack
,
position
,
xml
)
/*if (timeline.ripple)
timeline.insert(currentTrack, position, xml)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment