r72934 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72933‎ | r72934 | r72935 >
Date:22:01, 13 September 2010
Author:dale
Status:deferred
Tags:
Comment:
* improved transition edit support
* refactored transition library for improved clarity in public methods
* fix bug in transition overlay name that prevented it from being hidden.
Modified paths:
  • /branches/MwEmbedStandAlone/components/mw.Api.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilTransitions.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/components/mw.Api.js
@@ -178,7 +178,7 @@
179179 }
180180 }, mw.getConfig( 'defaultRequestTimeout' ) * 1000 );
181181
182 - mw.log("run getJSON: " + mw.replaceUrlParams( url, data ) );
 182+ //mw.log("run getJSON: " + mw.replaceUrlParams( url, data ) );
183183
184184 // Check if the request requires a "post"
185185 if( mw.checkRequestPost( data ) ) {
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
@@ -88,8 +88,8 @@
8989 // Get all the draw elements from the body this time:
9090 this.getElementsForTime( time ,
9191 /* SMIL Element in Range */
92 - function( smilElement) {
93 - //mw.log("SmilBody::renderTime: Element in Range" + $j( smilElement ).attr('id'));
 92+ function( smilElement) {
 93+ //mw.log("SmilBody::renderTime: Element in Range:" + $j( smilElement ).attr('id'));
9494 // var relativeTime = time - smilElement.parentTimeOffset;
9595 var relativeTime = time - $j( smilElement ).data ( 'startOffset' );
9696
@@ -101,7 +101,7 @@
102102 },
103103 /* SMIL Element out of range */
104104 function( smilElement ){
105 - //mw.log("SmilBody::renderTime: Element out of Range" + $j( smilElement ).attr('id'));
 105+ //mw.log("SmilBody::renderTime: Element out of Range:" + $j( smilElement ).attr('id'));
106106 // Stop the animation or playback
107107 _this.smil.getAnimate().pauseAnimation( smilElement )
108108
@@ -112,7 +112,7 @@
113113 $j( smilElement ).data('activePlayback', false)
114114
115115 // Expire transitions if needed
116 - _this.smil.getTransitions().elementOutOfRange( smilElement, time );
 116+ _this.smil.getTransitions().hideTransitionElements( smilElement, time );
117117 }
118118 );
119119 },
@@ -247,12 +247,12 @@
248248 var startOffset = $node.data( 'startOffset' );
249249 var nodeDuration = _this.getClipDuration( $node );
250250
251 - /*
252 - * mw.log("Checking if ref: " + $node.attr('id') + ' is in range:' + time + ' >= ' +
 251+
 252+ /*mw.log("Checking if ref: " + $node.attr('id') + ' is in range:' + time + ' >= ' +
253253 $node.data( 'startOffset' ) + ' && '+ time +' < ' +startOffset + ' + ' + nodeDuration + "\n" +
254254 ' inrage cb: ' + typeof inRangeCallback + ' eval::' +
255 - ( time >= startOffset && time < ( startOffset + nodeDuration) ) + "\n\n" );
256 - */
 255+ ( time >= startOffset && time < ( startOffset + nodeDuration) ) + "\n\n" );*/
 256+
