Highlight groups

This commit is contained in:
Ian Gulliver
2019-07-10 23:46:25 +00:00
parent dda2102f99
commit c52f93d6d2
5 changed files with 31 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ class Grid {
break;
case 'group':
this.drawGroup(step.min, step.max, step.label);
this.drawGroup(step.min, step.max, step.label, step.highlight);
break;
case 'line':
@@ -83,12 +83,13 @@ class Grid {
this.toSize_.push(elem);
}
drawGroup(min, max, label) {
drawGroup(min, max, label, highlight) {
let group = document.createElement('div');
this.container_.appendChild(group);
group.classList.add('gridGroup');
group.style.gridColumn = (min[0] + 1) + ' / ' + (max[0] + 2);
group.style.gridRow = (min[1] + 1) + ' / ' + (max[1] + 2);
group.classList.toggle('highlight', highlight);
if (label != '') {
let labelNode = document.createElement('div');