Henrik Giesel
828cf80f68
Put sticky tooltip on icon, not label container
2021-09-07 14:33:15 +02:00
Henrik Giesel
26e9fa1c01
Prevent sticky bubbling and saveField before toggling sticky
2021-09-07 14:33:05 +02:00
Damien Elmes
d96b017d52
remove recursive symlink
...
https://github.com/ankitects/anki/pull/1332#issuecomment-913572914
2021-09-06 21:26:30 +10:00
Damien Elmes
cee556e6b1
Merge pull request #1307 from hgiesel/editablecontainer
...
Image Resizer + Maximum image size
2021-09-06 21:25:27 +10:00
Henrik Giesel
90dc1a0b40
Fix Float buttons in rtl
2021-09-06 21:15:37 +10:00
Henrik Giesel
803bf1b9d4
Fix ButtonDropdown disappearing when mouseupping on HandleBackground
2021-09-06 21:15:37 +10:00
Henrik Giesel
912fb0d94d
Fix Tab not moving caret to end
2021-09-06 21:15:37 +10:00
Henrik Giesel
57eb988068
Make clicking on labelcontainer move focus to field
2021-09-06 21:15:37 +10:00
Henrik Giesel
997e28384d
Decrease margin of the pin icon on the right
2021-09-06 21:15:37 +10:00
Henrik Giesel
b7ca721a2c
Have a uniform border-radius for buttons and fields
2021-09-06 21:15:37 +10:00
Henrik Giesel
212fd00405
Add a dashed border around pictures when image-editing
2021-09-06 21:15:37 +10:00
Henrik Giesel
63bc3f823b
Make focus highlight artificial and based on :focus-within
2021-09-06 21:15:37 +10:00
Henrik Giesel
b40f7ef262
Remove comma
2021-09-06 21:15:37 +10:00
Henrik Giesel
214b674cad
Prevent overflow of sizeDimensions or image handle buttons
2021-09-06 21:15:37 +10:00
Henrik Giesel
abf0eb1c16
Fix automatic positioning of ButtonDropdown after changing float property
2021-09-06 21:15:37 +10:00
Henrik Giesel
620f9cb765
Introduce WithImageConstrained
2021-09-06 21:15:37 +10:00
Henrik Giesel
732886ea7e
Parameterize overlay handle offsets
2021-09-06 21:15:37 +10:00
Henrik Giesel
02413acd88
Move more logic into HandleSelection
2021-09-06 21:15:37 +10:00
Henrik Giesel
b7d2791e92
Remove unused import tick
2021-09-06 21:15:37 +10:00
Henrik Giesel
ce8abfb1d0
Implement HandleLabel
2021-09-06 21:15:37 +10:00
Henrik Giesel
e59d02178c
Implement HandleBackground
2021-09-06 21:15:37 +10:00
Henrik Giesel
384bb70fd5
Remove unused nightMode from ImageHandle
2021-09-06 21:15:37 +10:00
Henrik Giesel
29d6d524d0
Introduce HandleControl
2021-09-06 21:15:37 +10:00
Henrik Giesel
fce34cafd9
Introduce HandleSelection.svelte
2021-09-06 21:15:37 +10:00
Henrik Giesel
b501326c89
Change SizeSelect.images back to const: no reactivity needed here
2021-09-06 21:15:37 +10:00
Henrik Giesel
598d3bfbc5
Also check for sizeSelect.includes
2021-09-06 21:15:37 +10:00
Henrik Giesel
76d56d73a7
Make images in SizeSelect variable again
2021-09-06 21:15:37 +10:00
Henrik Giesel
f7a99063a8
Only allow ImageHandle on valid pictures (determined in SizeSelect)
2021-09-06 21:15:37 +10:00
Henrik Giesel
299892c40f
Fix resetting image-handle-bg on no activeImage
2021-09-06 21:15:37 +10:00
Henrik Giesel
480138f8e3
Set max-width of images in the reviewer to 100%
2021-09-06 21:15:37 +10:00
Henrik Giesel
1c8d5d3fa7
Make first adjustment of size dimensions wait for setting of dimensions label
2021-09-06 21:15:37 +10:00
Henrik Giesel
55b63b9a45
Better algorithmus for minimum resize + prevent overflow of dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
62639f3108
Constrain with proportions in SizeSelect
2021-09-06 21:15:37 +10:00
Henrik Giesel
ac182473ac
Show custom dimensions again
2021-09-06 21:15:37 +10:00
Henrik Giesel
a7d117b6bc
Detect active status again
2021-09-06 21:15:37 +10:00
Henrik Giesel
027db43664
Implement new resizing algorithm
...
* resizes against the original parameters
2021-09-06 21:15:37 +10:00
Henrik Giesel
e2d345bfd2
Manage CSSStyleSheet from within SizeSelect where each image has one rule
2021-09-06 21:15:37 +10:00
Henrik Giesel
16a394fa7d
Hide Float icons when width too small + Avoid too small resizing
2021-09-06 21:15:37 +10:00
Henrik Giesel
ccc44d1632
Revert "During resizing, make the smaller dimension decide the new dimensions"
...
This reverts commit 5bad9a913ce7b4a4cc58106936203fddec37d6da.
The previous behavior was the one you can observe in most graphical editors:
The bigger dimension (width or height) will decide the size, not the smaller one.
2021-09-06 21:15:37 +10:00
Henrik Giesel
0ffa5030e5
During resizing, make the smaller dimension decide the new dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
a7fa217306
Reset height, so it defaults to "auto"
...
* This allows more flexible dynamic resizing for the image in the (p)reviewer
2021-09-06 21:15:37 +10:00
Henrik Giesel
3fe1180f39
Add margin to other side of dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
63fed87b48
Do not allow for resizing when in constrained mode
2021-09-06 21:15:37 +10:00
Henrik Giesel
c4f47be673
Don't show same dimensions twice if there are no custom dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
db558c869d
Change position of float buttons and dimension
...
* So we can show dimensions at lower image sizes
2021-09-06 21:15:37 +10:00
Henrik Giesel
fce63ed718
Deal with case where no style.{width,height} is set for size dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
460b6f33c9
Dispaly "actualHeight / actualWidth" even in constrained mode
2021-09-06 21:15:37 +10:00
Henrik Giesel
2a548f2ebd
Turn off no-explicit-warning for editing-area
2021-09-06 21:15:36 +10:00
Henrik Giesel
e8ec6b61a7
Use ResizeObserver to resize overlay if necessary
2021-09-06 21:15:36 +10:00
Henrik Giesel
2224d1c287
Reset image handle on keydown and blur
2021-09-06 21:15:36 +10:00