Commit c427965
crop: Improve click-and-drag crop selection
Second take of d5306ca because I noticed Sneakpeakcss didn't fully
implement click-and-drag crop selection exactly as in the original PR.
Previously, you had to click the first point before you can hold and
drag to crop.
This commit integrates po5's complex keybinds changes, allowing you to
start, select and submit the crop in a single hold-and-drag operation!
One of the roadblock to patching po5's PR directly was the condition
`or (crop_first_corner.x == corner_video.x and crop_first_corner.y ==
corner_video.y)`. It was causing errors due to a missing `corner_video`
variable, which was removed in occivink/mpv-scripts@af360f3. Thus, I've
partially restored the variable to fix this.
Note: Unlike Sneakpeakcss's version, click-and-drag and point-and-click
are mutually exclusive. You can't click to start the crop, then
hold-and-drag to select the area. It was unintuitive anyways.
Ref: occivink/mpv-scripts#621 parent d5306ca commit c427965
1 file changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| |||
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| 368 | + | |
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
378 | 385 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
| |||
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
542 | 549 | | |
543 | 550 | | |
544 | 551 | | |
| |||
577 | 584 | | |
578 | 585 | | |
579 | 586 | | |
580 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
581 | 599 | | |
582 | 600 | | |
583 | 601 | | |
| |||
0 commit comments