MCPcopy Create free account
hub / github.com/cifertech/DisplayKit / updateSelectedConstraints

Function updateSelectedConstraints

app.js:6731–6740  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6729}
6730
6731function updateSelectedConstraints() {
6732 const el = elements.find((el) => el.id === selectedId);
6733 if (!el) return;
6734 el.constraints = el.constraints || {};
6735 if (constraintLeft) el.constraints.left = !!constraintLeft.checked;
6736 if (constraintRight) el.constraints.right = !!constraintRight.checked;
6737 if (constraintTop) el.constraints.top = !!constraintTop.checked;
6738 if (constraintBottom) el.constraints.bottom = !!constraintBottom.checked;
6739 pushHistory();
6740}
6741
6742if (constraintLeft) constraintLeft.addEventListener("change", updateSelectedConstraints);
6743if (constraintRight) constraintRight.addEventListener("change", updateSelectedConstraints);

Callers

nothing calls this directly

Calls 1

pushHistoryFunction · 0.85

Tested by

no test coverage detected