MCPcopy Index your code
hub / github.com/microsoft/SandDance / tickBand

Function tickBand

docs/app/js/sanddance-app.js:147586–147618  ·  view source on GitHub ↗
(_)

Source from the content-addressed store, hash-verified

147584}
147585const alignExpr$1 = anchorExpr((0, _vegaUtil.stringValue)(Left), (0, _vegaUtil.stringValue)(Right), (0, _vegaUtil.stringValue)(Center));
147586function tickBand(_) {
147587 const v = _("tickBand");
147588 let offset = _("tickOffset"), band, extra;
147589 if (!v) {
147590 // if no tick band entry, fall back on other properties
147591 band = _("bandPosition");
147592 extra = _("tickExtra");
147593 } else if (v.signal) {
147594 // if signal, augment code to interpret values
147595 band = {
147596 signal: `(${v.signal}) === 'extent' ? 1 : 0.5`
147597 };
147598 extra = {
147599 signal: `(${v.signal}) === 'extent'`
147600 };
147601 if (!(0, _vegaUtil.isObject)(offset)) offset = {
147602 signal: `(${v.signal}) === 'extent' ? 0 : ${offset}`
147603 };
147604 } else if (v === "extent") {
147605 // if constant, simply set values
147606 band = 1;
147607 extra = true;
147608 offset = 0;
147609 } else {
147610 band = 0.5;
147611 extra = false;
147612 }
147613 return {
147614 extra,
147615 band,
147616 offset
147617 };
147618}
147619function extendOffset(value10, offset) {
147620 return !offset ? value10 : !value10 ? offset : !(0, _vegaUtil.isObject)(value10) ? {
147621 value: value10,

Callers 1

parseAxisFunction · 0.70

Calls 1

_Function · 0.70

Tested by

no test coverage detected