Šimon Brandner
bb643010a9
Remove title
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-17 08:10:34 +02:00
Šimon Brandner
acd37d2aad
Merge remote-tracking branch 'upstream/develop' into compact-reply-rendering
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-14 16:53:05 +02:00
Šimon Brandner
46e1fdf442
Reorder buttons
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-13 20:28:49 +02:00
Šimon Brandner
7bd7f704f9
Extend IDialogProps
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-13 08:20:17 +02:00
Šimon Brandner
2e295a94ed
Don't export IProps
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-13 08:17:51 +02:00
Šimon Brandner
b7af39ffff
Merge remote-tracking branch 'upstream/develop' into compact-reply-rendering
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-08 17:17:34 +02:00
Šimon Brandner
38a061a2df
Fix ImageView context menu
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-06 20:59:12 +02:00
Robin Townsend
055f3a72ad
Fix being able to un-rotate images
...
Since 0 is falsy, this made it impossible to return images to 0 degrees
of rotation.
Signed-off-by: Robin Townsend <robin@robin.town>
2021-07-03 15:18:47 -04:00
Šimon Brandner
38710eab88
Export IProps
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-02 13:31:56 +02:00
David Baker
80f5232217
Comply with new member-delimiter-style rule
...
Just `eslint --fix` with rule from
https://github.com/matrix-org/eslint-plugin-matrix-org/pull/9 in place
2021-07-01 23:23:03 +01:00
J. Ryan Stinnett
ae0a8b8da4
Auto-fix lint errors
2021-06-29 13:11:58 +01:00
Michael Telatynski
6d80cd5913
Merge pull request #6149 from SimonBrandner/fix/jumps-image-view
2021-06-07 15:19:45 +01:00
Šimon Brandner
20a3dd67d6
Some more styling
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-07 16:12:06 +02:00
Šimon Brandner
255f996710
landscape -> imageIsNotFlipped
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-07 15:46:03 +02:00
Šimon Brandner
b5d271759f
Why would I format this myself if eslint can do it for me?
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-07 15:43:43 +02:00
Šimon Brandner
2e47a1176f
Get rid of weird rotation prop
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-07 15:39:11 +02:00
Šimon Brandner
0918ebad0a
calculateZoomAndRotate -> setZoomAndRotation
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-07 15:28:37 +02:00
Šimon Brandner
5880cb3b5f
Better wording
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-07 15:26:54 +02:00
Šimon Brandner
67c9fe1e07
Revert "Update curly braces styling"
...
This reverts commit ba0f6766ca
.
2021-06-07 15:25:57 +02:00
Šimon Brandner
ba0f6766ca
Update curly braces styling
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-06 09:02:30 +02:00
Šimon Brandner
c3fdd73357
Avoid multiple setState() calls
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-06 08:56:12 +02:00
Šimon Brandner
28be581af1
Take image rotation into account when zooming
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-06 08:51:07 +02:00
Šimon Brandner
c0964b69b7
Remove redundant vars
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-06 08:14:43 +02:00
Šimon Brandner
1c8e341143
Reset all translation vars
...
Not doing this would result in jumps because everything would get out of sync
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-06 08:09:41 +02:00
Robin Townsend
17edfec3aa
Make it easier to pan images in the lightbox
...
Previously, if you were dragging an image and your cursor outpaced the
edge of the image as it was moving, panning would abruptly stop. This
moves a few of the lightbox event listeners one level up to the image
wrapper to ensure that all drag movements are detected, even if they
don't end over the image's current position.
Signed-off-by: Robin Townsend <robin@robin.town>
2021-06-05 21:08:44 -04:00
Travis Ralston
6df079a5bd
Merge pull request #6033 from matrix-org/travis/rel-imageview
...
Add missing 'rel' to image view download button
2021-05-14 08:12:11 -06:00
Jaiwanth
26dd6d5510
Swap rotate left and right buttons
...
Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
2021-05-14 08:26:29 +05:30
Travis Ralston
b9f775d969
Add missing 'rel' to image view download button
...
We're supposed to have this on every link off-site.
2021-05-13 20:55:14 -06:00
Šimon Brandner
7ad270928a
Simplifie code a bit
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-05-06 16:41:09 +02:00
Šimon Brandner
bb9803a94e
Don't try to use the event's metadata to calc the scale
...
That has lead to https://github.com/vector-im/element-web/issues/17184
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-05-06 16:40:33 +02:00
Jaiwanth
3eea1b8369
Add cleanup functions for image view
2021-05-04 16:42:22 +05:30
Šimon Brandner
1fcad1a634
Show zoom buttons only if zooming is enabled
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-26 15:47:58 +02:00
Šimon Brandner
53e8b5e6af
Merge branch 'image-view-zoom' of https://github.com/SimonBrandner/matrix-react-sdk into image-view-zoom
2021-04-26 15:01:47 +02:00
Šimon Brandner
3547d1f93b
Change cursor to default
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-26 15:01:06 +02:00
Šimon Brandner
e374fcfe91
Fix spelling
2021-04-26 13:49:29 +02:00
Šimon Brandner
dbca370497
Try to precalculate the zoom from width and height props
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-26 13:48:14 +02:00
Šimon Brandner
b741b3112a
If the image is small don't scale
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-26 13:47:06 +02:00
Šimon Brandner
33107a1f47
Fall back to natural height and width
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-26 13:30:14 +02:00
Šimon Brandner
c1a4204ad3
Use a ref instead of that ugly thing
...
Sometimes I do really weird things and don't know why :D
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-26 13:11:41 +02:00
Šimon Brandner
0e312977e3
Rework zooming
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 10:36:53 +02:00
Šimon Brandner
90f2423eb7
Fix zoom step and coeficient
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 10:35:25 +02:00
Šimon Brandner
bcc6e5c5d5
Add some comments
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 09:41:46 +02:00
Šimon Brandner
9b7a9fc865
Use MAX_SCALE for maxZoom
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 09:24:25 +02:00
Šimon Brandner
dcc060f6f7
Use correct cursor when we can't zoom
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 09:00:15 +02:00
Šimon Brandner
e0e9ccbf95
Remove logline
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 08:38:13 +02:00
Šimon Brandner
57b34f8dbc
Get rid of onWindowResize()
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 08:37:51 +02:00
Šimon Brandner
f8af9831a9
Don't use percanteages
...
I was an idiot to use them in the first place
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 08:35:45 +02:00
Šimon Brandner
4523b8c7b8
Add dynamic maxZoom and wire it all up
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 08:32:28 +02:00
Šimon Brandner
dad7a22055
Initial code for dynamic minZoom
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-24 08:03:39 +02:00
Šimon Brandner
2e6397d8aa
Wire up normalizeWheelEvent()
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-22 14:56:35 +02:00