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

Function scrollPropertiesTo

app.js:747–754  ·  view source on GitHub ↗
(targetEl)

Source from the content-addressed store, hash-verified

745const selectedElementTitle = document.getElementById("selectedElementTitle");
746
747function scrollPropertiesTo(targetEl) {
748 if (!propertiesSidebar || !targetEl) return;
749 const pr = propertiesSidebar.getBoundingClientRect();
750 const tr = targetEl.getBoundingClientRect();
751 const top = (tr.top - pr.top) + propertiesSidebar.scrollTop;
752 // Put the target right at the top (with a small padding)
753 propertiesSidebar.scrollTo({ top: Math.max(0, top - 8), behavior: "smooth" });
754}
755
756function scrollToScreensSettings() {
757 scrollPropertiesTo(settingsScreensTitle);

Callers 2

scrollToScreensSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected