Skip to content

Commit

Permalink
💫 Update: Exp - swift-programmatic-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 25, 2023
1 parent 88cca32 commit 6f1f220
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ class AdaptiveModalManager {
targetCoordMax: targetRect.maxY
);

let gestureInput = gestureInputInverted + offset;
let gestureInput = gesturePointInTargetRect.y + offset;

let rangeInputGesture: [CGFloat] = {
var range: [CGFloat] = [];

// range.append(targetRect.minY);
range += snapRects.reversed().map { $0.minY };
range.append(targetRect.maxY);
// range.append(targetRect.maxY);

return range;
}();
Expand All @@ -258,8 +258,8 @@ class AdaptiveModalManager {
var range: [CGFloat] = [];

// range.append(0);
range += snapRects.map { $0.height };
range.append(targetRect.height);
range += snapRects.reversed().map { $0.height };
// range.append(targetRect.height);

print(" - nextHeight rangeOutput: \(range)");

Expand All @@ -277,7 +277,7 @@ class AdaptiveModalManager {

// range.append(targetRect.width);
range += snapRects.map { $0.width };
range.append(targetRect.width);
// range.append(targetRect.width);

print(" - nextWidth rangeOutput: \(range)");

Expand All @@ -295,7 +295,7 @@ class AdaptiveModalManager {

// range.append(targetRect.minX);
range += snapRects.map { $0.minX };
range.append(targetRect.minX);
// range.append(targetRect.minX);

print(" - nextX rangeOutput: \(range)");

Expand All @@ -313,15 +313,15 @@ class AdaptiveModalManager {

// range.append(targetRect.minY);
range += snapRects.reversed().map { $0.minY };
range.append(targetRect.maxY);
// range.append(targetRect.maxY);

print(" - nextY rangeOutput: \(range)");

return range;
}()
)!;

let nextY = invertCoord(coord: _nextY, targetCoordMax: targetRect.maxY)
let nextY = _nextY;// invertCoord(coord: _nextY, targetCoordMax: targetRect.maxY)

print(" - nextY: \(nextY)");

Expand Down

0 comments on commit 6f1f220

Please sign in to comment.