Andrew V Butt Sr %!s(int64=4) %!d(string=hai) anos
pai
achega
17b6350ce2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;