double plant indicator

pull/1545/head
AscendFB 2019-10-29 11:59:19 +01:00
parent 3152d46f55
commit 448a97c199
4 changed files with 5 additions and 2 deletions

View File

@ -54,6 +54,7 @@ export interface GardenPlantProps {
dispatch: Function;
plant: Readonly<TaggedPlant>;
selected: boolean;
editing: boolean;
dragging: boolean;
zoomLvl: number;
activeDragXY: BotPosition | undefined;

View File

@ -14,6 +14,7 @@ describe("<GardenPlant/>", () => {
mapTransformProps: fakeMapTransformProps(),
plant: fakePlant(),
selected: false,
editing: false,
multiselected: false,
dragging: false,
dispatch: jest.fn(),

View File

@ -44,7 +44,7 @@ export class GardenPlant extends
render() {
const { selected, dragging, plant, multiselected, mapTransformProps,
activeDragXY, zoomLvl, animate } = this.props;
activeDragXY, zoomLvl, animate, editing } = this.props;
const { id, radius, x, y } = plant.body;
const { icon } = this.state;
@ -65,7 +65,7 @@ export class GardenPlant extends
fill={Color.soilCloud}
fillOpacity={0} />}
{multiselected &&
{multiselected && !editing &&
<g id="selected-plant-indicator">
<Circle
className={`plant-indicator ${animate ? "animate" : ""}`}

View File

@ -32,6 +32,7 @@ export function PlantLayer(props: PlantLayerProps) {
mapTransformProps={mapTransformProps}
plant={p}
selected={selected}
editing={editing}
multiselected={multiselected}
dragging={selected && dragging && editing}
dispatch={dispatch}