MCPcopy Create free account
hub / github.com/microsoft/SandDance / offsets

Function offsets

docs/app/js/sanddance-app.js:120604–120610  ·  view source on GitHub ↗
(legends, value)

Source from the content-addressed store, hash-verified

120602 return (key, d)=>opt[key] != null ? opt[key] : config[key] != null ? config[key] : d;
120603} // if legends specify offset directly, use the maximum specified value
120604function offsets(legends, value) {
120605 let max1 = -Infinity;
120606 legends.forEach((item)=>{
120607 if (item.offset != null) max1 = Math.max(max1, item.offset);
120608 });
120609 return max1 > -Infinity ? max1 : value;
120610}
120611function legendParams(g, orient, config, xb, yb, w, h) {
120612 const _ = lookup$1(config, orient), offset = offsets(g, _("offset", 0)), anchor = _("anchor", Start), mult = anchor === End ? 1 : anchor === Middle ? 0.5 : 0;
120613 const p = {

Callers 1

legendParamsFunction · 0.70

Calls 2

forEachMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected