-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added reference view that uses GoldenLayout. All other views are brok…
…en to varying degrees and search currently redirects to reference.
- Loading branch information
1 parent
3af3853
commit 7d93946
Showing
21 changed files
with
354 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//import { ScrollComponent } from "./scroll.component"; | ||
//import { SearchParamsComponent } from "./search-params.component"; | ||
import { MacroComponent } from "./macro.component"; | ||
import { MicroComponent } from "./micro.component"; | ||
import { PlotComponent } from "./plot.component"; | ||
import { ReferenceComponent } from "./reference.component"; | ||
//import { VisualizationComponent } from "./visualization.component"; | ||
|
||
export const components: any[] = [ | ||
//ScrollComponent, | ||
//SearchParamsComponent, | ||
MacroComponent, | ||
MicroComponent, | ||
PlotComponent, | ||
ReferenceComponent, | ||
//VisualizationComponent, | ||
]; | ||
|
||
//export * from "./scroll.component"; | ||
//export * from "./search-params.component"; | ||
export * from "./macro.component"; | ||
export * from "./micro.component"; | ||
export * from "./plot.component"; | ||
export * from "./reference.component"; | ||
//export * from "./visualization.component"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Angular + dependencies | ||
import { AfterViewInit, Component, ElementRef, OnDestroy, ViewChild } | ||
from "@angular/core"; | ||
import { GCV } from "../../../assets/js/gcv"; | ||
|
||
@Component({ | ||
selector: "macro", | ||
styles: [], | ||
template: "<div #container></div>", | ||
}) | ||
export class MacroComponent implements AfterViewInit, OnDestroy { | ||
|
||
@ViewChild("container") container: ElementRef; | ||
|
||
ngAfterViewInit() { | ||
//const viewer = new GCV.visualization.Micro(this.container.nativeElement); | ||
this.container.nativeElement.innerHTML = "macro-synteny viewer"; | ||
} | ||
|
||
ngOnDestroy() { | ||
console.log('macro destroyed'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Angular + dependencies | ||
import { AfterViewInit, Component, ElementRef, EventEmitter, OnDestroy, Output, | ||
ViewChild } from "@angular/core"; | ||
import { GCV } from "../../../assets/js/gcv"; | ||
|
||
@Component({ | ||
selector: "micro", | ||
styles: [], | ||
template: ` | ||
<div #container> | ||
micro-synteny viewer | ||
<a class="btn btn-primary" (click)="spawnPlot()">Plot</a> | ||
</div> | ||
`, | ||
}) | ||
export class MicroComponent implements AfterViewInit, OnDestroy { | ||
|
||
@Output() plot = new EventEmitter(); | ||
|
||
@ViewChild("container") container: ElementRef; | ||
|
||
ngAfterViewInit() { | ||
//const viewer = new GCV.visualization.Micro(this.container.nativeElement); | ||
//this.container.nativeElement.innerHTML = "micro-synteny viewer"; | ||
} | ||
|
||
ngOnDestroy() { | ||
//console.log('destroyed'); | ||
} | ||
|
||
spawnPlot() { | ||
this.plot.emit(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Angular + dependencies | ||
import { AfterViewInit, Component, ElementRef, OnDestroy, ViewChild } | ||
from "@angular/core"; | ||
import { GCV } from "../../../assets/js/gcv"; | ||
|
||
@Component({ | ||
selector: "plot", | ||
styles: [], | ||
template: "<div #container></div>", | ||
}) | ||
export class PlotComponent implements AfterViewInit, OnDestroy { | ||
|
||
@ViewChild("container") container: ElementRef; | ||
|
||
ngAfterViewInit() { | ||
//const viewer = new GCV.visualization.Micro(this.container.nativeElement); | ||
this.container.nativeElement.innerHTML = "plot viewer"; | ||
} | ||
|
||
ngOnDestroy() { | ||
console.log('plot destroyed'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div class="viewers" [gcvGoldenLayout]="layoutComponents" [config]="layoutConfig"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.viewers { | ||
position: absolute; | ||
top: 57px; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
} |
48 changes: 48 additions & 0 deletions
48
client/src/app/components/reference/reference.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Angular | ||
import { Component, ViewChild } from "@angular/core"; | ||
// app | ||
import { GoldenLayoutDirective } from "../../directives"; | ||
import { MacroComponent } from "./macro.component"; | ||
import { MicroComponent } from "./micro.component"; | ||
import { PlotComponent } from "./plot.component"; | ||
|
||
@Component({ | ||
selector: "reference", | ||
styleUrls: ["./reference.component.scss"], | ||
templateUrl: "./reference.component.html", | ||
}) | ||
export class ReferenceComponent { | ||
|
||
@ViewChild(GoldenLayoutDirective) goldenLayoutDirective; | ||
|
||
layoutComponents = [ | ||
{component: MacroComponent, name: "macro"}, | ||
{component: MicroComponent, name: "micro"}, | ||
{component: PlotComponent, name: "plot"} | ||
]; | ||
layoutConfig = { | ||
content: [{ | ||
type: "column", | ||
content: [ | ||
{ | ||
type: "component", | ||
componentName: "macro", | ||
isClosable: false | ||
}, | ||
{ | ||
type: "component", | ||
componentName: "micro", | ||
componentState: { | ||
inputs: {key: "value"}, | ||
outputs: { | ||
plot: (() => { | ||
this.goldenLayoutDirective.addItem({type: "component", componentName: "plot"}); | ||
}) | ||
}, | ||
}, | ||
isClosable: false | ||
} | ||
] | ||
}] | ||
}; | ||
} |
Oops, something went wrong.