Skip to content
Snippets Groups Projects
Commit 8c1a27f1 authored by Julian Späth's avatar Julian Späth Committed by Julian Matschinske
Browse files

Fix mac issue

parent 72cb62ef
No related branches found
No related tags found
No related merge requests found
......@@ -125,20 +125,27 @@ export class AnalysisWindowComponent implements OnInit, OnChanges {
this.showDetailsChange.emit(null);
});
this.network.on('doubleClick', (properties) => {
const nodeIds: Array<string> = properties.nodes;
if (nodeIds.length > 0) {
const nodeId = nodeIds[0];
const node = this.nodeData.nodes.get(nodeId);
const wrapper = node.wrapper;
if (this.analysis.inSelection(wrapper)) {
this.analysis.removeItem(wrapper);
this.analysis.getCount();
} else {
this.analysis.addItem(wrapper);
this.analysis.getCount();
}
}
});
this.network.on('click', (properties) => {
const selectedNodes = this.nodeData.nodes.get(properties.nodes);
if (selectedNodes.length > 0) {
const selectedNode = selectedNodes[0];
const wrapper = selectedNode.wrapper;
if (properties.event.srcEvent.ctrlKey) {
if (this.analysis.inSelection(wrapper)) {
this.analysis.removeItem(wrapper);
} else {
this.analysis.addItem(wrapper);
this.analysis.getCount();
}
}
this.showDetailsChange.emit(wrapper);
} else {
this.showDetailsChange.emit(null);
......
......@@ -396,7 +396,7 @@
</tbody>
</table>
<i *ngIf="analysis.getCount() === 0">
To select proteins, click them while pressing CTRL.
Double-click on a protein to select it for the analysis.
</i>
</div>
<footer class="card-footer">
......
......@@ -193,22 +193,27 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
const container = this.networkEl.nativeElement;
const options = NetworkSettings.getOptions('main');
this.network = new vis.Network(container, this.nodeData, options);
this.network.on('click', (properties) => {
this.network.on('doubleClick', (properties) => {
const nodeIds: Array<string> = properties.nodes;
if (nodeIds.length > 0) {
const nodeId = nodeIds[0];
const node = this.nodeData.nodes.get(nodeId);
const wrapper = node.wrapper;
if (properties.event.srcEvent.ctrlKey) {
if (this.analysis.inSelection(wrapper)) {
this.analysis.removeItem(wrapper);
} else {
this.analysis.addItem(wrapper);
}
this.openSummary(wrapper, false);
if (this.analysis.inSelection(wrapper)) {
this.analysis.removeItem(wrapper);
} else {
this.openSummary(wrapper, false);
this.analysis.addItem(wrapper);
}
}
});
this.network.on('click', (properties) => {
const nodeIds: Array<string> = properties.nodes;
if (nodeIds.length > 0) {
const nodeId = nodeIds[0];
const node = this.nodeData.nodes.get(nodeId);
const wrapper = node.wrapper;
this.openSummary(wrapper, false);
} else {
this.closeSummary();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment