Skip to content

Commit

Permalink
Merge pull request #67 from mlexchange/fix-safari-css-filter
Browse files Browse the repository at this point in the history
🐛💄 safari css filter
  • Loading branch information
danton267 committed Jul 31, 2023
2 parents 3ad993a + ab8ead5 commit 1e3b2a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ function changeFilters(js_path, brightness, contrast) {
if (element) {
// Apply the new brightness value to the element
element.style.filter = `brightness(${brightness}%) contrast(${contrast}%)`;
element.style.webkitFilter = `brightness(${brightness}%) contrast(${contrast}%)`;
}
}
2 changes: 1 addition & 1 deletion callbacks/control_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def annotation_visibility(checked, delete_all, annotation_store, figure, image_i
"""
function dash_filters_clientside(brightness, contrast) {
console.log(brightness, contrast)
js_path = "#image-viewer > div.js-plotly-plot > div > div > svg:nth-child(1) > g.cartesianlayer > g > g.plot > g"
js_path = "#image-viewer > div.js-plotly-plot > div > div > svg:nth-child(1)"
changeFilters(js_path, brightness, contrast)
return ""
}
Expand Down

0 comments on commit 1e3b2a5

Please sign in to comment.