magnifier: init fix
This commit is contained in:
parent
d11bd21d89
commit
e2e0ee706f
1 changed files with 2 additions and 2 deletions
|
@ -111,7 +111,7 @@ class ScaleBoundaries extends Equatable {
|
|||
final viewportWidth = _transformedViewportSize.width;
|
||||
|
||||
final positionX = basePosition.x;
|
||||
final widthDiff = computedWidth - viewportWidth;
|
||||
final widthDiff = max(0, computedWidth - viewportWidth);
|
||||
|
||||
final minX = ((positionX - 1).abs() / 2) * widthDiff * -1;
|
||||
final maxX = ((positionX + 1).abs() / 2) * widthDiff;
|
||||
|
@ -123,7 +123,7 @@ class ScaleBoundaries extends Equatable {
|
|||
final viewportHeight = _transformedViewportSize.height;
|
||||
|
||||
final positionY = basePosition.y;
|
||||
final heightDiff = computedHeight - viewportHeight;
|
||||
final heightDiff = max(0, computedHeight - viewportHeight);
|
||||
|
||||
final minY = ((positionY - 1).abs() / 2) * heightDiff * -1;
|
||||
final maxY = ((positionY + 1).abs() / 2) * heightDiff;
|
||||
|
|
Loading…
Reference in a new issue