UNPKG

@aurigma/design-atoms

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

42 lines 1.85 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { ShapeHandlerData } from "./ShapeHandlerData"; var ImageHandlerData = /** @class */ (function (_super) { __extends(ImageHandlerData, _super); function ImageHandlerData(handler) { var _this = _super.call(this, handler) || this; _this.__type = "ImageHandlerData"; if (handler) { _this.DI = handler.needToDownloadImage; _this.SAS = handler.takeIntoAccountImageDpi; _this.HR = handler.sourceImageHorizontalResolution; _this.VR = handler.sourceImageVerticalResolution; } return _this; } ImageHandlerData.prototype.applyState = function (imageData, handler) { if (handler) { handler.beginUpdate(); //call endUpdate in base class handler.sourceImageHorizontalResolution = imageData.HR; handler.sourceImageVerticalResolution = imageData.VR; handler.needToDownloadImage = imageData.DI; handler.takeIntoAccountImageDpi = imageData.SAS; _super.prototype.applyState.call(this, imageData, handler); } }; ; return ImageHandlerData; }(ShapeHandlerData)); export { ImageHandlerData }; //# sourceMappingURL=ImageHandlerData.js.map