fix: @idraw/board __getOriginContext

This commit is contained in:
chenshenhai 2021-08-22 14:29:36 +08:00
parent a1bd7cc697
commit f683c7f334
3 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View file

@ -60,7 +60,7 @@ class Board {
}
getOriginContext(): CanvasRenderingContext2D {
return this[_displayCtx];
return this[_originCtx];
}
getContext(): Context {

View file

@ -44,7 +44,7 @@
<div class="list">
<div class="box" id="mount-1">
<div class="title">setData</div>
<div class="title">setData and scale(2)</div>
</div>
<div class="box" id="mount-2">
<div class="title">exportDataURL('image/png')</div>
@ -138,7 +138,7 @@
const mount = document.querySelector('#mount-1');
const idraw = new iDraw(mount, opts, config);
idraw.setData(testData);
idraw.scale(2)
setTimeout(() => {
const pngSrc = idraw.exportDataURL('image/png');
const mount2 = document.querySelector('#mount-2');