xushiting 2 years ago
parent
commit
41f91e5030

File diff suppressed because it is too large
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 4 - 3
src/graphic/Geometry/Img.js

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