Andrew V Butt Sr 4 سال پیش
والد
کامیت
17b6350ce2
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      gui/src/2D/controls/image.ts

+ 2 - 2
gui/src/2D/controls/image.ts

@@ -827,8 +827,8 @@ export class Image extends Control {
         let bottomHeight = this._imageHeight - this._sliceBottom;
         let centerWidth = width - leftWidth - rightWidth;
         let centerHeight = height - topHeight - bottomHeight;
-        let widthFactor = width / this._currentMeasure.width;
-        let heightFactor = height / this._currentMeasure.height;
+        let widthFactor = this._currentMeasure.width / width;
+        let heightFactor = this._currentMeasure.height / height;
         let wfh = widthFactor * 0.5;
         let hfh = heightFactor * 0.5;
         let leftTargetWidth = leftWidth * widthFactor;