Updated logic to handle slanted zoom