Jelajahi Sumber

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

Previous implementation didn't work with tables.
Marek Lewandowski 6 tahun lalu
induk
melakukan
bf7ea9d18d
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      packages/ckeditor5-widget/src/resizecontext.js

+ 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 ?