Skip to content

Commit

Permalink
Attach object to animation tab
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Feb 10, 2018
1 parent 8193f7b commit 3c4994e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions source/editor/ui/tab/animation/AnimationClipTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ function AnimationClipTrack(editor, animation)
var height = 30 * tracks.length + 1;
var self = this;

var button = new AnimationButton(this.editor.info, this.editor, animation);
button.position.set(0, this.editor.timebarHeight);
button.size.set(0, 30);
button.updateInterface();
this.button = new AnimationButton(this.editor.info, this.editor, animation);
this.button.position.set(0, this.editor.timebarHeight);
this.button.size.set(0, 30);
this.button.updateInterface();

this.options = new AnimationOptions(this.editor.tracks, this.editor, animation);
this.options.position.set(0, this.editor.timebarHeight);
Expand Down
2 changes: 1 addition & 1 deletion source/editor/ui/tab/animation/AnimationOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ AnimationOptions.prototype.updateInterface = function()
this.element.style.left = this.position.x + "px";
this.element.style.top = this.position.y + "px";
this.element.style.height = this.size.y + "px";
this.element.style.width = "100%";
this.element.style.width = this.size.x + "px";
};
13 changes: 7 additions & 6 deletions source/editor/ui/tab/animation/AnimationTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ function AnimationTab(parent, closeable, container, index)

AnimationTab.prototype = Object.create(TabElement.prototype);

AnimationTab.prototype.attach = function()
{
TabElement.prototype.attach.call(this);

this.createTimeline();
};

AnimationTab.prototype.activate = function()
{
TabElement.prototype.activate.call(this);
Expand Down Expand Up @@ -364,12 +371,6 @@ AnimationTab.prototype.updateInterface = function()

this.bar.style.width = this.size.x + "px";

/*for(var i = 0; i < this.animations.length; i++)
{
this.animations[i].options.size.set(this.timeline.scrollWidth, 30);
this.animations[i].options.updateInterface();
}*/

//Resizable division
this.info.style.height = this.timeline.scrollHeight + "px";
this.info.style.width = this.tab.position + "px";
Expand Down

0 comments on commit 3c4994e

Please sign in to comment.