소스 검색

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 ?