-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
When calling /renderwindow/preview/?width=426px&height=240px, the query parameters (width, height) have no effect, because they are overridden by the config file, see code:
SPX-GC/routes/routes-application.js
Lines 2106 to 2140 in 3bfa2c8
| function getResolutionFromConfig(cfg, postRequest) { | |
| // Added in 1.3.0 to get resolution | |
| // returns CSS values: {width: x, height: y} | |
| let sizeID = cfg.general.resolution || 'HD'; | |
| let width = '1920px'; | |
| let height = '1080px'; | |
| if (postRequest.width ) { width = postRequest.width } | |
| if (postRequest.height) { height = postRequest.height } | |
| switch(sizeID) { | |
| case '4K': | |
| width = '3840px' | |
| height = '2160px' | |
| break; | |
| case 'AUTO': | |
| width = '100vw' | |
| height = '100vh' | |
| break; | |
| default: | |
| // HD is the default | |
| width = '1920px' | |
| height = '1080px' | |
| break; | |
| }; | |
| return { | |
| width: width, | |
| height: height, | |
| }; | |
| } // getResolutionFromConfig ended |
Based on the existing code, I assume that returning an object with width and height if query parameters are present solves the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels