Commit Graph

25 Commits

Author SHA1 Message Date
Henrik Giesel
bae09a4743 Make first adjustment of size dimensions wait for setting of dimensions label 2021-09-06 21:15:37 +10:00
Henrik Giesel
5f1ed707ff Better algorithmus for minimum resize + prevent overflow of dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
2f94208381 Show custom dimensions again 2021-09-06 21:15:37 +10:00
Henrik Giesel
69f1c353df Implement new resizing algorithm
* resizes against the original parameters
2021-09-06 21:15:37 +10:00
Henrik Giesel
d3e46e9da4 Manage CSSStyleSheet from within SizeSelect where each image has one rule 2021-09-06 21:15:37 +10:00
Henrik Giesel
e581d593d3 Hide Float icons when width too small + Avoid too small resizing 2021-09-06 21:15:37 +10:00
Henrik Giesel
f379e18e6f 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
64a68743bd During resizing, make the smaller dimension decide the new dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
f9000de16c 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
b07c46f88f Add margin to other side of dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
5e80ef3562 Do not allow for resizing when in constrained mode 2021-09-06 21:15:37 +10:00
Henrik Giesel
4142fa2aa2 Don't show same dimensions twice if there are no custom dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
92ed342547 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
1472dc854c Deal with case where no style.{width,height} is set for size dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
be3aaa1519 Dispaly "actualHeight / actualWidth" even in constrained mode 2021-09-06 21:15:37 +10:00
Henrik Giesel
d22aa72964 Use ResizeObserver to resize overlay if necessary 2021-09-06 21:15:36 +10:00
Henrik Giesel
c6e56e0465 Better RTL support 2021-09-06 21:15:36 +10:00
Henrik Giesel
def2333605 Move selector / active logic up to ImageHandle 2021-09-06 21:15:36 +10:00
Henrik Giesel
a1df49b11e Implement Maximum image size mechanism 2021-09-06 21:15:36 +10:00
Henrik Giesel
f902e91ebd Allow SW resize 2021-09-06 21:15:36 +10:00
Henrik Giesel
b3c921b86c Bind to style properties instead of events 2021-09-06 21:15:36 +10:00
Henrik Giesel
8429d00081 Add functionality to set float of image 2021-09-06 21:15:36 +10:00
Henrik Giesel
49da806d91 Image resizes preserves ratio 2021-09-06 21:15:36 +10:00
Henrik Giesel
1756bca212 Add image-handle-dimensions to show dimensions directly on image 2021-09-06 21:15:36 +10:00
Henrik Giesel
0b06891771 First implementation of ImageHandle 2021-09-06 21:15:36 +10:00