mirror of
https://github.com/idrawjs/idraw
synced 2026-05-24 10:08:34 +00:00
fix: @idraw/board __getOriginContext
This commit is contained in:
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 |
|
|
@ -60,7 +60,7 @@ class Board {
|
|||
}
|
||||
|
||||
getOriginContext(): CanvasRenderingContext2D {
|
||||
return this[_displayCtx];
|
||||
return this[_originCtx];
|
||||
}
|
||||
|
||||
getContext(): Context {
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue