Clearing Overrides
Remove a configuration override and let the applicable default or inherited value take over.
Use Histropedia.UNSET New
Histropedia.UNSET, also available as the named ES module export UNSET, removes values through timeline, article, lane, chart, and time-band setters. Use the constant itself, not the string 'UNSET'. Both dot paths and sparse object patches work.
import { UNSET } from 'histropediajs';
// With a script tag: const { UNSET } = Histropedia;
timeline.setOption('zoom.wheelSpeed', UNSET);
article.setStyle({ header: { color: UNSET, height: 'auto' } });
article.setHoverStyle('border.width', UNSET);
article.setActiveStyle('border.width', UNSET);
lane.setOption('article.defaultStyle.header.color', UNSET);
chart.setStyle('lineWidth', UNSET);
timeBand.setStyle('backgroundColor', UNSET);
Only supplied properties change. Here, the article header colour override is removed, its height becomes automatic, and other header overrides remain. TypeScript setter patches use OptionPatch<T> New to support nested removals.
Defaults and inheritance
Timeline options restore library defaults, including layout defaults captured when the timeline was created. Styles reveal the next applicable value in the normal cascade: engine, registered layout, timeline, lane, then article. If no lower layer supplies a property, it becomes absent.
timeline.setOption('article.defaultStyle.header.color', '#eee');
lane.setOption('article.defaultStyle.header.color', '#ddd');
article.setStyle('header.color', '#ccc');
article.setStyle('header.color', UNSET); // Now follows the lane's '#ddd'.
lane.setOption('article.defaultStyle.header.color', UNSET); // Follows '#eee'.
article.setOption({ style: UNSET }); // Clear all normal article style overrides.
timeline.setOption('zoom.pinchMomentum', UNSET); // Restore the whole branch.Removing an override lets it follow later changes to lower layers. Setting an explicit value keeps an override, even when it currently equals the inherited value. Normal, hover, and active overrides are independent; removing an active declaration can reveal an inherited active value. Chart and time-band styles fall back to their timeline defaults.
A removed object branch restores the whole branch; a removed array property restores its default array. Ordinary array patches replace the entire array. null and undefined keep their existing meanings and do not request removal. A path setter with an omitted or undefined value remains a getter. Initialization-only options still require initialization; removal does not rerun it.
Remove inherited layout declarations New
An extended layout can remove declarations from its parent's defaults during registration. The parent stays unchanged; the child falls back to the remaining style cascade. No removal marker remains in resolved styles.
Histropedia.Timeline.registerCardLayout({
name: 'plain-landscape',
extends: 'landscape',
defaultStyle: { header: { color: Histropedia.UNSET }, image: { visible: false } },
defaultHoverStyle: { border: { width: Histropedia.UNSET } },
defaultActiveStyle: Histropedia.UNSET
});Removing inherited layout declarations does not disable engine active styles. See card-layout inheritance and try resetting styles in the Article Sizing example.
Need More Help?
If you can't find what you're looking for, browse the examples or contact us.