Repository URL to install this package:
|
Version:
0.0.15 ▾
|
import * as tslib_1 from "tslib";
import { observable, action } from 'xmobx/mobx';
class MagnifierState {
constructor() {
this.states = {
showZoom: false,
// absolute image size
absWidth: 0,
absHeight: 0,
// magnifying glass offset
mgOffsetX: 0,
mgOffsetY: 0,
// mouse position relative to image
relX: 0,
relY: 0,
xPos: 0,
yPos: 0,
};
}
setData(data) {
this.states = data;
}
}
tslib_1.__decorate([
observable
], MagnifierState.prototype, "states", void 0);
tslib_1.__decorate([
action
], MagnifierState.prototype, "setData", null);
function toState() {
return new MagnifierState();
}
export { toState, MagnifierState };
//# sourceMappingURL=state.js.map