chore(prettier): full repo linting and code reformatting once and for all (#3627)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-01 16:19:39 -04:00
1 parent 01500a2d4c
commit 9045ddaedc
656 files changed
+21737 -20628

No files matched your search

@@ -46,13 +46,7 @@ const EVENTS = {
* expose only the features/behaviors that are relevant to the application
*/
class ViewerManager extends PubSubService {
constructor(
viewer,
viewportId,
container,
studyInstanceUID,
seriesInstanceUID
) {
constructor(viewer, viewportId, container, studyInstanceUID, seriesInstanceUID) {
super(EVENTS);
this.viewer = viewer;
this.viewportId = viewportId;
@@ -119,18 +113,9 @@ class ViewerManager extends PubSubService {
*/
unregisterEvents() {
this.container.removeEventListener(ApiEvents.ROI_ADDED, this.onRoiAdded);
this.container.removeEventListener(
ApiEvents.ROI_MODIFIED,
this.onRoiModified
);
this.container.removeEventListener(
ApiEvents.ROI_REMOVED,
this.onRoiRemoved
);
this.container.removeEventListener(
ApiEvents.ROI_SELECTED,
this.onRoiSelected
);
this.container.removeEventListener(ApiEvents.ROI_MODIFIED, this.onRoiModified);
this.container.removeEventListener(ApiEvents.ROI_REMOVED, this.onRoiRemoved);
this.container.removeEventListener(ApiEvents.ROI_SELECTED, this.onRoiSelected);
}
/**
@@ -327,26 +312,16 @@ class ViewerManager extends PubSubService {
*/
activateInteractions(interactions) {
const interactionsMap = {
draw: activate =>
activate ? 'activateDrawInteraction' : 'deactivateDrawInteraction',
modify: activate =>
activate ? 'activateModifyInteraction' : 'deactivateModifyInteraction',
draw: activate => (activate ? 'activateDrawInteraction' : 'deactivateDrawInteraction'),
modify: activate => (activate ? 'activateModifyInteraction' : 'deactivateModifyInteraction'),
translate: activate =>
activate
? 'activateTranslateInteraction'
: 'deactivateTranslateInteraction',
snap: activate =>
activate ? 'activateSnapInteraction' : 'deactivateSnapInteraction',
activate ? 'activateTranslateInteraction' : 'deactivateTranslateInteraction',
snap: activate => (activate ? 'activateSnapInteraction' : 'deactivateSnapInteraction'),
dragPan: activate =>
activate
? 'activateDragPanInteraction'
: 'deactivateDragPanInteraction',
activate ? 'activateDragPanInteraction' : 'deactivateDragPanInteraction',
dragZoom: activate =>
activate
? 'activateDragZoomInteraction'
: 'deactivateDragZoomInteraction',
select: activate =>
activate ? 'activateSelectInteraction' : 'deactivateSelectInteraction',
activate ? 'activateDragZoomInteraction' : 'deactivateDragZoomInteraction',
select: activate => (activate ? 'activateSelectInteraction' : 'deactivateSelectInteraction'),
};
const availableInteractionsName = Object.keys(interactionsMap);
@@ -355,9 +330,7 @@ class ViewerManager extends PubSubService {
interaction => interaction[0] === availableInteractionName
);
if (!interaction) {
const deactivateInteractionMethod = interactionsMap[
availableInteractionName
](false);
const deactivateInteractionMethod = interactionsMap[availableInteractionName](false);
this.viewer[deactivateInteractionMethod]();
} else {
const [name, config] = interaction;