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

Function ensureSnapGuides

app.js:275–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273}
274
275function ensureSnapGuides() {
276 if (snapGuideV && snapGuideH) return { v: snapGuideV, h: snapGuideH };
277 const root = preview;
278 if (!root) return { v: null, h: null };
279 // Guides should move/scale with the preview itself.
280 snapGuideV = document.createElement("div");
281 snapGuideV.className = "snap-guide v";
282 snapGuideH = document.createElement("div");
283 snapGuideH.className = "snap-guide h";
284 root.appendChild(snapGuideV);
285 root.appendChild(snapGuideH);
286 return { v: snapGuideV, h: snapGuideH };
287}
288
289function hideSnapGuides() {
290 if (snapGuideV) snapGuideV.classList.remove("show");

Callers 1

onMouseMoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected