-
Notifications
You must be signed in to change notification settings - Fork 456
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
zoomTouchPinch problems after switching images #109
Comments
Hmm yeah definitely sounds like a bug. Strange because pinch input handling is quite simple.. I'll look into it. You shouldn't need to disable and re-enable the element just to switch images. |
Hi Erik!, great to know this can be a bug, hopefully you can help me find a workaround/fix. I know disabling/enabling the element shouldn't be needed, but before switching the images I have to hide the element's canvas with display:none, then, when set display:inline-block again the only way I found to display the element is disable/enable. Do you know a way to clear the canvas without display:none?. |
What about using visibility or opacity in CSS instead of display? |
Thanks that allowed me to remove disable/enable. I had to add cornerstone.resize(element, true) after displayImage because if not, the image was displayed very tiny, BTW, this doesn't solve the zoomTouchPinch tool problem. |
I can't seem to reproduce this bug. My code is here: https://gist.github.com/swederik/8a416ad61dea2fcf9deb Could you tell me if there anything you're doing that I'm not or vice versa? |
Thanks to your example I found the problem, I was calling cornerstoneTools.touchInput.enable(element) inside loadAndCacheImage and you call it just after cornerstone.enable only once. Fixed!. |
Great! We actually had this same issue before for mouseInput (See #89), so now I've gone and made the same type of change for touch input so this type of bug doesn't occur anymore. Thanks for the report. |
After trying for hours to make this work I post this here because maybe its a bug.
I have only one element to display images with the zoomTouchPinch tool attached. There are two images to be loaded there, one with cornerstoneWebImageLoader, the other with cornerstoneWADOImageLoader.
When I load the first image (it doesn't matter the order, it can be Web or WADO), it works as expected (expand fingers zoom in, contract fingers zoom out), then I switch (*) the image and zoomTouchPinch goes crazy allways zoomming out. It looks like this tool is not "reseted" properly before attaching to the new image.
*: The switching process follows these steps inside loadAndCacheImage:
I've tried zoomTouchPinch.disable(element) before activate, but it doesn't fix the issue.
The text was updated successfully, but these errors were encountered: