double plant indicator
parent
3152d46f55
commit
448a97c199
|
@ -54,6 +54,7 @@ export interface GardenPlantProps {
|
|||
dispatch: Function;
|
||||
plant: Readonly<TaggedPlant>;
|
||||
selected: boolean;
|
||||
editing: boolean;
|
||||
dragging: boolean;
|
||||
zoomLvl: number;
|
||||
activeDragXY: BotPosition | undefined;
|
||||
|
|
|
@ -14,6 +14,7 @@ describe("<GardenPlant/>", () => {
|
|||
mapTransformProps: fakeMapTransformProps(),
|
||||
plant: fakePlant(),
|
||||
selected: false,
|
||||
editing: false,
|
||||
multiselected: false,
|
||||
dragging: false,
|
||||
dispatch: jest.fn(),
|
||||
|
|
|
@ -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" : ""}`}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue