Skip to content

fixed initial position #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/ActionSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ const ACTION_SHEET_OPENED: string = 'opened';
const ACTION_SHEET_CLOSING: string = 'closing';
const ACTION_SHEET_CLOSED: string = 'closed';

const DEFAULT_ANIMATION_DURATION: number = 180;
// screen height
const WINDOW_HEIGHT = Dimensions.get('window').height;
const WINDOW_HEIGHT_HALF = WINDOW_HEIGHT / 2;

const DEFAULT_ANIMATION_DURATION: number = WINDOW_HEIGHT_HALF;

// action sheet positions
const INITIAL_POSITION_BOTTOM: number = -180;
const INITIAL_POSITION_BOTTOM: number = -WINDOW_HEIGHT_HALF;
const INITIAL_POSITION_TOP: number = 0;
const TO_POSITION_BOTTOM: number = 180;
const TO_POSITION_TOP: number = -360;
const TO_POSITION_BOTTOM: number = WINDOW_HEIGHT_HALF;
const TO_POSITION_TOP: number = -WINDOW_HEIGHT;

// events
const HARDWARE_BACK_PRESS_EVENT: string = 'hardwareBackPress';
Expand Down