MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / updatePath

Function updatePath

lib/web/drags.js:773–782  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

771 var curve = rrRaph.path().attr({"stroke-width": 4, "stroke": "#000"});
772
773 var updatePath = function () {
774 console.log(" path geometry will be " + stringify(vz));
775
776 var z = "M" + (vz[0][0] * (w - insetW * 2) + insetW) + "," + (vz[0][1] * (h - insetW * 2) + insetW);
777 z += "T" + (vz[1][0] * (w - insetW * 2) + insetW) + "," + (vz[1][1] * (h - insetW * 2) + insetW);
778 z += "T" + (vz[2][0] * (w - insetW * 2) + insetW) + "," + (vz[2][1] * (h - insetW * 2) + insetW);
779 z += "T" + (vz[3][0] * (w - insetW * 2) + insetW) + "," + (vz[3][1] * (h - insetW * 2) + insetW);
780 console.log(" path geometry is " + stringify(vz));
781 curve.attr({path: z})
782 };
783 var s0 = makeXYSlider(rrRaph, w, h, function () {
784 vz = get();
785 return vz[0]

Callers 2

make4GraphFunction · 0.85
make14GraphFunction · 0.85

Calls 3

logMethod · 0.80
stringifyFunction · 0.70
attrMethod · 0.45

Tested by

no test coverage detected