aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js43
1 files changed, 35 insertions, 8 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index cbc001be..e01e5b75 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -524,6 +524,32 @@ var Layer = exports.Layer = Montage.create(Component, {
524 this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); 524 this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false);
525 this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); 525 this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false);
526 this.element.addEventListener("drop", this.handleDrop.bind(this), false); 526 this.element.addEventListener("drop", this.handleDrop.bind(this), false);
527
528 this.eventManager.addEventListener("elementChange",this,false);
529
530 this.leftControl.identifier = "left";
531 this.leftControl.addEventListener("changing",this,false);
532 this.leftControl.addEventListener("change",this,false);
533
534 this.topControl.identifier = "top";
535 this.topControl.addEventListener("changing",this,false);
536 this.topControl.addEventListener("change",this,false);
537
538 this.widthControl.identifier = "width";
539 this.widthControl.addEventListener("changing",this,false);
540 this.widthControl.addEventListener("change",this,false);
541
542 this.heightControl.identifier = "height";
543 this.heightControl.addEventListener("changing",this,false);
544 this.heightControl.addEventListener("change",this,false);
545
546 el=this.layerData.stageElement;
547 debugger;
548
549 this.dtextPositionX = parseFloat(ElementsMediator.getProperty(el, "left"));
550 this.dtextPositionY = parseFloat(ElementsMediator.getProperty(el, "top"));
551 this.dtextScaleY = parseFloat(ElementsMediator.getProperty(el, "height"));
552 this.dtextScaleX= parseFloat(ElementsMediator.getProperty(el, "width"));
527 } 553 }
528 }, 554 },
529 555
@@ -891,19 +917,20 @@ var Layer = exports.Layer = Montage.create(Component, {
891 917
892 handleLeftChange:{ 918 handleLeftChange:{
893 value:function(){ 919 value:function(){
894 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.dtextPositionX + "px"] , "Change", "timeline"); 920 debugger;
921 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "left", [this.dtextPositionX + "px"] , "Change", "timeline");
895 } 922 }
896 }, 923 },
897 924
898 handleTopChange:{ 925 handleTopChange:{
899 value:function(){ 926 value:function(){
900 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.dtextPositionY + "px"] , "Change", "timeline"); 927 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "top", [this.dtextPositionY + "px"] , "Change", "timeline");
901 } 928 }
902 }, 929 },
903 930
904 handleWidthChange:{ 931 handleWidthChange:{
905 value:function(){ 932 value:function(){
906 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Change", "timeline"); 933 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "width", [this.dtextScaleX + "px"] , "Change", "timeline");
907 } 934 }
908 }, 935 },
909 936
@@ -915,25 +942,25 @@ var Layer = exports.Layer = Montage.create(Component, {
915 942
916 handleLeftChanging:{ 943 handleLeftChanging:{
917 value:function(){ 944 value:function(){
918 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.dtextPositionX + "px"] , "Changing", "timeline"); 945 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "left", [this.dtextPositionX + "px"] , "Changing", "timeline");
919 } 946 }
920 }, 947 },
921 948
922 handleTopChanging:{ 949 handleTopChanging:{
923 value:function(){ 950 value:function(){
924 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.dtextPositionY + "px"] , "Changing", "timeline"); 951 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "top", [this.dtextPositionY + "px"] , "Changing", "timeline");
925 } 952 }
926 }, 953 },
927 954
928 handleWidthChanging:{ 955 handleWidthChanging:{
929 value:function(){ 956 value:function(){
930 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Changing", "timeline"); 957 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "width", [this.dtextScaleX + "px"] , "Changing", "timeline");
931 } 958 }
932 }, 959 },
933 960
934 handleHeightChanging:{ 961 handleHeightChanging:{
935 value:function(){ 962 value:function(){
936 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Changing", "timeline"); 963 this.application.ninja.elementMediator.setProperty(this.layerData.stageElement, "height", [this.dtextScaleY + "px"] , "Changing", "timeline");
937 } 964 }
938 }, 965 },
939 966
@@ -1012,7 +1039,7 @@ var Layer = exports.Layer = Montage.create(Component, {
1012 return e.stack.split("at")[3].split(":")[2]; 1039 return e.stack.split("at")[3].split(":")[2];
1013 } 1040 }
1014 } 1041 }
1015 }, 1042 }
1016 /* End: Logging routines */ 1043 /* End: Logging routines */
1017 1044
1018}); 1045});