diff --git a/client/client/app/components/ngbPathways/ngbCytoscapePathway/ngbCytoscapePathway.controller.js b/client/client/app/components/ngbPathways/ngbCytoscapePathway/ngbCytoscapePathway.controller.js index 3618085a2..e9450fa78 100644 --- a/client/client/app/components/ngbPathways/ngbCytoscapePathway/ngbCytoscapePathway.controller.js +++ b/client/client/app/components/ngbPathways/ngbCytoscapePathway/ngbCytoscapePathway.controller.js @@ -244,6 +244,7 @@ export default class ngbCytoscapePathwayController { const savedState = JSON.parse(localStorage.getItem(this.storageName) || '{}'); const savedLayout = savedState.layout ? savedState.layout[this.elements.id] : undefined; let elements; + this.elements.nodes = this.saveDefaultPositions(this.elements.nodes, this.isCollage()); if (savedLayout) { elements = { nodes: this.wrapNodes( @@ -255,7 +256,6 @@ export default class ngbCytoscapePathwayController { edges: savedLayout.edges }; } else { - this.elements.nodes = this.saveDefaultPositions(this.elements.nodes, this.isCollage()); elements = { nodes: this.wrapNodes( this.getPlainNodes(this.positionedNodes(this.elements.nodes)), @@ -316,14 +316,14 @@ export default class ngbCytoscapePathwayController { zoomIn() { const zoom = this.zoom() + this.ZOOM_STEP; viewerContext.viewer.zoom(zoom); - // viewerContext.centerCytoscape(); + viewerContext.centerCytoscape(); this.canZoomIn = zoom < viewerContext.viewer.maxZoom(); this.canZoomOut = zoom > viewerContext.viewer.minZoom(); }, zoomOut() { const zoom = this.zoom() - this.ZOOM_STEP; viewerContext.viewer.zoom(zoom); - // viewerContext.centerCytoscape(); + viewerContext.centerCytoscape(); this.canZoomIn = zoom < viewerContext.viewer.maxZoom(); this.canZoomOut = zoom > viewerContext.viewer.minZoom(); }, @@ -336,6 +336,8 @@ export default class ngbCytoscapePathwayController { viewerContext.viewer.layout(this.settings.loadedLayout).run(); }); viewerContext.saveLayout(); + this.actionsManager.canZoomIn = this.actionsManager.zoom() < viewerContext.viewer.maxZoom(); + this.actionsManager.canZoomOut = this.actionsManager.zoom() > viewerContext.viewer.minZoom(); }, canZoomIn: true, canZoomOut: true, diff --git a/client/client/app/components/ngbPathways/ngbInternalPathwaysResult/ngbInternalPathwaysResult.controller.js b/client/client/app/components/ngbPathways/ngbInternalPathwaysResult/ngbInternalPathwaysResult.controller.js index dfba4d4f0..b43809763 100644 --- a/client/client/app/components/ngbPathways/ngbInternalPathwaysResult/ngbInternalPathwaysResult.controller.js +++ b/client/client/app/components/ngbPathways/ngbInternalPathwaysResult/ngbInternalPathwaysResult.controller.js @@ -134,6 +134,9 @@ export default class ngbInternalPathwaysResultController extends baseController if (this.ngbPathwaysService.currentInternalPathway) { this.annotationList = this.ngbPathwaysAnnotationService.getPathwayAnnotationList(this.ngbPathwaysService.currentInternalPathway.id); this.applyAnnotations(); + if (this.annotationList && this.annotationList.length !== 0) { + this.annotationsPanelVisible = true; + } } } diff --git a/client/client/app/components/ngbPathways/ngbPathwaysAnnotation/ngbPathwaysAnnotation.tpl.html b/client/client/app/components/ngbPathways/ngbPathwaysAnnotation/ngbPathwaysAnnotation.tpl.html index d5385d046..58062b10c 100644 --- a/client/client/app/components/ngbPathways/ngbPathwaysAnnotation/ngbPathwaysAnnotation.tpl.html +++ b/client/client/app/components/ngbPathways/ngbPathwaysAnnotation/ngbPathwaysAnnotation.tpl.html @@ -10,7 +10,7 @@ Select heatmap file @@ -119,7 +119,7 @@ Upload TSV/CSV @@ -164,7 +164,7 @@ Manual colors config diff --git a/client/client/app/components/ngbPathways/ngbPathwaysAnnotationDlg/ngbPathwaysAnnotationAddDlg.controller.js b/client/client/app/components/ngbPathways/ngbPathwaysAnnotationDlg/ngbPathwaysAnnotationAddDlg.controller.js index ac1ae8642..190de8b7f 100644 --- a/client/client/app/components/ngbPathways/ngbPathwaysAnnotationDlg/ngbPathwaysAnnotationAddDlg.controller.js +++ b/client/client/app/components/ngbPathways/ngbPathwaysAnnotationDlg/ngbPathwaysAnnotationAddDlg.controller.js @@ -6,7 +6,10 @@ export default class ngbPathwaysAnnotationAddDlgController { this.annotation = { ...annotation }; - this.colorScheme = this.annotation.colorScheme.copy(); + if (this.annotation.type === this.ngbPathwaysAnnotationService.annotationTypeList.HEATMAP + || this.annotation.type === this.ngbPathwaysAnnotationService.annotationTypeList.CSV) { + this.colorScheme = this.annotation.colorScheme.copy(); + } } else { this.annotation = { name: undefined,