aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Rogan Creswick <creswick@gmail.com>2013-11-01 16:15:23 -0700
committerGravatar Rogan Creswick <creswick@gmail.com>2013-11-01 16:15:23 -0700
commit0c8f3ca939c7df38234ff840bf1707bd86f4b447 (patch)
treec7a2251d7a6245427a4e8a6277ab00a02a1afa77
parentf1d3202e54fac77246d56977c3ae12bf454c4da2 (diff)
trying out an overlaid div for highlighting
-rw-r--r--src/js/fiveui/injected/ui.js25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/js/fiveui/injected/ui.js b/src/js/fiveui/injected/ui.js
index 2da4226..eb22136 100644
--- a/src/js/fiveui/injected/ui.js
+++ b/src/js/fiveui/injected/ui.js
@@ -184,7 +184,7 @@
var ppos = this.$problems.position();
var spos = this.$stats.position();
- this.$problems.height(spos.top - ppos.top)
+ this.$problems.height(spos.top - ppos.top);
// notify the backend about the new height
this.port.emit('Size', {
@@ -425,15 +425,29 @@
var oldStyle = elt.attr('style');
core.maskRules(function() {
- elt.attr('style', 'background-color: rgba(255,0,0,0.3); background-image: none;');
- elt.addClass('uic-problem');
+ var newDiv = $('<div></div>');
+ newDiv.attr('id', 'hlDiv-'+prob.hash);
+ newDiv.offset(elt.offset());
+ newDiv.height(elt.height());
+ newDiv.width(elt.width());
+ newDiv.css({ 'position': 'absolute'
+ , 'background-color': '#FF0000'
+ , 'opacity' : '0.3'
+ , 'zIndex' : 10000
+ });
+ $('body').append(newDiv);
});
+// core.maskRules(function() {
+// elt.attr('style', 'background-color: rgba(255,0,0,0.3); background-image: none;');
+// elt.addClass('uic-problem');
+// });
+
// record the element for the future
core.highlighted[prob.hash] = {
highlighted: 1,
oldStyle: oldStyle,
- }
+ };
}
};
@@ -455,6 +469,9 @@
}
elt.removeClass('uic-problem');
+
+ // remove overlay divs:
+ $5('#hlDiv-'+prob.hash).remove();
});
delete core.highlighted[prob.hash];