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

Function axisTitleLayout

docs/app/js/sanddance-app.js:120344–120355  ·  view source on GitHub ↗
(view, title, offset, pad, dl, isYAxis1, sign, bounds)

Source from the content-addressed store, hash-verified

120342 return item.mark.bounds.clear().union(bounds);
120343}
120344function axisTitleLayout(view, title, offset, pad, dl, isYAxis1, sign, bounds) {
120345 const b = title.bounds;
120346 if (title.auto) {
120347 const v = sign * (offset + dl + pad);
120348 let dx = 0, dy = 0;
120349 view.dirty(title);
120350 isYAxis1 ? dx = (title.x || 0) - (title.x = v) : dy = (title.y || 0) - (title.y = v);
120351 title.mark.bounds.clear().union(b.translate(-dx, -dy));
120352 view.dirty(title);
120353 }
120354 bounds.union(b);
120355}
120356const min = (a, b)=>Math.floor(Math.min(a, b));
120357const max = (a, b)=>Math.ceil(Math.max(a, b));
120358function gridLayoutGroups(group) {

Callers 1

axisLayoutFunction · 0.70

Calls 2

clearMethod · 0.65
translateMethod · 0.45

Tested by

no test coverage detected