@wcardinal/wcardinal-geditor
Version:
WebGL-based graphic editor, tester and viewer for supervisory systems
24 lines • 1.12 kB
JavaScript
import { __extends } from "tslib";
import { ECommandShapePropertyRecursive } from "./e-command-shape-property-recursive";
var ECommandShapePropertyImageFitTo = /** @class */ (function (_super) {
__extends(ECommandShapePropertyImageFitTo, _super);
function ECommandShapePropertyImageFitTo(selection) {
return _super.call(this, selection, undefined) || this;
}
ECommandShapePropertyImageFitTo.prototype.getProperty = function (shape, capability) {
var size = shape.size;
return [size.x, size.y];
};
ECommandShapePropertyImageFitTo.prototype.setProperty = function (shape, capability, property) {
shape.size.set(property[0], property[1]);
};
ECommandShapePropertyImageFitTo.prototype.initProperty = function (shape, capability, property) {
var image = shape.image;
if (image) {
shape.size.set(image.width, image.height);
}
};
return ECommandShapePropertyImageFitTo;
}(ECommandShapePropertyRecursive));
export { ECommandShapePropertyImageFitTo };
//# sourceMappingURL=e-command-shape-property-image-fit-to.js.map