Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add zoom right to left support #665

Open
RedPlugDesign opened this issue Sep 27, 2022 · 6 comments
Open

feat: add zoom right to left support #665

RedPlugDesign opened this issue Sep 27, 2022 · 6 comments

Comments

@RedPlugDesign
Copy link

@paulstraw I have an issue with right to left language and my current set up. I believe it is from how the code calculates the 'right' positioning of the image, but I cannot verify.

Examples:

The default Javascript is used, and the only parameters are:
new Drift(e, { paneContainer: e.closest('.drift'), inlinePane: 1 });

CSS is fairly standard, and I have tried the default CSS & current JS also:
`.drift-zoom-pane.drift-inline {
position: absolute;
width: 150px;
height: 150px;
border-radius: 75px;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.drift-zoom-pane.drift-open {
background: var(--white);
}
.drift-zoom-pane.drift-open.drift-loading {
background: none;
}

.drift-loading .drift-zoom-pane-loader {
background: rgba(255, 255, 255, 0.75);
content: '';
display: block;
height: 100%;
position: absolute;
right: 0;
top: 0;
width: 100%;
z-index: 999;
}

.drift-zoom-pane-loader:after {
content: '';
animation: loader-rotate 1s linear infinite;
background: transparent;
border: 2px solid var(--button_color_25);
border-bottom-color: var(--button_color);
border-radius: 50%;
@include border-box();
height: calc(var(--master_spacing) * 2.5);
left: 50%;
margin-left: calc(-1 * var(--master_spacing) * 1.25);
margin-top: calc(-1 * var(--master_spacing) * 1.25);
opacity: 0.75;

filter: alpha(opacity=75);
padding: 0;
position: absolute;
top: 50%;
width: calc(var(--master_spacing) * 2.5);
z-index: 999;
}`

Most demo's use the separate window, and I havent been able to set up a proper RTL test. Has this been seen before or are there any suggestions?

@luqven
Copy link
Contributor

luqven commented Sep 27, 2022

Hey @RedPlugDesign 👋🏼

Thanks for opening this issue! While I can't give you a time estimate, we'll look into this and get back to you.

In the meantime, any additional context about how the example "Default (LTR)" you provided differs from the "RTL" would be useful; IE are there any significant CSS/JS changes other than float: left vs float: right between the two implementations?

@RedPlugDesign
Copy link
Author

Mainly just the floats, padding and text alignment. Aside from the column container, nothing specifically applied to the images or zoom container

@luqven
Copy link
Contributor

luqven commented Oct 3, 2022

Hey @RedPlugDesign,

I wanted to let you know that we had a chance to discuss this as a team and determined that we don't currently have the bandwidth to tackle RTL support right now. I'll leave this ticket open and we'll come back to it when we've had a chance to clear our backlog.

In the meantime, if anyone else would like to see support for this feature comment or react to this post. This will help us prioritize this task moving forward.

@luqven luqven changed the title Zoom & RTL feat: add zoom right to left support Oct 3, 2022
@RedPlugDesign
Copy link
Author

Disappointing, but understandable.

@Fisujon
Copy link

Fisujon commented Jul 10, 2023

@RedPlugDesign,

To enable RTL support for external zoom, simply include the following code.

/rtl:ignore/
.rtl {
.drift-zoom-pane {
img {
left: 0;
}
}
}

@RedPlugDesign
Copy link
Author

RedPlugDesign commented Jul 12, 2023

Thanks for the follow-up, but this is not working for me. I am using the trl class in <body>, but this had no affect. Oddly enough, I cannot apply any styles to that image. Example, I tried to change the opacity for something obvious and it had to affect. I am using 1.4.1, but added the latest and tested with no affect.

I also tried this on the Demo CodePen with no results.

Is there a way to force the drift-zoom-pane div to always be present in order to troubleshoot this easier?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants