MCPcopy
hub / github.com/tensorflow/tfjs / getDrawArea

Function getDrawArea

tfjs-vis/src/render/render_utils.ts:21–33  ·  view source on GitHub ↗
(drawable: Drawable)

Source from the content-addressed store, hash-verified

19import {visor} from '../visor';
20
21export 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
35export function shallowEquals(
36 // tslint:disable-next-line:no-any

Callers 14

historyFunction · 0.90
fitCallbacksFunction · 0.90
perClassAccuracyFunction · 0.90
modelSummaryFunction · 0.90
layerFunction · 0.90
valuesDistributionFunction · 0.90
confusionMatrixFunction · 0.90
heatmapFunction · 0.90
barchartFunction · 0.90
linechartFunction · 0.90
tableFunction · 0.90

Calls 4

isSurfaceFunction · 0.90
isSurfaceInfoFunction · 0.90
visorFunction · 0.90
surfaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…