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

Override other transform options on the content HTML element #103

Open
AlbinIbraimi opened this issue Sep 12, 2024 · 0 comments
Open

Override other transform options on the content HTML element #103

AlbinIbraimi opened this issue Sep 12, 2024 · 0 comments

Comments

@AlbinIbraimi
Copy link

The dragscroll is not working as expected if we apply other transform CSS rules to the content.

Example:

I have an Image that I want to show in the viewport, but also I have option to zoom in/out in the image by applying scaling

var img = document.getElementById('.example1-content');
img.style.transform += `scale(${this.scaleFactor})`;

After this is applied, we can see that the image will scale up/down, but in the moment when I want to move the image by dragging, the scale is removed and the image gets back to original state.

It will be nice if you can only replace the new value of the transform translate() property instead of erasing all other properties in the translate.

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

No branches or pull requests

1 participant