@ -61,7 +61,12 @@ $(document).ready(function () {
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" ) . 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..." ) ;
console . log ( "Loaded background..." ) ;
c = document . getElementById ( "selector-canvas" ) ;
c = document . getElementById ( "selector-canvas" ) ;
// greyed out fill context
// greyed out fill context
@ -83,6 +88,7 @@ $(document).ready(function () {
$ ( "img#selector-background" ) . attr ( 'src' , s )
$ ( "img#selector-background" ) . attr ( 'src' , s )
}
}
// This is fired once the img src is loaded in bootstrap_visualselector()
function fetch _data ( ) {
function fetch _data ( ) {
// Image is ready
// Image is ready
$ ( '.fetching-update-notice' ) . html ( "Fetching element data.." ) ;
$ ( '.fetching-update-notice' ) . html ( "Fetching element data.." ) ;
@ -99,7 +105,8 @@ $(document).ready(function () {
reflow _selector ( ) ;
reflow _selector ( ) ;
$ ( '.fetching-update-notice' ) . fadeOut ( ) ;
$ ( '.fetching-update-notice' ) . fadeOut ( ) ;
} ) ;
} ) ;
} ;
}
function set _scale ( ) {
function set _scale ( ) {