diff options
author | Nivesh Rajbhandari | 2012-07-02 09:23:13 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-07-02 09:23:13 -0700 |
commit | 2bae1b3148233288ec0bc50876935bdfea1f288c (patch) | |
tree | 686fa3b5b9615941bb7013f35c91e8f326b049db /js/panels | |
parent | 2da05a4c71bfe9b136384d9e94fbfbef19f24550 (diff) | |
parent | 12de4e49a309e210c13eb40b2ffa158ef2eb54a7 (diff) | |
download | ninja-2bae1b3148233288ec0bc50876935bdfea1f288c.tar.gz |
Merge branch 'refs/heads/ninja-internal' into MaterialsUI
Diffstat (limited to 'js/panels')
42 files changed, 1069 insertions, 1910 deletions
diff --git a/js/panels/CSSPanel/css-shorthand-map.js b/js/panels/CSSPanel/css-shorthand-map.js index d469e2a1..e38627f7 100755 --- a/js/panels/CSSPanel/css-shorthand-map.js +++ b/js/panels/CSSPanel/css-shorthand-map.js | |||
@@ -68,7 +68,15 @@ exports.CSS_SHORTHAND_MAP = { | |||
68 | 'padding-left' : ['padding'], | 68 | 'padding-left' : ['padding'], |
69 | 'padding-right' : ['padding'], | 69 | 'padding-right' : ['padding'], |
70 | 'padding-top' : ['padding'], | 70 | 'padding-top' : ['padding'], |
71 | 71 | ||
72 | '-webkit-animation-name' : ['-webkit-animation'], | ||
73 | '-webkit-animation-duration' : ['-webkit-animation'], | ||
74 | '-webkit-animation-timing-function' : ['-webkit-animation'], | ||
75 | '-webkit-animation-delay' : ['-webkit-animation'], | ||
76 | '-webkit-animation-iteration-count' : ['-webkit-animation'], | ||
77 | '-webkit-animation-direction' : ['-webkit-animation'], | ||
78 | '-webkit-animation-fill-mode' : ['-webkit-animation'], | ||
79 | |||
72 | '-webkit-transition-property' : ['-webkit-transition'], | 80 | '-webkit-transition-property' : ['-webkit-transition'], |
73 | '-webkit-transition-duration' : ['-webkit-transition'], | 81 | '-webkit-transition-duration' : ['-webkit-transition'], |
74 | '-webkit-transition-timing-function' : ['-webkit-transition'], | 82 | '-webkit-transition-timing-function' : ['-webkit-transition'], |
@@ -91,6 +99,7 @@ exports.CSS_SHORTHAND_TO_SUBPROP_MAP = { | |||
91 | 'list' : ["list-style-type", "list-style-image", "list-style-position"], | 99 | 'list' : ["list-style-type", "list-style-image", "list-style-position"], |
92 | 'margin' : ["margin-top", "margin-right", "margin-bottom", "margin-left"], | 100 | 'margin' : ["margin-top", "margin-right", "margin-bottom", "margin-left"], |
93 | 'padding' : ["padding-top", "padding-right", "padding-bottom", "padding-left"], | 101 | 'padding' : ["padding-top", "padding-right", "padding-bottom", "padding-left"], |
102 | '-webkit-animation': ["webkit-animation-name", "webkit-animation-duration", "webkit-animation-timing-function", "webkit-animation-delay", "webkit-animation-iteration-count", "webkit-animation-direction", "webkit-animation-fill-mode"], | ||
94 | '-webkit-transition' : ["-webkit-transition-property", "-webkit-transition-duration", | 103 | '-webkit-transition' : ["-webkit-transition-property", "-webkit-transition-duration", |
95 | "-webkit-transition-timing-function", "-webkit-transition-delay"] | 104 | "-webkit-transition-timing-function", "-webkit-transition-delay"] |
96 | }; \ No newline at end of file | 105 | }; \ No newline at end of file |
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index ba6952aa..f7c936f7 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -76,9 +76,20 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
76 | 76 | ||
77 | selectKeyframe:{ | 77 | selectKeyframe:{ |
78 | value:function(){ | 78 | value:function(){ |
79 | if(this.isSelected){ | ||
80 | return; | ||
81 | } | ||
82 | |||
83 | if(this.parentComponent.parentComponent.parentComponent.trackType == "position"){ | ||
84 | var tweenID = this.parentComponent.tweenID; | ||
85 | var mainTrack = this.parentComponent.parentComponent.parentComponent.parentComponent.parentComponent.parentComponent.parentComponent; | ||
86 | mainTrack.childComponents[0].childComponents[tweenID].childComponents[0].selectKeyframe(); | ||
87 | return; | ||
88 | } | ||
89 | |||
79 | this.isSelected=true; | 90 | this.isSelected=true; |
80 | this.element.style.left = (this.position - 6) + "px"; | 91 | this.element.style.left = (this.position - 6) + "px"; |
81 | this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty | 92 | this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty; |
82 | this.parentComponent.selectTween(); | 93 | this.parentComponent.selectTween(); |
83 | } | 94 | } |
84 | }, | 95 | }, |
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 776d5ec8..b4833fa2 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -325,6 +325,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
325 | value: false | 325 | value: false |
326 | }, | 326 | }, |
327 | isActive: { | 327 | isActive: { |
328 | serializable:true, | ||
328 | get: function() { | 329 | get: function() { |
329 | return this._isActive; | 330 | return this._isActive; |
330 | }, | 331 | }, |
@@ -752,12 +753,20 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
752 | //defaultEventManager.dispatchEvent(newEvent); | 753 | //defaultEventManager.dispatchEvent(newEvent); |
753 | 754 | ||
754 | // Dispatch the event to the TimelineTrack component associated with this Layer. | 755 | // Dispatch the event to the TimelineTrack component associated with this Layer. |
755 | var myIndex = this.application.ninja.timeline.getActiveLayerIndex(), | 756 | var myIndex = false, |
757 | i = 0, | ||
758 | arrLayersLength = this.parentComponent.parentComponent.arrLayers.length, | ||
756 | arrTracks = document.querySelectorAll('[data-montage-id="track"]'); | 759 | arrTracks = document.querySelectorAll('[data-montage-id="track"]'); |
757 | 760 | ||
761 | for (i = 0; i < arrLayersLength; i++) { | ||
762 | if (this.stageElement == this.parentComponent.parentComponent.arrLayers[i].layerData.stageElement) { | ||
763 | myIndex = i; | ||
764 | } | ||
765 | } | ||
766 | |||
758 | if (myIndex !== false) { | 767 | if (myIndex !== false) { |
759 | arrTracks[myIndex].dispatchEvent(newEvent); | 768 | arrTracks[myIndex].dispatchEvent(newEvent); |
760 | } | 769 | } |
761 | } | 770 | } |
762 | }, | 771 | }, |
763 | 772 | ||
@@ -945,12 +954,14 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
945 | this.isMainCollapsed = false; | 954 | this.isMainCollapsed = false; |
946 | } else { | 955 | } else { |
947 | this.isMainCollapsed = true; | 956 | this.isMainCollapsed = true; |
957 | this.application.ninja.timeline.synchScrollbars(43); | ||
948 | } | 958 | } |
949 | this.triggerOutgoingBinding(); | 959 | this.triggerOutgoingBinding(); |
950 | } | 960 | } |
951 | }, | 961 | }, |
952 | handlePositionCollapserClick : { | 962 | handlePositionCollapserClick : { |
953 | value: function(event) { | 963 | value: function(event) { |
964 | var myHeight = this.positionCollapser.element.offsetHeight; | ||
954 | this.positionCollapser.bypassAnimation = false; | 965 | this.positionCollapser.bypassAnimation = false; |
955 | this.bypassAnimation = false; | 966 | this.bypassAnimation = false; |
956 | this.layerData.bypassAnimation = false; | 967 | this.layerData.bypassAnimation = false; |
@@ -958,12 +969,14 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
958 | this.isPositionCollapsed = false; | 969 | this.isPositionCollapsed = false; |
959 | } else { | 970 | } else { |
960 | this.isPositionCollapsed = true; | 971 | this.isPositionCollapsed = true; |
972 | this.application.ninja.timeline.synchScrollbars(myHeight); | ||
961 | } | 973 | } |
962 | this.triggerOutgoingBinding(); | 974 | this.triggerOutgoingBinding(); |
963 | } | 975 | } |
964 | }, | 976 | }, |
965 | handleStyleCollapserClick : { | 977 | handleStyleCollapserClick : { |
966 | value: function(event) { | 978 | value: function(event) { |
979 | var myHeight = this.styleCollapser.element.offsetHeight; | ||
967 | this.styleCollapser.bypassAnimation = false; | 980 | this.styleCollapser.bypassAnimation = false; |
968 | this.bypassAnimation = false; | 981 | this.bypassAnimation = false; |
969 | this.layerData.bypassAnimation = false; | 982 | this.layerData.bypassAnimation = false; |
@@ -971,6 +984,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
971 | this.isStyleCollapsed = false; | 984 | this.isStyleCollapsed = false; |