| 151 | } |
| 152 | } |
| 153 | class Seperator<x, y> implements menuPart<x, y> { |
| 154 | private visible?: (obj1: x, obj2: y) => boolean; |
| 155 | group?: string; |
| 156 | constructor(visible?: (obj1: x, obj2: y) => boolean, group?: string) { |
| 157 | this.visible = visible; |
| 158 | this.group = group; |
| 159 | } |
| 160 | makeContextHTML(obj1: x, obj2: y, menu: HTMLDivElement): void { |
| 161 | if (!this.visible || this.visible(obj1, obj2)) { |
| 162 | if ( |
| 163 | !menu.children[menu.children.length - 1] || |
| 164 | menu.children[menu.children.length - 1].tagName === "HR" |
| 165 | ) { |
| 166 | return; |
| 167 | } |
| 168 | menu.append(document.createElement("hr")); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | class ContextMenuText<x, y> implements menuPart<x, y> { |
| 174 | private visible?: (obj1: x, obj2: y) => boolean; |
nothing calls this directly
no outgoing calls
no test coverage detected