# Basic configuration
config <- minimap()
# Custom configuration
config <- minimap(
key = "my-minimap",
position = "left-top",
size = c(200, 150),
padding = 15,
containerStyle = list(
border = "1px solid #ddd",
borderRadius = "4px",
boxShadow = "0 0 8px rgba(0,0,0,0.1)"
),
maskStyle = list(
stroke = "#1890ff",
strokeWidth = 2,
fill = "rgba(24, 144, 255, 0.1)"
)
)
# With custom filtering function
config <- minimap(
filter = JS("(id, elementType) => {
// Only show nodes and important edges in the minimap
if (elementType === 'node') return true;
if (elementType === 'edge') {
// Assuming edges have an 'important' attribute
const edge = graph.findById(id);
return edge.getModel().important === true;
}
return false;
}")
)
Run the code above in your browser using DataLab