Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | mw.log("Should update trimStartThumb::" + $j(smilClip).attr('clipBegin') ); |
111 | 111 | // Render a thumbnail for relative start time = 0 |
112 | 112 | smil.getLayout().drawElementThumb( |
113 | | - $j(target).find('.trimStartThumb'), |
| 113 | + $j( target ).find('.trimStartThumb'), |
114 | 114 | smilClip, |
115 | 115 | 0 |
116 | 116 | ) |
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | mw.log("Should update trimStartThumb::" + $j(smilClip).attr('clipBegin') ); |
122 | 122 | // Render a thumbnail for the updated duration |
123 | 123 | smil.getLayout().drawElementThumb( |
124 | | - $j(target).find('.trimEndThumb'), |
| 124 | + $j( target ).find('.trimEndThumb'), |
125 | 125 | smilClip, |
126 | 126 | clipDur |
127 | 127 | ); |
— | — | @@ -183,14 +183,15 @@ |
184 | 184 | ); |
185 | 185 | }, |
186 | 186 | change: function( event, ui ) { |
| 187 | + var attributeValue = 0, sliderIndex = 0; |
187 | 188 | if( sliderValues[0] != ui.values[0] ){ |
188 | 189 | var attributeChanged = 'clipBegin'; |
189 | 190 | sliderIndex = 0; |
190 | | - var attributeValue = sliderToTime( ui.values[ 0 ] ) |
| 191 | + attributeValue = sliderToTime( ui.values[ 0 ] ) |
191 | 192 | } else { |
192 | 193 | var attributeChanged = 'dur'; |
193 | 194 | sliderIndex = 1; |
194 | | - var attributeValue = sliderToTime( ui.values[ 1 ]- ui.values[0] ) |
| 195 | + attributeValue = sliderToTime( ui.values[ 1 ]- ui.values[0] ) |
195 | 196 | } |
196 | 197 | sliderValues[ sliderIndex ] = ui.values[ sliderIndex ]; |
197 | 198 | |
— | — | @@ -199,6 +200,10 @@ |
200 | 201 | |
201 | 202 | // update the widget |
202 | 203 | _this.editWidgets.trimTimeline.update( _this, target, smilClip); |
| 204 | + |
| 205 | + // Register the edit state for undo / redo |
| 206 | + _this.sequencer.getActionsEdit().registerEdit(); |
| 207 | + |
203 | 208 | } |
204 | 209 | }) |
205 | 210 | ); |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js |
— | — | @@ -103,12 +103,12 @@ |
104 | 104 | var $menuTarget = this.sequencer.getMenuTarget(); |
105 | 105 | $menuTarget.empty(); |
106 | 106 | |
107 | | - for( var menuKey in this.menuConfig ){ |
| 107 | + for( var menuKey in this.menuConfig ){ |
108 | 108 | // Create a function to preserve menuKey binding scope |
109 | 109 | function drawTopMenu( menuKey ){ |
110 | 110 | // Add the menu target |
111 | 111 | $menuTarget |
112 | | - .append( |
| 112 | + .append( |
113 | 113 | $j('<span />') |
114 | 114 | .html( gM('mwe-sequencer-menu-' + menuKey ) ) |
115 | 115 | .css({ |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTimeline.js |
— | — | @@ -359,7 +359,9 @@ |
360 | 360 | $j(curClip).addClass( 'selectedClip') |
361 | 361 | } |
362 | 362 | }); |
363 | | - } |
| 363 | + } |
| 364 | + |
| 365 | + // xxx check if selected clip has changed hide tool edit interface |
364 | 366 | }, |
365 | 367 | |
366 | 368 | getTimelineClipId: function( $node ){ |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerActionsEdit.js |
— | — | @@ -53,8 +53,9 @@ |
54 | 54 | this.editStack = this.editStack.splice(0, this.editIndex); |
55 | 55 | } |
56 | 56 | |
57 | | - // @@TODO would be good to just compute the diff in JS and store that |
58 | | - // ( instead of the full xml text ) |
| 57 | + // @@TODO could save space to just compute the diff in JS and store that |
| 58 | + // ie: http://code.google.com/p/google-diff-match-patch/ |
| 59 | + // ( instead of the full xml text with "key-pages" every 10 edits or something like that. |
59 | 60 | this.editStack.push( this.sequencer.getSmil().getXMLString() ); |
60 | 61 | |
61 | 62 | // Update the editIndex |