mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:35:04 +08:00
Extend IDialogProps
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
2e295a94ed
commit
7bd7f704f9
@ -33,6 +33,7 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
|
|||||||
import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
|
import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||||
import { normalizeWheelEvent } from "../../../utils/Mouse";
|
import { normalizeWheelEvent } from "../../../utils/Mouse";
|
||||||
|
import { IDialogProps } from '../dialogs/IDialogProps';
|
||||||
|
|
||||||
// Max scale to keep gaps around the image
|
// Max scale to keep gaps around the image
|
||||||
const MAX_SCALE = 0.95;
|
const MAX_SCALE = 0.95;
|
||||||
@ -43,14 +44,13 @@ const ZOOM_COEFFICIENT = 0.0025;
|
|||||||
// If we have moved only this much we can zoom
|
// If we have moved only this much we can zoom
|
||||||
const ZOOM_DISTANCE = 10;
|
const ZOOM_DISTANCE = 10;
|
||||||
|
|
||||||
interface IProps {
|
interface IProps extends IDialogProps {
|
||||||
src: string; // the source of the image being displayed
|
src: string; // the source of the image being displayed
|
||||||
name?: string; // the main title ('name') for the image
|
name?: string; // the main title ('name') for the image
|
||||||
link?: string; // the link (if any) applied to the name of the image
|
link?: string; // the link (if any) applied to the name of the image
|
||||||
width?: number; // width of the image src in pixels
|
width?: number; // width of the image src in pixels
|
||||||
height?: number; // height of the image src in pixels
|
height?: number; // height of the image src in pixels
|
||||||
fileSize?: number; // size of the image src in bytes
|
fileSize?: number; // size of the image src in bytes
|
||||||
onFinished?(): void; // callback when the lightbox is dismissed
|
|
||||||
|
|
||||||
// the event (if any) that the Image is displaying. Used for event-specific stuff like
|
// the event (if any) that the Image is displaying. Used for event-specific stuff like
|
||||||
// redactions, senders, timestamps etc. Other descriptors are taken from the explicit
|
// redactions, senders, timestamps etc. Other descriptors are taken from the explicit
|
||||||
|
Loading…
Reference in New Issue
Block a user