feat: production chain
This commit is contained in:
@@ -140,6 +140,9 @@ export class ViewerInteractionController {
|
||||
|
||||
const picked = this.pickSelectableAtClientPosition(event.clientX, event.clientY);
|
||||
this.context.setSelectedItems(picked ? [picked] : []);
|
||||
if (picked && this.shouldFocusSelectionOnClick(picked)) {
|
||||
this.context.focusOnSelection(picked);
|
||||
}
|
||||
this.context.syncFollowStateFromSelection();
|
||||
this.context.updatePanels();
|
||||
};
|
||||
@@ -294,4 +297,12 @@ export class ViewerInteractionController {
|
||||
this.context.syncFollowStateFromSelection();
|
||||
this.context.updatePanels();
|
||||
}
|
||||
|
||||
private shouldFocusSelectionOnClick(selection: Selectable) {
|
||||
if (selection.kind === "planet") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return selection.kind === "system" && selection.id !== this.context.getActiveSystemId();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user