Skip to content

Commit

Permalink
CSS updates and avoid name clash
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun committed Mar 24, 2020
1 parent 73eedee commit c475956
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
7 changes: 5 additions & 2 deletions diode/webclient/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -645,14 +645,17 @@ table.diode_property_table tr:nth-child(even) {
content: "playlist_play"
}

.tooltip {
.sdfvtooltip {
background: rgba(0, 0, 0, 0.8);
color: white;
font-size: 16px;
font-family: "Segoe UI", Arial, sans-serif;
padding: 2px 5px 2px 5px;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: absolute;
display: none;
}
}
2 changes: 1 addition & 1 deletion diode/webclient/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ class SDFGRenderer {
// Tooltip HTML container
this.tooltip_container = document.createElement('div');
this.tooltip_container.innerHTML = '';
this.tooltip_container.className = 'tooltip';
this.tooltip_container.className = 'sdfvtooltip';
this.tooltip_container.onmouseover = () => this.tooltip_container.style.display = "none";
this.container.appendChild(this.tooltip_container);

Expand Down
9 changes: 7 additions & 2 deletions diode/webclient/sdfg_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ function sdfg_range_elem_to_string(range, settings=null) {
} else {
let endp1 = sdfg_property_to_string(range.end, settings) + ' + 1';
// Try to simplify using math.js
var mathjs = null;
try {
endp1 = math.simplify(endp1).toString();
} catch(e) {}
mathjs = window.math;
} catch(e) {
try { mathjs = math; } catch(e) {}
}
if (mathjs !== null)
endp1 = mathjs.simplify(endp1).toString();

preview += sdfg_property_to_string(range.start, settings) + ':' +
endp1;
Expand Down
3 changes: 2 additions & 1 deletion diode/webclient/sdfv.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
z-index: 999;
}

.context_menu_option {
Expand All @@ -62,7 +63,7 @@ h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin
width: 0;
}

.tooltip {
.sdfvtooltip {
background: rgba(0, 0, 0, 0.8);
color: white;
font-size: 16px;
Expand Down

0 comments on commit c475956

Please sign in to comment.