VisualFilter - check previously set filters were set before highlighting

This commit is contained in:
dgtlmoon
2022-11-19 17:37:51 +01:00
parent d7482c8d6a
commit d0d191a7d1

View File

@@ -13,7 +13,7 @@ $(document).ready(function() {
// redline highlight context
var ctx;
var current_default_xpath;
var current_default_xpath=[];
var x_scale=1;
var y_scale=1;
var selector_image;
@@ -57,7 +57,6 @@ $(document).ready(function() {
bootstrap_visualselector();
function bootstrap_visualselector() {
if (1) {
// bootstrap it, this will trigger everything else
@@ -68,7 +67,11 @@ $(document).ready(function() {
xctx = c.getContext("2d");
// redline highlight context
ctx = c.getContext("2d");
if ($("#include_filters").val().trim().length) {
current_default_xpath = $("#include_filters").val().split(/\r?\n/g);
} else {
current_default_xpath = [];
}
fetch_data();
$('#selector-canvas').off("mousemove mousedown");
// screenshot_url defined in the edit.html template