@@ -75,6 +75,7 @@ private void UpdateImageLayoutWithViewport(Rect viewport, Rect viewportImageRect
75
75
var endPoint = GetSafePoint ( _restrictedSelectRect , new Point (
76
76
selectedRect . X + selectedRect . Width ,
77
77
selectedRect . Y + selectedRect . Height ) ) ;
78
+
78
79
if ( animate )
79
80
{
80
81
AnimateUIElementOffset ( new Point ( _imageTransform . TranslateX , _imageTransform . TranslateY ) , _animationDuration , _sourceImage ) ;
@@ -87,7 +88,8 @@ private void UpdateImageLayoutWithViewport(Rect viewport, Rect viewportImageRect
87
88
targetVisual . Scale = new Vector3 ( ( float ) imageScale ) ;
88
89
}
89
90
90
- UpdateSelectedRect ( startPoint , endPoint , animate ) ;
91
+ UpdateSelectionThumbs ( startPoint , endPoint , animate ) ;
92
+ UpdateMaskArea ( animate ) ;
91
93
}
92
94
93
95
/// <summary>
@@ -277,17 +279,18 @@ private void UpdateCroppedRect(ThumbPosition position, Point diffPos)
277
279
}
278
280
else
279
281
{
280
- UpdateSelectedRect ( startPoint , endPoint ) ;
282
+ UpdateSelectionThumbs ( startPoint , endPoint ) ;
283
+ UpdateMaskArea ( ) ;
281
284
}
282
285
}
283
286
284
287
/// <summary>
285
- /// Update selection area .
288
+ /// Positions the thumbs for the selection rectangle .
286
289
/// </summary>
287
290
/// <param name="startPoint">The point on the upper left corner.</param>
288
291
/// <param name="endPoint">The point on the lower right corner.</param>
289
292
/// <param name="animate">Whether animation is enabled.</param>
290
- private void UpdateSelectedRect ( Point startPoint , Point endPoint , bool animate = false )
293
+ private void UpdateSelectionThumbs ( Point startPoint , Point endPoint , bool animate = false )
291
294
{
292
295
_startX = startPoint . X ;
293
296
_startY = startPoint . Y ;
@@ -417,8 +420,6 @@ private void UpdateSelectedRect(Point startPoint, Point endPoint, bool animate =
417
420
{
418
421
storyboard . Begin ( ) ;
419
422
}
420
-
421
- UpdateMaskArea ( animate ) ;
422
423
}
423
424
424
425
/// <summary>
0 commit comments