facets
facets copied to clipboard
Facets Dive - Instructions for setting atlasUrl are underspecified
The instructions in the Facets Dive README.md state:
To specify the URL to an atlas to use, set the
atlasUrlproperty of the Dive Polymer Element in JavaScript (or theatlas-urlattribute in HTML).
This is insufficient. The distinction between atlasUrl and atlas-url should be made more clear by example. The README.md file should include this JS snippet to showcase the atlasUrl property:
const vis = document.querySelector('facets-dive');
vis.atlasUrl = 'your_sprite_image.png';
That file should also show this HTML snippet for the atlas-url attribute:
<facets-dive atlas-url="your_sprite_image.png"></facets-dive>
To serve the sprite atlas image from the bazel test server, you have to include it as a source in the test target of the BUILD file.
ts_web_library(
name = "test",
testonly = True,
srcs = [
"test.html",
"test.ts",
"your_sprite_image.png", ### ADD THIS ###
],
path = "/facets-dive/components/facets-dive",
deps = [
":facets_dive",
"//facets_dive/lib/test:externs",
"@org_tensorflow_tensorboard//tensorboard/components/tf_imports:web_component_tester",
],
)