VisualFilter - check previously set filters were set before highlighting

test-improvements
dgtlmoon 2 years ago
parent d7482c8d6a
commit d0d191a7d1

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

Loading…
Cancel
Save