function makeCanvasSizeFitDivSize() {
var div = mainDiagram.div;
div.style.width = "1278px";
div.style.height = "618px";
mainDiagram.requestUpdate();
}
Even though I hard coded width and height for testing purpose, canvas’ size are still smaller then the Div(Again, if i run it on IE it is the same but different on Chrome)
We checked the output image’s properties, and we notice that the size of the image is same as the Div size. Which means the canvas size still some how doesn’t change.
Now I think about it, if it is CSS problem, how come only some PC/user has the problem. And we even change the monitor to check(Testing machine has smaller monitor and we thought that might be the reason, so we put our monitor on the testing machine)
Thanks for the reply, and fun thing happened. Today we need to deploy(update) our program on the official website so that the user can use our new added features.
So basically we moved our testing website stuff to the official website(without changing any code). Then we checked the official website, the transparent part is gone! However on the same PC, we run the testing website, the transparent part will occur on the testing website…
Here is the url for the codepen, i tried just purely move the front end stuff into it
But anyways, thank you and walter for helping me get through the problem. i will keep u guys update afterward!
PS1. On the official website’s code, I haven’t add the makeCanvasSizeFitDivSize function yet, and the transparent part is gone already.
PS2. The situation I had mention on those previous post are all on the testing website, because I can only modify stuff on testing website.
Hi
i have the same issue trying to figure out the problem but cant get anything
according to this post try every thing mentioned but no success
now i got the point its about the at my system every thing working fine but at my coworkers system its adding black area or background size is shorter then the actual size
here is some stats and result
my system:
Screen size: 15.6"
Resolution: 1368x768
Operating System: ubuntu 18.04.1 LTS
System: DELL Inspiron15
Exported image:
i am trying to solve this from last few weeks but no success
try different type of code like
mydiagram.makeImage
mydiagram.makeImageData
canvas to image
Help need please
Thanks
I have try all three functions Diagram.makeImage, makeImageData and Diagram.makeSvg
but result i same.
Mian div element has widht 100% or auto to fit in every screen size this is why both HTML images has different size but i have also try with fixed width but no success.
All other machines in my office export image with black area but
my system exporting image without any problem
I have try different browsers on other machines but same result
I have also create a code example for debugging and sent to gojs.
Thanks
Thanks. Simon will respond, but in the meantime I suggest that you see why you are still using version 1.6.22. I recall that a long time ago we did fix a bug that was somewhat similar to what you report, but I don’t remember what version that was – it could have been after 1.6.22.
@simon yes i just got this and remove this line @walter i answered your questions in above comment
in my system
Firefox Quantum 64.0
Chrome: Version 71.0.3578.98 (Official Build) (64-bit)
Making image perfectly
Problemed system :
Firefox Quantum 64.0
Chrome: Version 70.0.3538.77 (Official Build) (64-bit)
So you are now using 1.8.23. Could you please use 1.8.36 instead? There have been bug fixes since 1.8.23.
What is your call to Diagram.makeImageData?
Do you have any clue why the Canvas sizes are different on their machines? Could you debug on their machines to see whether there is any CSS that is affecting the Canvas element or any Div element within the Diagram’s Div element?
some time chart has to many entities and then image become too big
and default max size is shorted then image
but i have set permission on export image if nodes are more then 400 then user is not able to make image but black area in image is coming in every size of image as i show in my post that image is too large
Hi after long wasting of time i got the problem
My tester team was testing my app for different resolutions by changing browser’s zoom level
black area images are exported with browser’s zoom level out
i got this problem when i was debugging for different size of canvas
I am really sorry this is not gojs bug
but after got this problem i try to regenerate this image with black area but with zoom out even you reload the page with zoom out image should be with black area
really don’t know why this happen
All your responses are appreciable
Thank you very much