Skip to content

Commit

Permalink
fix(Trimmer): Fixed currentTime tracker position
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahen Hovhannisyan committed Jun 9, 2017
1 parent 1303a46 commit bd04819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ - (void)updateBorderFrames
}

- (void)handleTrackerPan: (UIGestureRecognizer *) recognizer {
NSLog(@"Test");
CGPoint point = [self.panGestureRecognizer locationInView:self.trackerView];

CGRect trackerFrame = self.trackerView.frame;
Expand Down Expand Up @@ -326,10 +325,10 @@ - (void)moveRightOverlayView:(UIPanGestureRecognizer *)gesture

- (void)seekToTime:(CGFloat) time
{
CGFloat posToMove = time * self.widthPerSecond + self.thumbWidth - self.scrollView.contentOffset.x;
CGFloat posToMove = time * self.widthPerSecond + self.thumbWidth - self.scrollView.contentOffset.x - self.trackerHandleHeight;

CGRect trackerFrame = self.trackerView.frame;
trackerFrame.origin.x = posToMove - self.trackerHandleHeight / 2;
trackerFrame.origin.x = posToMove;
self.trackerView.frame = trackerFrame;

}
Expand Down
1 change: 0 additions & 1 deletion ios/RNVideoProcessing/RNTrimmerView/RNTrimmerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ class RNTrimmerView: RCTView, ICGVideoTrimmerDelegate {
trimmerView!.showTrackerHandle = self._showTrackerHandle
trimmerView!.maxLength = _maxLength == nil ? CGFloat(self.asset.duration.seconds) : _maxLength!
self.frame = CGRect(x: rect.origin.x, y: rect.origin.y, width: rect.size.width, height: rect.size.height + 20)
self.backgroundColor = UIColor.blue
if _minLength != nil {
trimmerView!.minLength = _minLength!
}
Expand Down

0 comments on commit bd04819

Please sign in to comment.