skip hidden, prefix xpath

550-visual-selector
dgtlmoon 3 years ago
parent 573e92c5e5
commit d7c5a53315

@ -85,6 +85,9 @@ class Fetcher():
if (!xpath_result) { if (!xpath_result) {
xpath_result = getXPath(elements[i]); xpath_result = getXPath(elements[i]);
} }
if(window.getComputedStyle(elements[i]).visibility === "hidden") {
continue;
}
size_pos.push({ size_pos.push({
xpath: xpath_result, xpath: xpath_result,

@ -137,7 +137,7 @@ $(document).ready(function() {
} }
var sel = selector_data[current_selected_i]; var sel = selector_data[current_selected_i];
$("#css_filter").val(sel.xpath); $("#css_filter").val('xpath:'+sel.xpath);
xctx.fillStyle = 'rgba(225,225,225,0.8)'; xctx.fillStyle = 'rgba(225,225,225,0.8)';
xctx.fillRect(0,0,c.width, c.height); xctx.fillRect(0,0,c.width, c.height);
xctx.clearRect(sel.left * x_scale, sel.top * y_scale, sel.width * x_scale, sel.height * y_scale); xctx.clearRect(sel.left * x_scale, sel.top * y_scale, sel.width * x_scale, sel.height * y_scale);

Loading…
Cancel
Save