8
0
Эх сурвалжийг харах

Internal: adjusted how aspect ratio is computed if no custom function is provided.

Previous implementation didn't work with tables.
Marek Lewandowski 6 жил өмнө
parent
commit
bf7ea9d18d

+ 3 - 2
packages/ckeditor5-widget/src/resizecontext.js

@@ -122,9 +122,10 @@ export default class ResizeContext {
 
 		this.referenceCoordinates = getAbsoluteBoundaryPoint( resizeHost, reversedPosition );
 
+		// @todo: this part might be lazy used only in case if getAspectRatio is not given as it might force repaint.
 		this.originalSize = {
-			x: resizeHost.width,
-			y: resizeHost.height
+			x: resizeHost.clientWidth,
+			y: resizeHost.clientHeight
 		};
 
 		this.aspectRatio = this.options.getAspectRatio ?