| 171 | } |
| 172 | |
| 173 | class ContextMenuText<x, y> implements menuPart<x, y> { |
| 174 | private visible?: (obj1: x, obj2: y) => boolean; |
| 175 | group?: string; |
| 176 | text: string; |
| 177 | constructor(text: string, visible?: (obj1: x, obj2: y) => boolean, group?: string) { |
| 178 | this.visible = visible; |
| 179 | this.group = group; |
| 180 | this.text = text; |
| 181 | } |
| 182 | makeContextHTML(obj1: x, obj2: y, menu: HTMLDivElement): void { |
| 183 | if (!this.visible || this.visible(obj1, obj2)) { |
| 184 | const span = document.createElement("span"); |
| 185 | span.textContent = this.text; |
| 186 | menu.append(span); |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | class ContextMenuSlider<x, y> implements menuPart<x, y> { |
| 191 | private visible?: (obj1: x, obj2: y) => boolean; |
| 192 | group?: string; |
nothing calls this directly
no outgoing calls
no test coverage detected