@ -61,7 +61,12 @@ $(document).ready(function () {
function bootstrap _visualselector ( ) {
if ( 1 ) {
// bootstrap it, this will trigger everything else
$ ( "img#selector-background" ) . bind ( 'load' , function ( ) {
$ ( "img#selector-background" ) . on ( "error" , function ( ) {
$ ( '.fetching-update-notice' ) . html ( "<strong>Ooops!</strong> The VisualSelector tool needs atleast one fetched page, please unpause the watch and/or wait for the watch to complete fetching and then reload this page." ) ;
$ ( '.fetching-update-notice' ) . css ( 'color' , '#bb0000' ) ;
$ ( '#selector-current-xpath' ) . hide ( ) ;
$ ( '#clear-selector' ) . hide ( ) ;
} ) . bind ( 'load' , function ( ) {
console . log ( "Loaded background..." ) ;
c = document . getElementById ( "selector-canvas" ) ;
// greyed out fill context
@ -83,6 +88,7 @@ $(document).ready(function () {
$ ( "img#selector-background" ) . attr ( 'src' , s )
}
// This is fired once the img src is loaded in bootstrap_visualselector()
function fetch _data ( ) {
// Image is ready
$ ( '.fetching-update-notice' ) . html ( "Fetching element data.." ) ;
@ -99,7 +105,8 @@ $(document).ready(function () {
reflow _selector ( ) ;
$ ( '.fetching-update-notice' ) . fadeOut ( ) ;
} ) ;
} ;
}
function set _scale ( ) {