Fixing some bugs. fixing some scroll issues
This commit is contained in:
parent
6f217a0923
commit
5c76f9f3a2
6 changed files with 25 additions and 16 deletions
|
|
@ -128,9 +128,10 @@ function renderUI(ui: UIValue, ctx: CanvasRenderingContext2D, x: number, y: numb
|
|||
ctx.beginPath();
|
||||
ctx.rect(x, y, ui.w, ui.h);
|
||||
ctx.clip();
|
||||
renderUI(ui.child, ctx, x - ui.scrollX, y - ui.scrollY);
|
||||
ctx.restore();
|
||||
scrollRegions.push({ x, y, width: ui.w, height: ui.h, onScroll: ui.onScroll })
|
||||
renderUI(ui.child, ctx, x - ui.scrollX, y - ui.scrollY);
|
||||
// console.log("scrollable onScroll after render:", ui.onScroll, ui.w, ui.h)
|
||||
ctx.restore();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue