wasm: update picture size for file loading

The width and height was not changed, if there is newly loaded file.
As a result, the scale was not correct after loading a file.
This commit is contained in:
Shinwoo Kim 2020-12-15 17:16:33 +09:00 committed by Hermet Park
parent e9772efbd1
commit 54e5cdee10

View file

@ -55,6 +55,11 @@ public:
return false;
}
/* need to reset size to calculate scale in Picture.size internally
before calling updateSize */
mWidth = 0;
mHeight = 0;
updateSize(width, height);
if (mSwCanvas->push(unique_ptr<Picture>(mPicture)) != Result::Success) {