Skip to content

Conversation

@kmader
Copy link
Collaborator

@kmader kmader commented Sep 6, 2018

adding hammerjs to dependencies
adding hammer to cornerstoneTools dependencies
@codecov-io
Copy link

codecov-io commented Sep 6, 2018

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #3   +/-   ##
=======================================
  Coverage   97.05%   97.05%           
=======================================
  Files           3        3           
  Lines          34       34           
=======================================
  Hits           33       33           
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d52b49c...74f6827. Read the comment docs.

@kmader kmader changed the title adding mobile touch support [WIP]adding mobile touch support this is a bit messier than it looks Sep 6, 2018
@kmader
Copy link
Collaborator Author

kmader commented Sep 6, 2018

The other issues are to then replace and complement current tools with manually selected ones. It probably makes more sense to have a cornerstone and cornerstone mobile widget?
https://github.com/cornerstonejs/cornerstoneTools/blob/master/examples/alltouchtools/index.html

var configuration = {
        testPointers: function(eventData) {
            return (eventData.numPointers >= 3);
        }
    };
    cornerstoneTools.panMultiTouch.setConfiguration(configuration);
    cornerstone.loadImage(imageIds[0]).then(function(image) {
        cornerstone.displayImage(element, image);
        // Set the stack as tool state
        cornerstoneTools.addStackStateManager(element, ['stack']);
        cornerstoneTools.addToolState(element, 'stack', stack);
        cornerstoneTools.touchInput.enable(element);
      
        // Enable all tools we want to use with this element
        cornerstoneTools.zoomTouchPinch.activate(element);
        //cornerstoneTools.rotateTouch.activate(element);
        cornerstoneTools.wwwcTouchDrag.activate(element);
        cornerstoneTools.panMultiTouch.activate(element);
        // helper function used by the tool button handlers to disable the active tool
        // before making a new tool active
        function disableAllTools() {
            cornerstoneTools.panTouchDrag.deactivate(element);
            cornerstoneTools.rotateTouchDrag.deactivate(element);
            cornerstoneTools.rotateTouch.disable(element);
            cornerstoneTools.ellipticalRoiTouch.deactivate(element);
            cornerstoneTools.angleTouch.deactivate(element);
            cornerstoneTools.rectangleRoiTouch.deactivate(element);
            cornerstoneTools.lengthTouch.deactivate(element);
            cornerstoneTools.probeTouch.deactivate(element);
            cornerstoneTools.zoomTouchDrag.deactivate(element);
            cornerstoneTools.wwwcTouchDrag.deactivate(element);
            cornerstoneTools.stackScrollTouchDrag.deactivate(element);
        }

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

Successfully merging this pull request may close these issues.

3 participants