mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed image sliders appearance for square images
This commit is contained in:
parent
ad2c8dca80
commit
38fd09cfe1
4 changed files with 7 additions and 6 deletions
|
@ -12,7 +12,7 @@
|
|||
display: flex;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
top: -5px;
|
||||
top: -60px;
|
||||
border-radius: 24px;
|
||||
padding: 0 3px;
|
||||
// flex-wrap: wrap;
|
||||
|
|
|
@ -183,7 +183,7 @@ const NodeImageSlideBlock: FC<IProps> = ({
|
|||
setIsDragging(false);
|
||||
normalizeOffset();
|
||||
|
||||
if (+new Date() - drag_start < 300) {
|
||||
if (Math.abs(+new Date() - drag_start) < 200) {
|
||||
// click detection
|
||||
onOpenPhotoSwipe();
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
min-width: 0;
|
||||
transition: height 0.25s;
|
||||
border-radius: $radius;
|
||||
margin-right: -10px;
|
||||
margin-left: -10px;
|
||||
margin-right: -$gap / 2;
|
||||
margin-left: -$gap / 2;
|
||||
|
||||
.is_loading {
|
||||
.placeholder {
|
||||
|
@ -51,7 +51,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 10px;
|
||||
padding: 0 $gap / 2;
|
||||
|
||||
&:global(.is_active) {
|
||||
opacity: 1;
|
||||
|
|
|
@ -89,7 +89,8 @@ type INodeComponents = Record<
|
|||
>;
|
||||
|
||||
export const NODE_HEADS: INodeComponents = {
|
||||
[NODE_TYPES.IMAGE]: NodeImageBlock,
|
||||
// [NODE_TYPES.IMAGE]: NodeImageBlock,
|
||||
[NODE_TYPES.IMAGE]: NodeImageSlideBlock,
|
||||
};
|
||||
|
||||
export const NODE_COMPONENTS: INodeComponents = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue