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

Function anchorPoint

docs/app/js/sanddance-app.js:122937–122947  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

122935};
122936const tempBounds = new Bounds();
122937function anchorPoint(item) {
122938 var x40 = item.x || 0, y39 = item.y || 0, r = item.radius || 0, t;
122939 if (r) {
122940 t = (item.theta || 0) - HalfPi;
122941 x40 += r * Math.cos(t);
122942 y39 += r * Math.sin(t);
122943 }
122944 tempBounds.x1 = x40;
122945 tempBounds.y1 = y39;
122946 return tempBounds;
122947}
122948function attr(emit12, item) {
122949 var dx = item.dx || 0, dy = (item.dy || 0) + offset(item), p = anchorPoint(item), x41 = p.x1, y40 = p.y1, a = item.angle || 0, t;
122950 emit12("text-anchor", textAlign[item.align] || "start");

Callers 4

attrFunction · 0.70
boundFunction · 0.70
drawFunction · 0.70
hitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected