1
0
Fork 0
forked from 0x2620/oxjs

video editor update

This commit is contained in:
rlx 2012-01-10 20:19:28 +05:30
commit 88f31a5ae3
10 changed files with 245 additions and 65 deletions

View file

@ -31,6 +31,7 @@ Ox.BlockVideoTimeline = function(options, self) {
mousemove: mousemove
})
.bindEvent({
doubleclick: doubleclick,
drag: function(data) {
mousedown(data);
}
@ -56,6 +57,7 @@ Ox.BlockVideoTimeline = function(options, self) {
'in': self.options['in'],
out: self.options.out,
results: self.options.results,
state: self.options.state,
subtitles: self.options.showSubtitles ? self.options.subtitles : [],
timeline: self.options.getImageURL,
width: Math.round(self.options.duration),
@ -118,6 +120,22 @@ Ox.BlockVideoTimeline = function(options, self) {
.appendTo(self.$lines[i]);
}
function doubleclick(e) {
var position;
if ($(e.target).is('.OxInterface')) {
position = getPosition(e);
if (
self.options.state == 'selected'
&& position >= self.options['in']
&& position <= self.options.out
) {
that.triggerEvent('edit');
} else if (self.options.state != 'editing') {
that.triggerEvent('select');
}
}
}
function getLines() {
return Math.ceil(self.options.duration / self.options.width);
}
@ -138,6 +156,10 @@ Ox.BlockVideoTimeline = function(options, self) {
return subtitle;
}
function getTooltip(e) {
}
function mousedown(e) {
if ($(e.target).is('.OxInterface')) {
self.options.position = getPosition(e);