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

Function boundMark

docs/app/js/sanddance-app.js:123052–123068  ·  view source on GitHub ↗
(mark, bounds17, opt)

Source from the content-addressed store, hash-verified

123050 mark: null
123051};
123052function boundMark(mark, bounds17, opt) {
123053 var type6 = Marks[mark.marktype], bound4 = type6.bound, items = mark.items, hasItems = items && items.length, i, n, item, b16;
123054 if (type6.nested) {
123055 if (hasItems) item = items[0];
123056 else {
123057 // no items, fake it
123058 DUMMY.mark = mark;
123059 item = DUMMY;
123060 }
123061 b16 = boundItem(item, bound4, opt);
123062 bounds17 = bounds17 && bounds17.union(b16) || b16;
123063 return bounds17;
123064 }
123065 bounds17 = bounds17 || mark.bounds && mark.bounds.clear() || new Bounds();
123066 if (hasItems) for(i = 0, n = items.length; i < n; ++i)bounds17.union(boundItem(items[i], bound4, opt));
123067 return mark.bounds = bounds17;
123068}
123069const keys = [
123070 "marktype",
123071 "name",

Callers 1

initializeFunction · 0.70

Calls 2

boundItemFunction · 0.70
clearMethod · 0.65

Tested by

no test coverage detected