Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alex transparency #1126

Merged
merged 6 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web-server/components/Model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Model = (props: ModelProps) => {
</em>
</small>
</a>
<span className='float-right'>
<span className='float-right ml-3'>
<button
type='button'
className='btn btn-sm btn-outline-danger'
Expand Down
16 changes: 8 additions & 8 deletions web-server/js/slycat-color-maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,23 @@ export default {
opacity: "0.7",
colors: [d3.rgb(0, 0, 255), d3.rgb(0, 255, 255), d3.rgb(255, 255, 0), d3.rgb(255, 0, 0)],
},
grayscale_day: {
label: "Grayscale Day",
background: WHITE,
grayscale_night: {
label: "Grayscale Night",
background: GRAY2,
// ToDo: fix this, null and outofdomain colors need to be different than normal colors
null_color: GRAY4,
outofdomain_color: BLACK,
scatterplot_grid_color: GRAY1,
scatterplot_grid_color: GRAY3,
opacity: "0.6",
colors: [d3.rgb(255, 255, 255), d3.rgb(0, 0, 0)],
},
grayscale_night: {
label: "Grayscale Night",
background: GRAY2,
grayscale_day: {
label: "Grayscale Day",
background: WHITE,
// ToDo: fix this, null and outofdomain colors need to be different than normal colors
null_color: GRAY4,
outofdomain_color: BLACK,
scatterplot_grid_color: GRAY3,
scatterplot_grid_color: GRAY1,
opacity: "0.6",
colors: [d3.rgb(255, 255, 255), d3.rgb(0, 0, 0)],
},
Expand Down
2 changes: 2 additions & 0 deletions web-server/plugins/slycat-parameter-image/css/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@
#scatterplot .image-frame.html {
position: absolute;
background-color: black;
/* Checkerboard background */
/* background: repeating-conic-gradient(#808080 0% 25%, white 0% 50%) 50% / 20px 20px; */
border: 1px solid black;
height: auto;
padding-bottom: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,10 @@ $.widget("parameter_image.scatterplot", {
self._schedule_update({ render_selection: true });
} else if (key == "colorscale") {
self._schedule_update({ render_data: true, render_selection: true });
// Update frame backgrounds to colormap null color
d3.selectAll(".image-frame").style({
"background-color": slycat_color_maps.get_null_color(window.store.getState().colormap),
});
} else if (key == "width") {
// console.debug(`width option set to %o: %o`, key, value);
self._schedule_update({
Expand Down Expand Up @@ -1887,6 +1891,8 @@ $.widget("parameter_image.scatterplot", {
width: img.width + "px",
height: img.height + 20 + "px",
"z-index": self.options.highest_z_index,
// Set frame background to colormap null color
"background-color": slycat_color_maps.get_null_color(window.store.getState().colormap),
})
.attr("class", img.image_class + " image-frame scaffolding html ")
.classed("selected", img.current_frame)
Expand Down