Commit graph

8390 commits

Author SHA1 Message Date
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
Henrik Giesel
796037649a Better RTL support 2021-09-06 21:15:36 +10:00
Henrik Giesel
427a49e036 Adjust actual size tooltip 2021-09-06 21:15:36 +10:00
Henrik Giesel
9342d19504 Move selector / active logic up to ImageHandle 2021-09-06 21:15:36 +10:00
Henrik Giesel
47cd308251 Do not use width/height auto important to avoid enlarging smaller images 2021-09-06 21:15:36 +10:00
Henrik Giesel
7696a181f3 Implement Maximum image size mechanism 2021-09-06 21:15:36 +10:00
Henrik Giesel
a6b071d849 Add float tooltips 2021-09-06 21:15:36 +10:00
Henrik Giesel
5257a4db26 Allow SW resize 2021-09-06 21:15:36 +10:00
Henrik Giesel
5e91108a79 Bind to style properties instead of events 2021-09-06 21:15:36 +10:00
Henrik Giesel
b919b9cb7f Add functionality to set float of image 2021-09-06 21:15:36 +10:00
Henrik Giesel
2a81273115 Image resizes preserves ratio 2021-09-06 21:15:36 +10:00
Henrik Giesel
9b97320438 Add image-handle-dimensions to show dimensions directly on image 2021-09-06 21:15:36 +10:00
Henrik Giesel
53d1435aa7 First implementation of ImageHandle 2021-09-06 21:15:36 +10:00
Damien Elmes
3e5a2a92c7 Introduce editable-container
Contains the shadow root, and references to the styles.
Is ignorant of Editable.
Is necessary, so our we editable.scss does not need to contain
information about Codable, ImageHandle or all those other things which
have nothing to do with Editable
2021-09-06 21:15:36 +10:00
Damien Elmes
f07b72a708 Merge pull request #1332 from hgiesel/svelteexportcontext
Shorten CSS references for `@import` or `@use`
2021-09-06 21:10:27 +10:00
Damien Elmes
666f45ba01 Merge pull request #1356 from tatsumoto-ren/editor_will_process_mime
Add a hook for modifiying pasted MIME data
2021-09-06 21:03:37 +10:00
Damien Elmes
78242c9053 Merge pull request #1354 from hgiesel/preventoverwrite
Disallow setting, deleting or defining properties on packages
2021-09-06 20:57:37 +10:00
Damien Elmes
e8e0f9d08c update translations 2021-09-06 18:31:36 +10:00
Damien Elmes
53917b5032 add comment to segoe-ui string
https://forums.ankiweb.net/t/font-family-bug/12993/3
2021-09-06 18:29:26 +10:00