MCPcopy Create free account
hub / github.com/microsoft/SandDance / useCanvas

Function useCanvas

docs/app/js/sanddance-app.js:122843–122845  ·  view source on GitHub ↗
(use)

Source from the content-addressed store, hash-verified

122841};
122842useCanvas(true);
122843function useCanvas(use) {
122844 textMetrics.width = use && context ? measureWidth : estimateWidth;
122845} // make simple estimate if no canvas is available
122846function estimateWidth(item, text1) {
122847 return _estimateWidth(textValue(item, text1), fontSize(item));
122848}

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected