标签
标签: 对象
这会存储已添加到时间轴的所有标签。
细节
这会存储已添加到时间轴的所有标签。你可以通过使用以下方法获取包含所有标签的完整对象:timeline.labels
。例如:
var tl = gsap.timeline();
tl.addLabel("myLabel", 3);
tl.addLabel("anotherLabel", 5);
//now the label object has those labels and times, like:
console.log(tl.labels.myLabel); // 3
console.log(tl.labels.anotherLabel); // 5