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

Function getText

packages/sanddance-test-umd/src/transition.ts:35–54  ·  view source on GitHub ↗
(textId)

Source from the content-addressed store, hash-verified

33 }
34
35 export function getText(textId) {
36 const textarea = document.getElementById(textId) as HTMLTextAreaElement;
37 const text = textarea.value;
38
39 const errorDiv = document.getElementById('error');
40 const splitRight = document.getElementById('split-right');
41
42 try {
43 const spec = JSON.parse(text);
44
45 splitRight.style.opacity = '1';
46 errorDiv.style.display = 'none';
47 update(spec);
48 }
49 catch (e) {
50 errorDiv.innerText = e;
51 errorDiv.style.display = '';
52 splitRight.style.opacity = '0.1';
53 }
54 }
55
56 fetch('./specs/scatter3D.json')
57 .then(response => response.text())

Callers 1

transition.tsFile · 0.70

Calls 1

updateFunction · 0.70

Tested by

no test coverage detected