Commit b75876e3 by Valera Rozuvan Committed by Vasyl Nakvasiuk

As per PR comments from reviewer, fixing coding style.

parent cfb9a54e
...@@ -269,9 +269,11 @@ describe 'VideoCaptionAlpha', -> ...@@ -269,9 +269,11 @@ describe 'VideoCaptionAlpha', ->
expect(parseInt($('.subtitles').css('maxHeight'))).toBeCloseTo $('.video-wrapper').height(), 2 expect(parseInt($('.subtitles').css('maxHeight'))).toBeCloseTo $('.video-wrapper').height(), 2
it 'set the height of caption spacing', -> it 'set the height of caption spacing', ->
expect(Math.abs(parseInt($('.subtitles .spacing:first').css('height')) - @caption.topSpacingHeight())).toBeLessThan 1 firstSpacing = Math.abs(parseInt($('.subtitles .spacing:first').css('height')))
expect(Math.abs(parseInt($('.subtitles .spacing:last').css('height')) - @caption.bottomSpacingHeight())).toBeLessThan 1 lastSpacing = Math.abs(parseInt($('.subtitles .spacing:last').css('height')))
expect(firstSpacing - @caption.topSpacingHeight()).toBeLessThan 1
expect(lastSpacing - @caption.bottomSpacingHeight()).toBeLessThan 1
it 'scroll caption to new position', -> it 'scroll caption to new position', ->
expect($.fn.scrollTo).toHaveBeenCalled() expect($.fn.scrollTo).toHaveBeenCalled()
...@@ -308,8 +310,10 @@ describe 'VideoCaptionAlpha', -> ...@@ -308,8 +310,10 @@ describe 'VideoCaptionAlpha', ->
@caption.scrollCaption() @caption.scrollCaption()
it 'scroll to current caption', -> it 'scroll to current caption', ->
offset = -0.5 * ($('.video-wrapper').height() - $('.subtitles .current:first').height())
expect($.fn.scrollTo).toHaveBeenCalledWith $('.subtitles .current:first', @caption.el), expect($.fn.scrollTo).toHaveBeenCalledWith $('.subtitles .current:first', @caption.el),
offset: - ($('.video-wrapper').height() / 2 - $('.subtitles .current:first').height() / 2) offset: offset
describe 'seekPlayer', -> describe 'seekPlayer', ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment