Cat/modules/timeline.js

30 lines
760 B
JavaScript

const {remote} = require('electron');
const {dialog,Menu,MenuItem} = remote;
let timeline = null;
let controls = null;
module.exports = function(Cat) {
return {
init: function(dom) {
timeline = document.querySelector('cat-timeline');
controls = document.querySelector('#timeline-controls');
},
on: {
'project-closed': project => {
timeline.clearKeyframes();
},
'project-focused': project => {
// clear keyframes
// NOTE: should multiple animations be selectable...?
// if project.selectedElement
// if selectedElement has animation
// generate keyframes
},
'project-loaded': project => {
//
}
}
}
};