Added menu cloning.

Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
This commit is contained in:
Lea Anthony
2024-03-06 11:42:19 -06:00
committed by Travis McLane
parent 809863d61a
commit 3d93c83920
9 changed files with 111 additions and 39 deletions
@@ -11,6 +11,15 @@ type ContextMenuData struct {
Data any `json:"data"`
}
func (d ContextMenuData) clone() *ContextMenuData {
return &ContextMenuData{
Id: d.Id,
X: d.X,
Y: d.Y,
Data: d.Data,
}
}
const (
ContextMenuOpen = 0
)