|
@@ -1,7 +1,8 @@
|
|
|
+import { coordinate } from "../Coordinate.js";
|
|
|
import { mathUtil } from "../Util/MathUtil.js";
|
|
|
import VectorType from "../enum/VectorType.js";
|
|
|
import Geometry from "./Geometry";
|
|
|
-import {api} from '@/store/sync.ts'
|
|
|
+import { api } from "@/store/sync.ts";
|
|
|
|
|
|
export default class Img extends Geometry {
|
|
|
constructor(src, vectorId) {
|
|
@@ -39,8 +40,8 @@ export default class Img extends Geometry {
|
|
|
}
|
|
|
|
|
|
setBounding() {
|
|
|
- const width = this.imageData.width;
|
|
|
- const height = this.imageData.height;
|
|
|
+ const width = this.imageData.width * coordinate.ratio;
|
|
|
+ const height = this.imageData.height * coordinate.ratio;
|
|
|
this.bounding = [];
|
|
|
this.bounding[0] = {
|
|
|
x: this.center.x - width / 2,
|