Changeset 1815


Ignore:
Timestamp:
05/31/11 08:26:37 (2 years ago)
Author:
jeroen
Message:

fixed small issue with resizing selectbox. Documented small fix for bug that broke spans wrapping an entire caption.

Location:
plugins/captions/v5
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/captions/v5/doc/guide.html

    r1813 r1815  
    329329<li>Enhanced error handling. Instead of printing the error on screen, it is logged by the player. </li> 
    330330<li>Fixed an issue with too many line breaks in both MP4 and DFXP files.</li> 
     331<li>Fixed an issue that caused spans wrapping an entire caption to be ignored.</li> 
    331332</ul> 
    332333 
  • plugins/captions/v5/src/com/longtailvideo/plugins/captions/Captions.as

    r1813 r1815  
    330330        /** Resize this plugin */ 
    331331        public function resize(width:Number, height:Number):void { 
    332             _selector.resize(width,height); 
    333332            if(_player.config.fullscreen) { 
    334333                _renderer.x = width / 6; 
     
    346345                _renderer.y = height - 10; 
    347346            } 
     347            _selector.resize(width,height); 
    348348        }; 
    349349 
  • plugins/captions/v5/src/com/longtailvideo/plugins/captions/Selector.as

    r1813 r1815  
    7171        private function _downHandler():void { 
    7272            _offset++; 
    73             _redraw(false); 
     73            _redraw(); 
    7474        }; 
    7575 
     
    9090            } 
    9191            _options[_active].button.activate(true); 
    92             // Set a sane default offset. 
    93             if(_active < _max()) { 
    94                 _offset = 0; 
    95             } else if(_options.length > _max() && _active > _options.length - _max()) { 
    96                 _offset = _options.length - _max(); 
    97             } else {  
    98                 _offset = _active; 
    99             } 
    10092            // Redraw the menu. 
     93            _reoffset(); 
    10194            _redraw(); 
    10295        }; 
     
    10497 
    10598        /** Draw visible portion of the options. **/ 
    106         private function _redraw(show:Boolean=true):void { 
     99        private function _redraw():void { 
    107100            var button:SelectorButton; 
    108101            var height:Number = 0; 
     
    164157 
    165158 
     159        /** If scrolling, set offset such that active track is visible. **/ 
     160        private function _reoffset():void { 
     161            if(_active < _max()) { 
     162                _offset = 0; 
     163            } else if(_options.length > _max() && _active > _options.length - _max()) { 
     164                _offset = _options.length - _max(); 
     165            } else {  
     166                _offset = _active; 
     167            } 
     168        }; 
     169 
     170 
    166171        /** Resize the selector screen. **/ 
    167172        public function resize(width:Number,height:Number):void { 
     173            _back.height = height; 
    168174            _back.width = width; 
    169             _back.height = height; 
    170             if(_options) {  
     175            if(_options) { 
     176                _reoffset(); 
    171177                _redraw(); 
    172178            } 
     
    176182        /** The up button was clicked. **/ 
    177183        private function _upHandler():void { 
    178             _offset --; 
    179             _redraw(false); 
     184            _offset--; 
     185            _redraw(); 
    180186        }; 
    181187 
  • plugins/captions/v5/test/assets/corrie-styled.xml

    r1769 r1815  
    1212      <p begin="00:00:08" end="00:00:10" style="boldened">- Nothing is going on.</p> 
    1313      <p begin="00:00:10.5" end="00:00:12.5" style="yellow">You liar!</p> 
    14       <p begin="00:00:13.5" end="00:00:15" style="yellow"><span tts:fontSize="30">Are you?</span></p> 
     14      <p begin="00:00:13.5" end="00:00:15" style="yellow"><span tts:fontSize="30" tts:color="#FFCC00">Are you?</span></p> 
    1515      <p begin="00:00:17" end="00:00:20" style="bigger">Violet, please!<br/>- I am <span tts:fontSize="30">not</span> your babe!</p> 
    1616      <p begin="00:00:24" end="00:00:29" style="yellow"> 
Note: See TracChangeset for help on using the changeset viewer.