feat(frontend): implement via mode for setting destinations and add MapNode disableNavigate prop
This commit is contained in:
@@ -15,6 +15,7 @@ interface MapNodeProps {
|
||||
security?: number;
|
||||
signatures?: number;
|
||||
isDraggable?: boolean;
|
||||
disableNavigate?: boolean;
|
||||
}
|
||||
|
||||
export const MapNode: React.FC<MapNodeProps> = ({
|
||||
@@ -30,7 +31,8 @@ export const MapNode: React.FC<MapNodeProps> = ({
|
||||
type,
|
||||
security,
|
||||
signatures,
|
||||
isDraggable = false
|
||||
isDraggable = false,
|
||||
disableNavigate = false,
|
||||
}) => {
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
const [isDragging, setIsDragging] = useState(false);
|
||||
@@ -142,7 +144,7 @@ export const MapNode: React.FC<MapNodeProps> = ({
|
||||
onMouseDown={handleMouseDown}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onClick();
|
||||
if (!disableNavigate) onClick();
|
||||
}}
|
||||
onDoubleClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
Reference in New Issue
Block a user