added selection feature

This commit is contained in:
Nikolai Fesenko
2025-11-26 05:27:59 +01:00
parent b435f46c8f
commit 8686f6da80
3 changed files with 63 additions and 2 deletions

View File

@@ -27,8 +27,17 @@ rect.update = () => {
menu.addElement(rect);
menu.addElement( new Circle());
menu.makeSelectable(rect);
rect.setCenterOrigin();
rect.draw_selection = (ctx) => { rect.drawStroke(ctx)}
menu.select(rect);
menu.load();
setTimeout(() => {
menu.unselect();
}, 3000);