chore(store-updater): cleanup
This commit is contained in:
@@ -156,13 +156,11 @@ export function StoreUpdater<NodeType extends Node = Node, EdgeType extends Edge
|
|||||||
else if (fieldName === 'translateExtent') setTranslateExtent(fieldValue as CoordinateExtent);
|
else if (fieldName === 'translateExtent') setTranslateExtent(fieldValue as CoordinateExtent);
|
||||||
else if (fieldName === 'nodeExtent') setNodeExtent(fieldValue as CoordinateExtent);
|
else if (fieldName === 'nodeExtent') setNodeExtent(fieldValue as CoordinateExtent);
|
||||||
else if (fieldName === 'paneClickDistance') setPaneClickDistance(fieldValue as number);
|
else if (fieldName === 'paneClickDistance') setPaneClickDistance(fieldValue as number);
|
||||||
|
else if (fieldName === 'ariaLabelConfig')
|
||||||
|
store.setState({ ariaLabelConfig: mergeAriaLabelConfig(fieldValue as AriaLabelConfig) });
|
||||||
// Renamed fields
|
// Renamed fields
|
||||||
else if (fieldName === 'fitView') store.setState({ fitViewQueued: fieldValue as boolean });
|
else if (fieldName === 'fitView') store.setState({ fitViewQueued: fieldValue as boolean });
|
||||||
else if (fieldName === 'fitViewOptions') store.setState({ fitViewOptions: fieldValue as FitViewOptions });
|
else if (fieldName === 'fitViewOptions') store.setState({ fitViewOptions: fieldValue as FitViewOptions });
|
||||||
|
|
||||||
if (fieldName === 'ariaLabelConfig') {
|
|
||||||
store.setState({ ariaLabelConfig: mergeAriaLabelConfig(fieldValue as AriaLabelConfig) });
|
|
||||||
}
|
|
||||||
// General case
|
// General case
|
||||||
else store.setState({ [fieldName]: fieldValue });
|
else store.setState({ [fieldName]: fieldValue });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user