You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2022/03/23 19:13:18 UTC
[camel-karavan] branch main updated: Fix for #226 properly set width/height of area based on scrollWidth/scrollHeight of element (#227)
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 835e78d Fix for #226 properly set width/height of area based on scrollWidth/scrollHeight of element (#227)
835e78d is described below
commit 835e78d947313a05a7256fa74eba5e5da2a51ff7
Author: cgballance <cg...@gmail.com>
AuthorDate: Wed Mar 23 15:13:14 2022 -0400
Fix for #226 properly set width/height of area based on scrollWidth/scrollHeight of element (#227)
* resolve root to normalize just like fullpath
* use scrollWidth in case the area is larger than the view
---
karavan-designer/src/designer/route/RouteDesigner.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/karavan-designer/src/designer/route/RouteDesigner.tsx b/karavan-designer/src/designer/route/RouteDesigner.tsx
index aa5c31b..31d2914 100644
--- a/karavan-designer/src/designer/route/RouteDesigner.tsx
+++ b/karavan-designer/src/designer/route/RouteDesigner.tsx
@@ -208,8 +208,8 @@ export class RouteDesigner extends React.Component<Props, State> {
onResizePage(el: HTMLDivElement | null) {
const rect = el?.getBoundingClientRect();
- if (el && rect && (rect?.width !== this.state.width || rect.height !== this.state.height || rect.top !== this.state.top || rect.left !== this.state.left)) {
- this.setState({width: rect.width, height: rect.height, top: rect.top, left: rect.left});
+ if (el && rect && (el.scrollWidth !== this.state.width || el.scrollHeight !== this.state.height || rect.top !== this.state.top || rect.left !== this.state.left)) {
+ this.setState({width: el.scrollWidth, height: el.scrollHeight, top: rect.top, left: rect.left})
}
}