Closed Informate closed 1 week ago
there you go: https://github.com/tidev/titanium-sdk/pull/14099
it's "kind of" by design as the content/body/html doesn't have a height so it can't handle percentage values. It shrinks to the content (and yes, the background color is still the whole webview :shrug: )
I have searched and made sure there are no existing issues for the issue I am filing
Description
NOTE: Maybe this issue is not directly related to Titanium SDK but to the Canvas - HTML5 framework.
A canvas within a local webview is not sized correctly if its size is specified as a percentage. This applies both to settings via CSS and to the height and width attributes of the canvas itself.
FIXING WORKAROUND: Programmatically set the dimension of the canvas in pixels.
If you are using the Chart.js plugin instead use:
while setting maintainAspectRatio and responsive to false inside the chart options:
Expected Behavior
Canvas sizes correctly
Actual behavior
Height is reduced or the canvas looks like a square, same height as width!
Reproducible sample
X
Steps to reproduce
X
Platform
Android
SDK version you are using
12.4.0.GA
Alloy version you are using
No response