diff options
author | Jon Reid | 2012-03-19 16:53:29 -0700 |
---|---|---|
committer | Jon Reid | 2012-03-19 16:53:29 -0700 |
commit | aa2d8afb323e71ea562c74564609604e0480fde4 (patch) | |
tree | fd2565b9128344814b43e5a4559ad1ff0da7b3df /js/panels/Timeline/Layer.reel | |
parent | 595a569cf459e7e7cbe19e546c23322b56e44341 (diff) | |
download | ninja-aa2d8afb323e71ea562c74564609604e0480fde4.tar.gz |
Timeline: Re-enable adding/removing styles to layers. New methods in TimelinePanel for creating new styles on document load.
Diffstat (limited to 'js/panels/Timeline/Layer.reel')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 238ddae9..830d179e 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -499,11 +499,8 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
499 | 499 | ||
500 | 500 | ||
501 | // Add event listeners to add and delete style buttons | 501 | // Add event listeners to add and delete style buttons |
502 | this.buttonAddStyle.identifier = "addStyle"; | 502 | this.buttonAddStyle.addEventListener("click", this.handleAddStyleClick.bind(this), false); |
503 | this.buttonAddStyle.addEventListener("click", this, false); | 503 | this.buttonDeleteStyle.addEventListener("click", this.handleDeleteStyleClick.bind(this), false); |
504 | |||
505 | this.buttonDeleteStyle.identifier = "deleteStyle"; | ||
506 | this.buttonDeleteStyle.addEventListener("click", this, false); | ||
507 | 504 | ||
508 | // Add mousedown listener to set isActive | 505 | // Add mousedown listener to set isActive |
509 | this.element.addEventListener("mousedown", this, false); | 506 | this.element.addEventListener("mousedown", this, false); |
@@ -604,7 +601,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
604 | // Set up the event info and dispatch the event | 601 | // Set up the event info and dispatch the event |
605 | 602 | ||
606 | newEvent.styleSelection = mySelection; | 603 | newEvent.styleSelection = mySelection; |
607 | //defaultEventManager.dispatchEvent(newEvent); | 604 | defaultEventManager.dispatchEvent(newEvent); |
608 | 605 | ||
609 | } | 606 | } |
610 | }, | 607 | }, |
@@ -624,7 +621,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
624 | newEvent.layerID = this.layerID; | 621 | newEvent.layerID = this.layerID; |
625 | newEvent.styleID = this.arrLayerStyles[selectedIndex].styleID; | 622 | newEvent.styleID = this.arrLayerStyles[selectedIndex].styleID; |
626 | newEvent.styleSelection = selectedIndex; | 623 | newEvent.styleSelection = selectedIndex; |
627 | //defaultEventManager.dispatchEvent(newEvent); | 624 | defaultEventManager.dispatchEvent(newEvent); |
628 | 625 | ||
629 | // Delete the style from the view | 626 | // Delete the style from the view |
630 | this.arrLayerStyles.splice(selectedIndex, 1); | 627 | this.arrLayerStyles.splice(selectedIndex, 1); |
@@ -717,6 +714,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
717 | value: function(event) { | 714 | value: function(event) { |
718 | this.layerData.isActive = true; | 715 | this.layerData.isActive = true; |
719 | var ptrParent = nj.queryParentSelector(event.target, ".content-style"); | 716 | var ptrParent = nj.queryParentSelector(event.target, ".content-style"); |
717 | console.log('handleMousedown called') | ||
720 | if (ptrParent !== false) { | 718 | if (ptrParent !== false) { |
721 | this.selectStyle(this.getActiveStyleIndex()); | 719 | this.selectStyle(this.getActiveStyleIndex()); |
722 | } | 720 | } |