Override other transform options on the content HTML element
Opened this issue · 0 comments
AlbinIbraimi commented
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.