MCPcopy
hub / github.com/webpro/reveal-md / getPageOptions

Function getPageOptions

lib/config.js:129–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127};
128
129export const getPageOptions = printSize => {
130 if (printSize) {
131 const dimensions = printSize.match(/^([\d.]+)x([\d.]+)([a-z]*)$/);
132 if (dimensions) {
133 const [width, height, unit] = dimensions.slice(1);
134 return { width: `${width}${unit}`, height: `${height}${unit}` };
135 }
136 return { format: printSize };
137 } else if (revealConfig && revealConfig.width && revealConfig.height) {
138 return { width: revealConfig.width, height: revealConfig.height };
139 } else {
140 return { width: 960, height: 700 };
141 }
142};

Callers 2

print.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected