diff options
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 238ddae9..bddfcd3e 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -499,15 +499,15 @@ 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); |
510 | this.element.addEventListener("click", this, false); | 507 | this.element.addEventListener("click", this, false); |
508 | |||
509 | // Drag and drop event hanlders | ||
510 | this.element.addEventListener("dropped", this, false); | ||
511 | 511 | ||
512 | } | 512 | } |
513 | }, | 513 | }, |
@@ -574,6 +574,8 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
574 | newEvent = document.createEvent("CustomEvent"); | 574 | newEvent = document.createEvent("CustomEvent"); |
575 | 575 | ||
576 | this.isStyleCollapsed = false; | 576 | this.isStyleCollapsed = false; |
577 | this.layerData.isStyleCollapsed = false; | ||
578 | this.triggerOutgoingBinding(); | ||
577 | 579 | ||
578 | newEvent.initCustomEvent("layerEvent", false, true); | 580 | newEvent.initCustomEvent("layerEvent", false, true); |
579 | newEvent.layerEventLocale = "styles"; | 581 | newEvent.layerEventLocale = "styles"; |
@@ -604,7 +606,8 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
604 | // Set up the event info and dispatch the event | 606 | // Set up the event info and dispatch the event |
605 | 607 | ||
606 | newEvent.styleSelection = mySelection; | 608 | newEvent.styleSelection = mySelection; |
607 | //defaultEventManager.dispatchEvent(newEvent); | 609 | defaultEventManager.dispatchEvent(newEvent); |
610 | |||
608 | 611 | ||
609 | } | 612 | } |
610 | }, | 613 | }, |
@@ -624,7 +627,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
624 | newEvent.layerID = this.layerID; | 627 | newEvent.layerID = this.layerID; |
625 | newEvent.styleID = this.arrLayerStyles[selectedIndex].styleID; | 628 | newEvent.styleID = this.arrLayerStyles[selectedIndex].styleID; |
626 | newEvent.styleSelection = selectedIndex; | 629 | newEvent.styleSelection = selectedIndex; |
627 | //defaultEventManager.dispatchEvent(newEvent); | 630 | defaultEventManager.dispatchEvent(newEvent); |
628 | 631 | ||
629 | // Delete the style from the view | 632 | // Delete the style from the view |
630 | this.arrLayerStyles.splice(selectedIndex, 1); | 633 | this.arrLayerStyles.splice(selectedIndex, 1); |
@@ -783,6 +786,11 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
783 | this.triggerOutgoingBinding(); | 786 | this.triggerOutgoingBinding(); |
784 | } | 787 | } |
785 | }, | 788 | }, |
789 | handleDropped : { | ||
790 | value: function(event) { | ||
791 | console.log('wheeee! WWEWWEWWWWEEEEEEEEE') | ||
792 | } | ||
793 | }, | ||
786 | /* End: Event handlers */ | 794 | /* End: Event handlers */ |
787 | 795 | ||
788 | /* Begin: Logging routines */ | 796 | /* Begin: Logging routines */ |