VisualFilter - check previously set filters were set before highlighting
This commit is contained in:
@@ -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,21 +57,24 @@ $(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...");
|
||||||
c = document.getElementById("selector-canvas");
|
c = document.getElementById("selector-canvas");
|
||||||
// greyed out fill context
|
// greyed out fill context
|
||||||
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) {
|
||||||
fetch_data();
|
current_default_xpath = $("#include_filters").val().split(/\r?\n/g);
|
||||||
$('#selector-canvas').off("mousemove mousedown");
|
} else {
|
||||||
// screenshot_url defined in the edit.html template
|
current_default_xpath = [];
|
||||||
|
}
|
||||||
|
fetch_data();
|
||||||
|
$('#selector-canvas').off("mousemove mousedown");
|
||||||
|
// screenshot_url defined in the edit.html template
|
||||||
}).attr("src", screenshot_url);
|
}).attr("src", screenshot_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user