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

Mobile swipe stack scroll #14

Open
drsherifk opened this issue Dec 13, 2020 · 0 comments
Open

Mobile swipe stack scroll #14

drsherifk opened this issue Dec 13, 2020 · 0 comments

Comments

@drsherifk
Copy link

Thank you very much for this wonderful viewer,
I need to use in mobile, but i face some error;
Like;
Mobile stack scroll by swiping isn't functioning;
I tried modifying componentDidMount() function in DicomViewer.js file to apply swipe scroll
It scroll ok but but its enabled all the time.

componentDidMount() { //console.log('dicomviewer - componentDidMount: ') this.props.runTool(this) this.props.changeTool(this) cornerstone.events.addEventListener('cornerstoneimageloaded', this.onImageLoaded) const { dcmRef } = this.props dcmRef(this) this.layoutIndex = this.props.index var asd=this; document.getElementById(viewer-${this.props.index}).addEventListener("wheel", this.handlerMouseScroll) var elz = document.getElementById(viewer-${this.props.index}`);
var hammertime = Hammer(elz);
hammertime.get('swipe').set({ direction: Hammer.DIRECTION_ALL });
hammertime.on('swipe', function(ev) {
if(ev.direction===Hammer.DIRECTION_UP){
if (asd.shouldScroll) {
asd.props.listOpenFilesNextFrame();
}

    }else{
      if (asd.shouldScroll) { 
        asd.props.listOpenFilesPreviousFrame();
      }
    }  
  });


}`

Also choosing two vertical viewport "more suitable to mobile dimension" causes the upper toolbar to disappear.

And another question is there is a way to pass dicom files through url parameters like: ?url=""

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