mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added ability to box select with long press
This commit is contained in:
@@ -7,9 +7,7 @@ import {
|
||||
faEllipsisV,
|
||||
faCog,
|
||||
faQuestionCircle,
|
||||
faPlusSquare,
|
||||
faBox,
|
||||
faObjectGroup,
|
||||
faPlusSquare
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { EventsConsumer } from "../../eventscontext";
|
||||
import { StateConsumer } from "../../statecontext";
|
||||
@@ -73,16 +71,6 @@ export function SideBar() {
|
||||
icon={faPencil}
|
||||
tooltip="Hide/show drawing menu"
|
||||
></OlStateButton>
|
||||
<OlStateButton
|
||||
onClick={() => {
|
||||
document.dispatchEvent(
|
||||
new CustomEvent("mapForceBoxSelect")
|
||||
);
|
||||
}}
|
||||
checked={appState.mapBoxSelection}
|
||||
icon={faObjectGroup}
|
||||
tooltip="Enable box selection on the map"
|
||||
></OlStateButton>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex w-16 flex-wrap content-end justify-center p-4">
|
||||
|
||||
@@ -117,6 +117,9 @@ export function UnitMouseControlBar(props: {}) {
|
||||
});
|
||||
} else {
|
||||
setActiveContextAction(null);
|
||||
getApp().getMap().setState(CONTEXT_ACTION, {
|
||||
contextAction: null,
|
||||
});
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user