-
Notifications
You must be signed in to change notification settings - Fork 131
Update track-container.js #1684
base: master
Are you sure you want to change the base?
Conversation
When you resize a video track in the track-container area making it shorter/longer from the left side there is a bug. It is not possible to shorten a video track from the beginning it always does from the end.The same thing happens when you try to make it longer. Now it is possible to shorten/lengthen the video from both sides : if (trackEvent.popcornOptions.start - newStart > 0 ) sign=sign*(-1); popcornOptions.from = Math.abs( Math.abs(trackEvent.popcornOptions.start - (trackEventView.element.offsetLeft / _container.clientWidth * _media.duration)) + (trackEvent.popcornOptions.from*sign) );
Hm, I see your point, but for better or for worse the current functionality was intended. Not sure where I stand yet, but I'm going to play around with your patch, see how it feels, and then get others to take a look. |
Trying your patch, there might be some bugs. If I add a clip starting from the beginning, and change the left drag handle to be in the middle, then seek to just before the left drag handle, the clip should be off, but it is still on. Also makes non media clip track events, like text, do similar things. |
HI ScottDowne , First of all thanks for your quick answer. You can find enclosed the video of the test I carried out: http://www.vicomtech.org/ On Thu, Oct 17, 2013 at 9:07 AM, Iñigo Tamayo [email protected] wrote:
|
I think I see why it's not working for me. I get a sign is undefined error while in chrome. I also noticed something... unfortunate, and it's not your fault. We forked the butter repo and do all our work in https://github.com/mozilla/popcorn.webmaker.org Might be why when I apply your patch, I start getting errors. |
Sorry I forgot to initialized sign variable, var sign=1; must be before if statement thanks for you attention http://www.vicomtech.org/ On Thu, Oct 17, 2013 at 4:29 PM, ScottDowne [email protected]:
|
Cool, working now. |
When you resize a video track in the track-container area making it shorter/longer from the left side there is a bug. It is not possible to shorten a video track from the beginning it always does from the end.The same thing happens when you try to make it longer.
Now it is possible to shorten/lengthen the video from both sides :
if (trackEvent.popcornOptions.start - newStart > 0 ) sign=sign_(-1);
popcornOptions.from = Math.abs(
Math.abs(trackEvent.popcornOptions.start - (trackEventView.element.offsetLeft / _container.clientWidth * _media.duration))
+ (trackEvent.popcornOptions.from_sign)
);