(drawable: Drawable)
| 19 | import {visor} from '../visor'; |
| 20 | |
| 21 | export function getDrawArea(drawable: Drawable): HTMLElement { |
| 22 | if (drawable instanceof HTMLElement) { |
| 23 | return drawable; |
| 24 | } else if (isSurface(drawable)) { |
| 25 | return drawable.drawArea; |
| 26 | } else if (isSurfaceInfo(drawable)) { |
| 27 | const surface = visor().surface( |
| 28 | {name: drawable.name, tab: drawable.tab, styles: drawable.styles}); |
| 29 | return surface.drawArea; |
| 30 | } else { |
| 31 | throw new Error('Not a drawable'); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | export function shallowEquals( |
| 36 | // tslint:disable-next-line:no-any |
no test coverage detected
searching dependent graphs…