mattcasters opened a new pull request, #8290: URL: https://github.com/apache/hop/pull/8290
Hop Web renders pipeline and workflow graphs as an SVG overlay above the RAP canvas. The client was supposed to attach that overlay to the widget whose id the server sends. It did not. RAP does not put widget ids on DOM elements unless `enableUITests` is on (`Widget._renderHtmlIds`), so `document.getElementById(canvasId)` is usually `null`. The overlay then guessed "the first canvas larger than 500×500": | Document state | Guess returns | Symptom | |---|---|---| | Graph canvas absent, a dialog is open | the dialog's canvas | graph SVG renders inside the dialog | | Graph canvas absent, viewport small | `null` | blank canvas, no `canvasRender` request, no error | The same 500×500 fallback lived in `canvas-zoom.js`, so mouse-wheel zoom died under the same conditions. ## What changed - Resolve the RAP widget through the object registry (`rap.getObject` / `$el`, then `ObjectRegistry`) and take the nested `<canvas>` RAP's GC created inside it. - Do not guess by size. Wait for that widget's canvas (it is created lazily on the first GC). - Re-bind if RAP later replaces the node (floating the results panel, #8281). - Apply factory properties in the SVG renderer constructor so the first `attachListener` already has `canvasId`. ## Tests - `CanvasOverlayAttachTest` guards against the size-guess coming back. - `hop-ui-rap` unit tests (40) pass. Not verified in a live Hop Web session from this change. The blank-canvas and "graph in a dialog" cases still need a quick check at a small window size. Fixes #8286 ------------------------ Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [x] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`. - [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
