浏览代码

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

Previous implementation didn't work with tables.
Marek Lewandowski 6 年之前
父节点
当前提交
bf7ea9d18d
共有 1 个文件被更改,包括 3 次插入2 次删除
  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 ?