1234567891011121314151617181920212223242526 |
- import { coordinate } from "../Coordinate";
- import { dataService } from "../Service/DataService";
- export default class MoveMagnifier {
- constructor() {}
- moveFullMagnifier(position, magnifierId, index) {
- let magnifier = dataService.getMagnifier(magnifierId);
- //移动放大镜清除图片信息
- magnifier.setPhotoUrl(null)
- magnifier.setPhotoImg(null)
- if (index == 0) {
- magnifier.setPosition(position);
- } else {
- const popPosition = coordinate.getScreenXY(position);
- magnifier.popPosition = {
- x: popPosition.x,
- y: popPosition.y,
- };
- magnifier.setPopPosition(position);
- }
- }
- }
- const moveMagnifier = new MoveMagnifier();
- export { moveMagnifier };
|