Open knutesears opened 3 years ago
I think this issue is related to #492 , which has a PR that was merged but unfortunately it doesn't release yet.
This project was somehow abandoned, you may want to use the latest code on master
branch to have the latest update.
Hope this help. 🍻
So, I found a workaround. I listen for the mirror:move event, grab the relevant data from the event object, cancel the event, and then perform basically the same logic that the Draggable library would have used to move the mirror. The difference is that I can change the mirror offset before doing the translate3d transform.
If the library could be made to check if the offset had changed in the mirror options before doing the translate calculation -- rather than having looked at it only once and saved the initial value -- then I wouldn't have to do this. Would it be performance cost prohibitive to have it grab a fresh copy of the offset value each time? I'm sure there are other ways to modify it to do what I want, as well, but this one seems simple.
Anyway, thanks for pointing me at the other related issue, which jogged my brain.
Hi. Feature request here, or at least hope for a hack/workaround.
I have a mirror element that is resized (by my code, not the library). This happens when it moves over certain new containers, and then the offset of the mirror from the cursor is no longer proportional to the mirror size, i.e. the mirror is no longer where I want it relative to the cursor. I have been trying to figure out some hack to let me override or otherwise affect the transform: translate3d action that happens inside the library. It seems that once the mirror options cursorOffsetX and cursorOffsetY are set, there is no way to update them in a manner that affects the already created mirror element. I've tried nesting a wrapper div in there with its own transform: translate function, and many other things. Any bright ideas on a trick I'm missing? If not, consider this a request for a way to change the mirror offset whilst the mirror is moving around.
Thanks.