Skip to content

Commit

Permalink
take RGB or RGBY to display the colorsample
Browse files Browse the repository at this point in the history
  • Loading branch information
ovanderzee committed Sep 16, 2020
1 parent 99c5fba commit cf06cb4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/openSeadragonDeltaEMap.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/openSeadragonDeltaEMap.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion module/openSeadragonDeltaEMap.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion module/openSeadragonDeltaEMap.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/displayTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ const renderData = (event, table, userData) => {

// process element data
let colorSquare = ''
if (userData.observed && userData.observed.RGB) {
let color = `rgb(${userData.observed.RGB.join()})`
const rgbSource = userData.observed.RGB || userData.observed.RGBY
if (userData.observed && rgbSource) {
const color = `rgb(${rgbSource[0]},${rgbSource[1]},${rgbSource[2]})`
colorSquare = `<deltaecolor style="background: ${color};"></deltaecolor>`
}
table.innerHTML += `<caption>
Expand Down

0 comments on commit cf06cb4

Please sign in to comment.