medsurf-draw
Version:
Draw annotations on jpg/zoomify images, based on PIXI.js
87 lines • 3.27 kB
JavaScript
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { v4 as uuidv4 } from 'uuid';
import { BaseContainer, BaseContainerImageModel } from "./BaseContainer";
import { Design } from "../../config/design";
var NumberDataModel = (function () {
function NumberDataModel() {
}
return NumberDataModel;
}());
export { NumberDataModel };
export var ColorMode;
(function (ColorMode) {
ColorMode[ColorMode["LINE"] = 0] = "LINE";
ColorMode[ColorMode["FILL"] = 1] = "FILL";
ColorMode[ColorMode["TEXT"] = 2] = "TEXT";
})(ColorMode || (ColorMode = {}));
export var NumberMode;
(function (NumberMode) {
NumberMode[NumberMode["WIDTH"] = 0] = "WIDTH";
NumberMode[NumberMode["SIZE"] = 1] = "SIZE";
NumberMode[NumberMode["PAD"] = 2] = "PAD";
})(NumberMode || (NumberMode = {}));
var BaseElementContainerModel = (function (_super) {
__extends(BaseElementContainerModel, _super);
function BaseElementContainerModel() {
return _super !== null && _super.apply(this, arguments) || this;
}
return BaseElementContainerModel;
}(BaseContainerImageModel));
export { BaseElementContainerModel };
var BaseElementContainer = (function (_super) {
__extends(BaseElementContainer, _super);
function BaseElementContainer(model) {
var _this = _super.call(this, model) || this;
_this.imageObjectMenu = [];
if (!_this.model.id) {
_this.model.id = uuidv4();
}
_this.name = _this.model.id;
return _this;
}
BaseElementContainer.prototype.getNumberData = function () {
return {
value: Design.default.numbers.defaultValue,
minValue: Design.default.numbers.defaultMinValue,
maxValue: Design.default.numbers.defaultMaxValue,
gab: Design.default.numbers.defaultGab
};
};
Object.defineProperty(BaseElementContainer.prototype, "model", {
get: function () {
return this.data.model;
},
set: function (value) {
this.data.model = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(BaseElementContainer.prototype, "imageObjectMenu", {
get: function () {
return this._imageObjectMenu;
},
set: function (value) {
this._imageObjectMenu = value;
},
enumerable: false,
configurable: true
});
return BaseElementContainer;
}(BaseContainer));
export { BaseElementContainer };
//# sourceMappingURL=BaseElementContainer.js.map