Update crosshairs UI and fix bug where you could scroll offscreen. (#2126)

* Update crosshairs UI and fix bug where you could scroll offscreen.

* Update tests for removed rotate tool.
This commit is contained in:
James Petts 2020-10-20 13:45:52 +01:00 committed by GitHub
parent d8714ea9c4
commit d627dee3b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 28 deletions

View File

@ -50,7 +50,7 @@
"dependencies": { "dependencies": {
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.5.5",
"lodash.throttle": "^4.1.1", "lodash.throttle": "^4.1.1",
"react-vtkjs-viewport": "^0.14.0" "react-vtkjs-viewport": "^0.14.1"
}, },
"devDependencies": { "devDependencies": {
"@ohif/core": "^2.10.7", "@ohif/core": "^2.10.7",

View File

@ -34,6 +34,7 @@ const definitions = [
commandName: 'resetMPRView', commandName: 'resetMPRView',
commandOptions: {}, commandOptions: {},
}, },
/*
{ {
id: 'Rotate', id: 'Rotate',
label: 'Rotate', label: 'Rotate',
@ -43,6 +44,7 @@ const definitions = [
commandName: 'enableRotateTool', commandName: 'enableRotateTool',
commandOptions: {}, commandOptions: {},
}, },
*/
/* /*
{ {
id: 'setBlendModeToComposite', id: 'setBlendModeToComposite',

View File

@ -36,9 +36,6 @@ describe('OHIF VTK Extension', () => {
cy.get('@wwwcBtn') cy.get('@wwwcBtn')
.should('be.visible') .should('be.visible')
.contains('WWWC'); .contains('WWWC');
cy.get('@rotateBtn')
.should('be.visible')
.contains('Rotate');
cy.get('@slabSlider') cy.get('@slabSlider')
.should('be.visible') .should('be.visible')
.contains('Slab Thickness'); .contains('Slab Thickness');
@ -90,23 +87,4 @@ describe('OHIF VTK Extension', () => {
); );
}); });
}); });
it('checks Rotate tool', () => {
cy.get('@rotateBtn').click();
// Click and Move the mouse inside the viewport
cy.get('[data-cy="viewport-container-0"]')
.trigger('mousedown', 'center', {
which: 1,
})
.trigger('mousemove', 'top', { which: 1 })
.trigger('mousedown', 'center', {
which: 1,
})
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup', { which: 1 });
//Take Screenshot
cy.screenshot('VTK Rotate tool - Should rotate image');
});
}); });

View File

@ -47,7 +47,6 @@ export function initVTKToolsAliases() {
cy.get('[data-cy="exit 2d mpr"]').as('exit2dmprBtn'); cy.get('[data-cy="exit 2d mpr"]').as('exit2dmprBtn');
cy.get('[data-cy="crosshairs"]').as('crosshairsBtn'); cy.get('[data-cy="crosshairs"]').as('crosshairsBtn');
cy.get('[data-cy="wwwc"]').as('wwwcBtn'); cy.get('[data-cy="wwwc"]').as('wwwcBtn');
cy.get('[data-cy="rotate"]').as('rotateBtn');
cy.get('.slab-thickness').as('slabSlider'); cy.get('.slab-thickness').as('slabSlider');
cy.get('.select-ohif').as('modeDropdown'); cy.get('.select-ohif').as('modeDropdown');
cy.get('.ohif-check-label').as('modeCheckbox'); cy.get('.ohif-check-label').as('modeCheckbox');

View File

@ -16061,10 +16061,10 @@ react-transition-group@^4.1.1:
loose-envify "^1.4.0" loose-envify "^1.4.0"
prop-types "^15.6.2" prop-types "^15.6.2"
react-vtkjs-viewport@^0.14.0: react-vtkjs-viewport@^0.14.1:
version "0.14.0" version "0.14.1"
resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.14.0.tgz#0bb4aeb02d4b32eb253ea1296e2032ade9772766" resolved "https://registry.yarnpkg.com/react-vtkjs-viewport/-/react-vtkjs-viewport-0.14.1.tgz#32ecdbbe0e61066d8cbaa211933184d3ebda6603"
integrity sha512-axKPSizH6y2P++33XPbV2mYF37EHMhp42e9TqPM9uxx0nQSXBe3HA5741z6CBGtbU7e2NT4ZBv9TduY86XetQw== integrity sha512-DAAF1yyEjq75BFYj/p/eO3/h6DiiGtEHJj/mbuk83LTgpcXlKNsYvQoh2oWWCyNVFo5hjBy8zlHUlRyKbu8GOg==
dependencies: dependencies:
date-fns "^2.2.1" date-fns "^2.2.1"
gl-matrix "^3.1.0" gl-matrix "^3.1.0"