@@ -258,45 +258,45 @@ Exif orientation values to correctly display the letter F:
258
258
// auto-oriented images
259
259
switch ( autoOrientation ) {
260
260
case 2 :
261
- // horizontal flip
261
+ // Horizontal flip
262
262
right = options . left
263
263
left = options . right
264
264
break
265
265
case 3 :
266
- // 180° rotate left
266
+ // 180° Rotate CCW
267
267
top = options . bottom
268
268
right = options . left
269
269
bottom = options . top
270
270
left = options . right
271
271
break
272
272
case 4 :
273
- // vertical flip
273
+ // Vertical flip
274
274
top = options . bottom
275
275
bottom = options . top
276
276
break
277
277
case 5 :
278
- // horizontal flip + 90° rotate left
278
+ // Horizontal flip + 90° Rotate CCW
279
279
top = options . left
280
280
right = options . bottom
281
281
bottom = options . right
282
282
left = options . top
283
283
break
284
284
case 6 :
285
- // 90° rotate left
285
+ // 90° Rotate CCW
286
286
top = options . left
287
287
right = options . top
288
288
bottom = options . right
289
289
left = options . bottom
290
290
break
291
291
case 7 :
292
- // vertical flip + 90° rotate left
292
+ // Vertical flip + 90° Rotate CCW
293
293
top = options . right
294
294
right = options . top
295
295
bottom = options . left
296
296
left = options . bottom
297
297
break
298
298
case 8 :
299
- // 90° rotate right
299
+ // 90° Rotate CW
300
300
top = options . right
301
301
right = options . bottom
302
302
bottom = options . left
@@ -320,45 +320,45 @@ Exif orientation values to correctly display the letter F:
320
320
// Account for defined browser orientation:
321
321
switch ( orientation ) {
322
322
case 2 :
323
- // horizontal flip
323
+ // Horizontal flip
324
324
newOptions . right = left
325
325
newOptions . left = right
326
326
break
327
327
case 3 :
328
- // 180° rotate left
328
+ // 180° Rotate CCW
329
329
newOptions . top = bottom
330
330
newOptions . right = left
331
331
newOptions . bottom = top
332
332
newOptions . left = right
333
333
break
334
334
case 4 :
335
- // vertical flip
335
+ // Vertical flip
336
336
newOptions . top = bottom
337
337
newOptions . bottom = top
338
338
break
339
339
case 5 :
340
- // vertical flip + 90° rotate right
340
+ // Vertical flip + 90° Rotate CW
341
341
newOptions . top = left
342
342
newOptions . right = bottom
343
343
newOptions . bottom = right
344
344
newOptions . left = top
345
345
break
346
346
case 6 :
347
- // 90° rotate right
347
+ // 90° Rotate CW
348
348
newOptions . top = right
349
349
newOptions . right = bottom
350
350
newOptions . bottom = left
351
351
newOptions . left = top
352
352
break
353
353
case 7 :
354
- // horizontal flip + 90° rotate right
354
+ // Horizontal flip + 90° Rotate CW
355
355
newOptions . top = right
356
356
newOptions . right = top
357
357
newOptions . bottom = left
358
358
newOptions . left = bottom
359
359
break
360
360
case 8 :
361
- // 90° rotate left
361
+ // 90° Rotate CCW
362
362
newOptions . top = left
363
363
newOptions . right = top
364
364
newOptions . bottom = right
@@ -398,38 +398,38 @@ Exif orientation values to correctly display the letter F:
398
398
// Reset automatic browser orientation:
399
399
switch ( autoOrientation ) {
400
400
case 2 :
401
- // horizontal flip
401
+ // Horizontal flip
402
402
ctx . translate ( sourceWidth , 0 )
403
403
ctx . scale ( - 1 , 1 )
404
404
break
405
405
case 3 :
406
- // 180° rotate left
406
+ // 180° Rotate CCW
407
407
ctx . translate ( sourceWidth , sourceHeight )
408
408
ctx . rotate ( Math . PI )
409
409
break
410
410
case 4 :
411
- // vertical flip
411
+ // Vertical flip
412
412
ctx . translate ( 0 , sourceHeight )
413
413
ctx . scale ( 1 , - 1 )
414
414
break
415
415
case 5 :
416
- // horizontal flip + 90° rotate left
416
+ // Horizontal flip + 90° Rotate CCW
417
417
ctx . rotate ( - 0.5 * Math . PI )
418
418
ctx . scale ( - 1 , 1 )
419
419
break
420
420
case 6 :
421
- // 90° rotate left
421
+ // 90° Rotate CCW
422
422
ctx . rotate ( - 0.5 * Math . PI )
423
423
ctx . translate ( - sourceWidth , 0 )
424
424
break
425
425
case 7 :
426
- // vertical flip + 90° rotate left
426
+ // Vertical flip + 90° Rotate CCW
427
427
ctx . rotate ( - 0.5 * Math . PI )
428
428
ctx . translate ( - sourceWidth , sourceHeight )
429
429
ctx . scale ( 1 , - 1 )
430
430
break
431
431
case 8 :
432
- // 90° rotate right
432
+ // 90° Rotate CW
433
433
ctx . rotate ( 0.5 * Math . PI )
434
434
ctx . translate ( 0 , - sourceHeight )
435
435
break
@@ -441,38 +441,38 @@ Exif orientation values to correctly display the letter F:
441
441
}
442
442
switch ( orientation ) {
443
443
case 2 :
444
- // horizontal flip
444
+ // Horizontal flip
445
445
ctx . translate ( width , 0 )
446
446
ctx . scale ( - 1 , 1 )
447
447
break
448
448
case 3 :
449
- // 180° rotate left
449
+ // 180° Rotate CCW
450
450
ctx . translate ( width , height )
451
451
ctx . rotate ( Math . PI )
452
452
break
453
453
case 4 :
454
- // vertical flip
454
+ // Vertical flip
455
455
ctx . translate ( 0 , height )
456
456
ctx . scale ( 1 , - 1 )
457
457
break
458
458
case 5 :
459
- // vertical flip + 90° rotate right
459
+ // Vertical flip + 90° Rotate CW
460
460
ctx . rotate ( 0.5 * Math . PI )
461
461
ctx . scale ( 1 , - 1 )
462
462
break
463
463
case 6 :
464
- // 90° rotate right
464
+ // 90° Rotate CW
465
465
ctx . rotate ( 0.5 * Math . PI )
466
466
ctx . translate ( 0 , - height )
467
467
break
468
468
case 7 :
469
- // horizontal flip + 90° rotate right
469
+ // Horizontal flip + 90° Rotate CW
470
470
ctx . rotate ( 0.5 * Math . PI )
471
471
ctx . translate ( width , - height )
472
472
ctx . scale ( - 1 , 1 )
473
473
break
474
474
case 8 :
475
- // 90° rotate left
475
+ // 90° Rotate CCW
476
476
ctx . rotate ( - 0.5 * Math . PI )
477
477
ctx . translate ( - width , 0 )
478
478
break
0 commit comments