257257 // Check if element is in range:
258258 if( time >= startOffset && time < ( startOffset + nodeDuration) ){
259259 if( typeof inRangeCallback == 'function' ){
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilTransitions.js
@@ -10,57 +10,68 @@
1111 this.smil = smilObject;
1212 },
1313
 14+ getTransitionInRange: function( smilElement, animateTime ) {
 15+ var _this = this;
 16+ var inRangeTransitions = [];
 17+ var transitionDirections = ['transIn', 'transOut'];
 18+ $j.each( transitionDirections, function(inx, transitionDirection ){
 19+ if( $j( smilElement ).attr( transitionDirection ) ){
 20+ $transition = _this.smil.$dom.find( '#' + $j( smilElement ).attr( transitionDirection) );
 21+ var transitionDuration = _this.smil.parseTime( $transition.attr('dur') );
 22+ // Check if the transition is in range
 23+ var percent = false;
 24+ if( transitionDirection == 'transIn' ){
 25+ if ( transitionDuration > animateTime ){
 26+ percent = animateTime / transitionDuration;
 27+ }
 28+ }
 29+ if( transitionDirection == 'transOut' ){
 30+ var nodeDuration = _this.smil.getBody().getClipDuration( smilElement );
 31+ if( animateTime > ( nodeDuration - transitionDuration ) ){
 32+ percent = animateTime - ( nodeDuration - transitionDuration ) / transitionDuration;
 33+ }
 34+ // Invert the percentage for "transOut"
 35+ percent = 1 - percent;
 36+ }
 37+ if( percent !== false ){
 38+ inRangeTransitions.push( {
 39+ 'transition': $transition,
 40+ 'percent': percent
 41+ })
 42+ }
 43+ }
 44+ });
 45+ return inRangeTransitions;
 46+ },
 47+
 48+ // Returns true if a transition is in rage false if not
 49+ hasTransitionInRange : function( smilElement, animateTime ) {
 50+ return ( this.getTransitionInRange( smilElement, animateTime ) != 0 );
 51+ },
 52+
 53+ // hide any associative transition overlays ( ie the element is no longer displayed )
 54+ hideElementOverlays: function( smilElement ){
 55+
 56+ },
 57+
1458 // Generates a transition overlay based on the transition type
1559 transformTransitionOverlay: function( smilElement, animateTime ) {
 60+ var _this = this;
1661 /*mw.log('SmilTransitions::transformTransitionOverlay:' + animateTime +
1762 ' tIn:' + $j( smilElement ).attr( 'transIn' ) +
18 - ' tOut:' + $j( smilElement ).attr( 'transOut' ) );
19 - */
20 - // Get the transition type and id:
21 - var transitionInRange = false;
 63+ ' tOut:' + $j( smilElement ).attr( 'transOut' ) );*/
2264
23 - if( $j( smilElement ).attr( 'transIn' ) ){
24 - $transition = this.smil.$dom.find( '#' + $j( smilElement ).attr( 'transIn' ) );
25 - // Check if the transition is in range
26 - var transitionDuration = this.smil.parseTime( $transition.attr('dur') );
27 - //mw.log("SmilTransitions: test: td:" + transitionDuration + ' > ' + animateTime);
28 - if( transitionDuration > animateTime ){
29 - var percent = animateTime / transitionDuration;
30 - /* mw.log("SmilTransitions: " + $j( smilElement ).attr( 'transIn' ) + " in range for " +
31 - this.smil.getSmilElementPlayerID( smilElement ) + " draw:" + percent );
32 - */
33 - this.drawTransition( percent, $transition, smilElement );
34 - transitionInRange = true;
35 - } else {
36 - // Out of range hide this overlay
37 - $j( '#' + this.getTransitionOverlayId( $transition, smilElement ) ).hide();
38 - }
39 - }
40 -
41 - if( $j( smilElement ).attr( 'transOut' ) ){
42 - $transition = this.smil.$dom.find( '#' + $j( smilElement ).attr( 'transOut' ) );
43 - // Check if the transition is in range
44 - var duration = this.smil.parseTime( $transition.attr('dur') );
45 - var nodeDuration = this.smil.getBody().getClipDuration( smilElement );
46 - if( animateTime > ( nodeDuration - duration ) ){
47 - var percent = animateTime - ( nodeDuration - duration ) / duration;
48 - // Invert the percentage for "transOut"
49 - percent = 1 - percent;
50 -
51 - this.drawTransition( percent, $transition, smilElement );
52 - transitionInRange = true;
53 - } else {
54 - // Hide this overlay
55 - $j( '#' + this.getTransitionOverlayId( $transition, smilElement ) ).hide();
56 - }
57 - }
58 - return transitionInRange;
 65+ // Get the transition in range
 66+ var transitionInRange = this.getTransitionInRange( smilElement, animateTime );
 67+ $j.each( transitionInRange, function(inx, tran){
 68+ _this.drawTransition( tran.percent, tran.transition, smilElement );
 69+ });
5970 },
6071
6172 /**
62 - * elementOutOfRange check if an elements transition overlays are out of range and hide them
 73+ * hideTransitionElements hides transition overlays that are out of range
6374 */
64 - elementOutOfRange: function ( smilElement, time ){
 75+ hideTransitionElements: function ( smilElement ){
6576 // for now just hide
6677 if( $j( smilElement ).attr( 'transIn' ) ){
6778 $j( '#' +
@@ -118,7 +129,7 @@
119130 transitionFunctionMap : {
120131 'fade' : {
121132 'fadeFromColor': function( _this, percent, $transition, smilElement ){
122 - // Add the overlay if missing
 133+ // Add the overlay if missing
123134 var transitionOverlayId = _this.getTransitionOverlayId( $transition, smilElement );
124135 if( $j( '#' + transitionOverlayId ).length == 0 ){
125136
@@ -138,7 +149,7 @@
139150 percent = 1 - percent;
140151
141152 // Update the overlay opacity
142 - $j( '#' + transitionOverlayId ).css( 'opacity', percent );
 153+ $j( '#' + transitionOverlayId ).show().css( 'opacity', percent );
143154 },
144155 'crossfade': function( _this, percent, $transition, smilElement ){
145156 // fade "ourselves" ... in cases of overlapping timelines this will create a true cross fade
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
@@ -74,7 +74,7 @@
7575 */
7676 animateTransform: function( smilElement, animateTime, deltaTime ){
7777 var _this = this;
78 - //mw.log("SmilAnimate::animateTransform:" + smilElement.id + ' AnimateTime: ' + animateTime + ' delta:' + deltaTime);
 78+ //mw.log("SmilAnimate::animateTransform:" + $j( smilElement).attr('id') + ' AnimateTime: ' + animateTime + ' delta:' + deltaTime);
7979
8080 // Check for deltaTime to animate over, if zero
8181 if( !deltaTime || deltaTime === 0 ){
@@ -145,6 +145,13 @@
146146 checkForTransformUpdate: function( smilElement, animateTime, deltaTime ){
147147 // Get the node type:
148148 var refType = this.smil.getRefType( smilElement )
 149+ // Check for transtion in range
 150+ if( refType != 'audio'
 151+ &&
 152+ this.smil.getTransitions().hasTransitionInRange( smilElement, animateTime )
 153+ ){
 154+ return true;
 155+ }
149156
150157 // Let transition check for updates
151158 if( refType == 'img' || refType=='video' ){
@@ -187,15 +194,15 @@
188195 * Transform Element in an inner animation loop
189196 */
190197 transformAnimateFrame: function( smilElement, animateTime ){
191 - // Audio / Video has no inner animation per-frame transforms
192 - if( this.smil.getRefType( smilElement ) != 'video'
193 - &&
194 - this.smil.getRefType( smilElement ) != 'audio'
195 - ){
 198+ var refType = this.smil.getRefType( smilElement );
 199+ // Audio / Video has no inner animation per-frame transforms ( aside from
 200+ if( refType != 'video' && refType != 'audio' ){
196201 this.transformElement( smilElement, animateTime );
197202 }
198 - // Update the smil Element transition:
199 - this.smil.getTransitions().transformTransitionOverlay( smilElement, animateTime );
 203+ // Update the smil Element transition ( applies to all visual media types )
 204+ if( refType != 'audio' ){
 205+ this.smil.getTransitions().transformTransitionOverlay( smilElement, animateTime );
 206+ }
200207 },
201208
202209 /**
@@ -214,11 +221,9 @@
215222 this.transformImageForTime( smilElement, animateTime );
216223 break;
217224 case 'video':
 225+ case 'audio':
218226 this.transformMediaForTime( smilElement, animateTime );
219227 break;
220 - case 'audio':
221 - // audio has no frame transform ( only playback )
222 - break;
223228 }
224229 },
225230
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
@@ -286,7 +286,7 @@
287287 // Reset the pausedForBuffer flag:
288288 this.pausedForBuffer = false;
289289
290 - //mw.log( "Call animateTime: " + this.smilPlayTime);
 290+ mw.log( "Call animateTime: " + this.smilPlayTime);
291291 // Issue an animate time request with monitorDelta
292292 this.smil.animateTime( this.smilPlayTime, this.monitorRate );
293293 }
Index: branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php
@@ -54,6 +54,7 @@
5555 'mwe-sequencer-tools-transitions-desc' => 'Set in and out Transitions',
5656 'mwe-sequencer-tools-transitions-transIn' => 'Transition in',
5757 'mwe-sequencer-tools-transitions-transOut' => 'Transition out',
 58+ 'mwe-sequencer-tools-transitions-color' => 'Color',
5859
5960 'mwe-sequencer-clip-cancel-edit' => 'Cancel clip edit',
6061 'mwe-sequencer-preview' => 'Preview',
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
@@ -252,7 +252,7 @@
253253 'editType' : 'hidden'
254254 },
255255 'dur' : {
256 - 'value' : '2s',
 256+ 'value' : '0:02',
257257 'editType' : 'time'
258258 },
259259 },
@@ -292,8 +292,8 @@
293293 buildAttributeSet: function( transitionType ){
294294 var attributes = {};
295295 for( var i in this.transitionTypes[ transitionType ] ){
296 - if( i == 'extends' ){
297 - $j.extend( attributes, this.buildAttributeSet( i ) );
 296+ if( i == 'extends' ){
 297+ $j.extend( attributes, this.buildAttributeSet( this.transitionTypes[ transitionType ][i] ) );
298298 } else {
299299 attributes[ i ] = this.transitionTypes[ transitionType ][i];
300300 }
@@ -308,8 +308,21 @@
309309 // but in the sequencer context we want unique transitions so that each can be customized
310310 // independently.
311311 return $j( smilElement ).attr('id') + '_' + transitionType;
312 - },
 312+ },
313313
 314+ // Get a transition element ( if it does not exist add it )
 315+ getTransitionElement: function( _this, smilElement, transitionType ){
 316+ var $smilDom = _this.sequencer.getSmil().$dom;
 317+ var transId = this.getTransitionId( smilElement, transitionType );
 318+ if( $smilDom.find( '#' + transId ).length == 0 ){
 319+ $smilDom.find('head').append(
 320+ $j('<transition />')
 321+ .attr('id', transId )
 322+ );
 323+ }
 324+ return $smilDom.find( '#' + transId );
 325+ },
 326+
314327 getSelectedTransitionType: function(smilElement, transitionDirection ){
315328 var attributeValue = $j( smilElement ).attr( transitionDirection );
316329 if( !attributeValue )
@@ -318,43 +331,90 @@
319332 },
320333
321334 getBindedTranstionEdit: function( _this, smilElement, transitionType ){
322 - var $smilDom = _this.sequencer.getSmil().$dom;
323 - var $editTransitionsSet = $j('<span />');
 335+ var _editTransitions = this;
 336+ var $editTransitionsSet = $j('<div />');
 337+ // return the empty div on empty transtionType
 338+ if( transitionType == '' ){
 339+ return $editTransitionsSet
 340+ }
 341+
324342 // Get the smil transition element
325 - var $smilTransitionElement = $smilDom.find( '#' + this.getTransitionId( smilElement, transitionType ) );
 343+ var $smilTransitionElement = this.getTransitionElement( _this, smilElement, transitionType )
326344 // Get all the editable attributes for transitionName
327345 var attributeSet = this.buildAttributeSet( transitionType );
328 - for( var i in attributeSet ){
329 - var transitionAttribute = attributeSet[i];
 346+
 347+ $j.each( attributeSet, function( attributeKey, transitionAttribute ){
330348 // Skip setup attributes
331 - if( i == 'extends' || i == 'selectable' ){
332 - continue;
 349+ if( attributeKey == 'extends' || attributeKey == 'selectable' ){
 350+ return true;
333351 }
 352+ var initialValue = $smilTransitionElement.attr( attributeKey );
 353+ // Set to the default value if the transition attribute has no attribute key
 354+ if( !initialValue){
 355+ initialValue = transitionAttribute.value
 356+ $smilTransitionElement.attr( attributeKey, transitionAttribute.value )
 357+ }
 358+
334359 if( transitionAttribute.editType == 'time' ){
335360 $editTransitionsSet.append(
336 - $j('<input />')
337 - .attr('size', 5)
338 - .change(function(){
339 - var timeValue = mw.pa$j(this).val();
 361+ _this.getInputBox({
 362+ 'title' : gM('mwe-sequencer-tools-duration'),
 363+ 'inputSize' : 5,
 364+ 'initialValue' :initialValue,
 365+ 'change': function(){
 366+ // parse smil time
 367+ var time = _this.sequencer.getSmil().parseTime( $j(this).val() );
 368+ // Check if time > clip duration
 369+ if( time > $j( smilElement ).attr('dur') ){
 370+ time = $j( smilElement ).attr('dur');
 371+ }
 372+ if( time < 0 )
 373+ time = 0;
 374+ // Update the input value
 375+ $j( this ).val( mw.seconds2npt( time ) );
 376+ // Update the smil attribute
 377+ $smilTransitionElement.attr( attributeKey, time );
 378+ // run the onChange action
 379+ _editTransitions.onChange( _this, smilElement );
 380+ }
340381 })
341382 )
 383+ } else if ( transitionAttribute.editType == 'color' ){
 384+ $inputBox = _this.getInputBox({
 385+ 'title' : gM('mwe-sequencer-tools-transitions-color'),
 386+ 'inputSize' : 8,
 387+ 'initialValue' : initialValue,
 388+ 'change': function(){
 389+ var cat = $j(this).val();
 390+ debugger;
 391+ }
 392+ })
 393+ // xxx add the color picker:
 394+ $editTransitionsSet.append( $inputBox );
342395 }
343 -
344 -
345 - }
 396+ })
 397+ return $editTransitionsSet;
346398 },
347399
348 - 'onChange': function( _this, smilElement, target ){
 400+ 'onChange': function( _this, smilElement ){
 401+ // Update the sequence duration :
 402+ _this.sequencer.getEmbedPlayer().getDuration( true );
349403
 404+ // Seek to "this clip"
 405+ _this.sequencer.getEmbedPlayer().setCurrentTime(
 406+ $j( smilElement ).data('startOffset')
 407+ );
350408 },
351409 'draw': function( _this, target, smilElement ){
352410 // draw the two attribute types
353 - $transitionWidget = $j('<div />');
 411+ var _editTransitions = this;
 412+ var $transitionWidget = $j('<div />');
354413
355414 var transitionDirections = ['transIn', 'transOut'];
356 - for( var i in transitionDirections ){
357 - var transitionDirection = transitionTypes[i];
 415+ $j.each(transitionDirections, function( inx, transitionDirection ){
358416 $transitionWidget.append(
 417+ $j('<div />').css('clear', 'both')
 418+ ,
359419 $j('<h3 />').text( gM('mwe-sequencer-tools-transitions-' + transitionDirection ))
360420 )
361421 // Output the top level empty select
@@ -362,50 +422,65 @@
363423 $j('<option />')
364424 .attr('value', '')
365425 );
366 - var selectedTransitionType = this.getSelectedTransitionType(smilElement, transitionDirection);
367 - for( var j in this.transitionTypes ){
368 - if( this.transitionTypes[j].selectable
 426+ var selectedTransitionType = _editTransitions.getSelectedTransitionType( smilElement, transitionDirection);
 427+ for( var transitionType in _editTransitions.transitionTypes ){
 428+ if( _editTransitions.transitionTypes[ transitionType ].selectable
369429 &&
370 - $j.inArray( transitionType, this.transitionTypes[j].selectable ) !== -1 )
 430+ $j.inArray( transitionDirection, _editTransitions.transitionTypes[transitionType].selectable ) !== -1 )
371431 {
372 - // output the item if its selecteable for the current transitionType
 432+ // Output the item if its selectable for the current transitionType
373433 var $option = $j("<option />")
374 - .attr('value', this.transitionTypes[j])
375 - .text( this.transitionTypes[j] )
 434+ .attr('value', transitionType )
 435+ .text( transitionType )
376436 // Add selected attribute if selected:
377 - if( selectedTransitionType == this.transitionTypes[j] ){
 437+ if( selectedTransitionType == transitionType ){
378438 $option.attr('selected', 'true');
379439 }
380440 $transSelect.append( $option );
381441 }
382442 }
383 - // add the select
384 - $transitionWidget.append( $transSelect );
 443+ $transSelect.change( function(){
 444+ var transitionType = $j(this).val();
 445+ $transitionWidget.find( '#' + transitionDirection + '_attributeContainer' ).html(
 446+ _editTransitions.getBindedTranstionEdit(
 447+ _this, smilElement, transitionType
 448+ )
 449+ )
 450+ // Update the smil attribute:
 451+ $j( smilElement ).attr(
 452+ transitionDirection,
 453+ _editTransitions.getTransitionId( smilElement, transitionType )
 454+ )
 455+ // Update the player on select change
 456+ _editTransitions.onChange( _this, smilElement );
 457+ });
 458+
 459+ // Add the select to the $transitionWidget
 460+ $transitionWidget.append( $transSelect );
385461
386462 // Set up the transConfig container:
387463 var $transConfig = $j('<span />')
388 - .addClass('transConfig');
 464+ .attr('id', transitionDirection + '_attributeContainer');
 465+
389466 // If a given transition type is selected output is editable attributes
390467 if( selectedTransitionType != '' ) {
391 - $transConfig.append(
392 - this.getBindedTranstionEdit(
393 - smilElement, selectedTransitionType
394 - )
 468+ $transConfig.append(
 469+ _editTransitions.getBindedTranstionEdit(
 470+ _this, smilElement, selectedTransitionType
 471+ )
395472 )
396473 }
 474+ $transitionWidget.append( $transConfig );
397475
398 - $transitionWidget.append( $transConfig );
399 - }
400 -
401 - return $transitionWidget;
402 - },
403 - 'drawTransitionType':function( attributeType ){
404 -
405 - }
406 -
 476+ // update the player for the default selected set.
 477+ _editTransitions.onChange( _this, smilElement );
 478+ });
 479+ // add the transition widget to the target
 480+ $j( target ).append( $transitionWidget );
 481+ }
407482 },
408483 'editTemplate':{
409 - 'onChange' : function( _this, smilElement, target ){
 484+ 'onChange' : function( _this, smilElement ){
410485 // Clear the smilElement template cache:
411486 $j( smilElement ).data('templateHtmlCache', null);
412487 // Re draw the smilElement in the player
@@ -428,7 +503,7 @@
429504 _this.sequencer
430505 .getServer()
431506 .getTemplateText( $j( smilElement).attr('apititlekey'), function( templateText ){
432 - mw.log("GotTemplateText: " + templateText );
 507+ //mw.log("GotTemplateText: " + templateText );
433508 if( ! templateText || typeof templateText != 'string' ){
434509 mw.log("Error: could not get wikitext form titlekey: " + $j( smilElement).attr('apititlekey'))
435510 return ;
@@ -467,8 +542,7 @@
468543 .change(function(){
469544 _this.editWidgets.editTemplate.onChange(
470545 _this,
471 - smilElement,
472 - target
 546+ smilElement
473547 )
474548 })
475549 .parent()
@@ -483,7 +557,7 @@
484558 }
485559 },
486560 'panzoom' : {
487 - 'onChange': function( _this, smilElement, target ){
 561+ 'onChange': function( _this, smilElement ){
488562 var panZoomVal = $j('#' +_this.getEditToolInputId( 'panzoom', 'panZoom')).val();
489563 mw.log("panzoom change:" + panZoomVal );
490564
@@ -629,7 +703,7 @@
630704 // Restore original css for the layout helper
631705 $j(this).css( orginalHelperCss )
632706 // trigger the 'change'
633 - _this.editWidgets.panzoom.onChange( _this, smilElement, target );
 707+ _this.editWidgets.panzoom.onChange( _this, smilElement );
634708 }
635709 })
636710 .css('cursor', 'move')
@@ -651,14 +725,14 @@
652726 // Restore original css
653727 $j(this).css( orginalHelperCss )
654728 // trigger the change
655 - _this.editWidgets.panzoom.onChange( _this, smilElement, target );
 729+ _this.editWidgets.panzoom.onChange( _this, smilElement);
656730 }
657731 })
658732
659733 }
660734 },
661735 'trimTimeline' : {
662 - 'onChange': function( _this, smilElement, target){
 736+ 'onChange': function( _this, smilElement ){
663737 var smil = _this.sequencer.getSmil();
664738 // Update the preview thumbs
665739
@@ -717,7 +791,7 @@
718792
719793 var onInputChange = function( sliderIndex, timeValue ){
720794 // Register the change
721 - _this.editWidgets.trimTimeline.onChange( _this, smilElement, target);
 795+ _this.editWidgets.trimTimeline.onChange( _this, smilElement );
722796 // Update the slider
723797 if( fullClipDuration ){
724798 $j('#'+_this.sequencer.id + '_trimTimeline' )
@@ -744,7 +818,7 @@
745819 });
746820
747821 // Update the thumbnails:
748 - _this.editWidgets.trimTimeline.onChange( _this, smilElement, target);
 822+ _this.editWidgets.trimTimeline.onChange( _this, smilElement );
749823
750824 // Get the clip full duration to build out the timeline selector
751825 smil.getBody().getClipAssetDuration( smilElement, function( clipDuration ) {
@@ -790,7 +864,7 @@
791865 _this.editableTypes['time'].update( _this, smilElement, 'dur', sliderToTime( ui.values[ 1 ]- ui.values[0] ) );
792866
793867 // update the widget display
794 - _this.editWidgets.trimTimeline.onChange( _this, smilElement, target);
 868+ _this.editWidgets.trimTimeline.onChange( _this, smilElement );
795869
796870 // Register the edit state for undo / redo
797871 _this.sequencer.getActionsEdit().registerEdit();
@@ -902,12 +976,14 @@
903977 )
904978 var $toolContainer = $toolsContainer.find( '#tooltab_' + toolId );
905979
906 - // Build out the attribute list for the given tool:
907 - for( var i=0; i < tool.editableAttributes.length ; i++ ){
908 - attributeName = tool.editableAttributes[i];
909 - $toolContainer.append(
910 - _this.getEditableAttribute( smilElement, toolId, attributeName )
911 - );
 980+ // Build out the attribute list for the given tool ( if the tool has directly editable attributes )
 981+ if( tool.editableAttributes ){
 982+ for( var i=0; i < tool.editableAttributes.length ; i++ ){
 983+ attributeName = tool.editableAttributes[i];
 984+ $toolContainer.append(
 985+ _this.getEditableAttribute( smilElement, toolId, attributeName )
 986+ );
 987+ }
912988 }
913989
914990 // Output a float divider:
@@ -1030,7 +1106,7 @@
10311107 'inputId' : _this.getEditToolInputId( toolId, updateKey ),
10321108 'inputSize': inputSize,
10331109 'initialValue' : initialValue,
1034 - 'inputChange': function(){
 1110+ 'change': function(){
10351111 // Run the editableType update function:
10361112 _this.editableTypes[ editType ].update(
10371113 _this,
@@ -1066,7 +1142,7 @@
10671143 .data('initialValue', config.initialValue )
10681144 .sequencerInput( _this.sequencer )
10691145 .val( config.initialValue )
1070 - .change( options.inputChange )
 1146+ .change( config.change )
10711147 );
10721148 }
10731149 }

Status & tagging log