| 12345678910111213141516 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.scaleToPixel = void 0;
- /**
- * scale a shape to a given size
- */
- function scaleToPixel(el, size, applyScale) {
- if (applyScale === void 0) { applyScale = false; }
- var _a = el.getBBox(), width = _a.width, height = _a.height;
- var scale = size / Math.max(width, height);
- if (applyScale)
- el.scale(scale);
- return scale;
- }
- exports.scaleToPixel = scaleToPixel;
- //# sourceMappingURL=scale-to-pixel.js.map
|