MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / placeholderWidth

Function placeholderWidth

apps/OpenSign/src/constant/Utils.js:2609–2618  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

2607}
2608//calculate placeholder width to embed in pdf
2609export const placeholderWidth = (pos) => {
2610 const defaultWidth = defaultWidthHeight(pos.type).width;
2611 const posWidth = pos.Width || defaultWidth;
2612 //condition to handle old data saved from mobile view to get widthh
2613 if (pos.isMobile && pos.scale) {
2614 return pos.IsResize ? posWidth : posWidth * pos.scale;
2615 } else {
2616 return posWidth;
2617 }
2618};
2619
2620//calculate placeholder height to embed in pdf
2621export const placeholderHeight = (pos) => {

Callers 1

embedWidgetsToDocFunction · 0.85

Calls 1

defaultWidthHeightFunction · 0.85

Tested by

no test coverage detected