deal with links to layers

This commit is contained in:
sanj 2011-01-01 19:44:42 +05:30
parent 4399242fe9
commit 654b7d26f0

View File

@ -18,7 +18,7 @@ function setupPadmaLink(videoObj, data) {
// $a.data("isDisplayed", false); // $a.data("isDisplayed", false);
//FIXME: tc is WRONG!!! //FIXME: tc is WRONG!!!
if (!$.inArray(data.linkData.type, ["info", "editor", "tc", "tcRange"])) { if (!$.inArray(data.linkData.type, ["info", "editor", "tc", "tcRange", "layer"])) {
return false; return false;
} }
// console.log(data.linkData); // console.log(data.linkData);
@ -28,6 +28,13 @@ function setupPadmaLink(videoObj, data) {
data.linkData.type = "tcRange"; data.linkData.type = "tcRange";
} }
if (data.linkData.type == 'layer') {
var layer = videoObj.getLayerById(data.linkData.layerId);
data.linkData.tcIn = ms2npt(layer.time_in);
data.linkData.tcOut = ms2npt(layer.time_out);
data.linkData.type = "tcRange";
}
var linkData = data.linkData; var linkData = data.linkData;
//FIXME: put this as a variable, option somewhere? //FIXME: put this as a variable, option somewhere?
var $container = padmaContainer; var $container = padmaContainer;