Skip to content

Commit

Permalink
not hide locator team selection after
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Bats committed Dec 9, 2023
1 parent 45e762e commit e30f842
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/frontend/admin/src/components/SniperLocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ const SniperViewManager = ({ service }) => {
teamId: selectedTeamCdsId,
};
service.moveWithSettings(settings);
setSelectedInstance(undefined);
setSelectedTeamId(undefined);
}, [selectedInstance, selectedTeamId, service]);

const onShow = useCallback(() => {
Expand All @@ -168,12 +166,12 @@ const SniperViewManager = ({ service }) => {
teamId: selectedTeamCdsId,
};
service.showWithSettings(settings);
setSelectedInstance(undefined);
setSelectedTeamId(undefined);
}, [selectedInstance, selectedTeamId, service]);

const onHide = useCallback(() => {
service.hide();
setSelectedInstance(undefined);
setSelectedTeamId(undefined);
}, [service]);

return (
Expand Down Expand Up @@ -228,6 +226,11 @@ const SniperViewManager = ({ service }) => {
variant="contained"
onClick={onShow}>Show locator
</Button>
<Button
color="error"
variant="contained"
onClick={onHide}>Hide
</Button>
</ButtonGroup>
</>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ object Util {

fun loadLocatorPoints(sniperNumber: Int): List<LocatorPoint> {
val x = config.configDirectory.resolve("coordinates-$sniperNumber.txt")
println(x.readText())
val scanner = Scanner(x)
val n = scanner.nextInt()

Expand All @@ -89,9 +88,7 @@ object Util {
scanner.nextDouble(),
scanner.nextDouble()
)
println("$point")
allPoints.add(point)

} catch (e: Throwable) {
println("sooo bad $e")
}
Expand Down

0 comments on commit e30f842

Please sign in to comment.