equal
deleted
inserted
replaced
349 fieldUL['top'] = off['top']; |
349 fieldUL['top'] = off['top']; |
350 fieldUL['left'] = off['left']; |
350 fieldUL['left'] = off['left']; |
351 fieldUL['right'] = off['left'] + dim['w']; |
351 fieldUL['right'] = off['left'] + dim['w']; |
352 fieldUL['bottom'] = off['top'] + dim['h']; |
352 fieldUL['bottom'] = off['top'] + dim['h']; |
353 |
353 |
354 //document.getElementById('debug').innerHTML = '<br /><br /><br /><br /><br />Mouse: x: '+mouseX+', y:' + mouseY + '<br />'; // + document.getElementById('debug').innerHTML; |
354 var mouseY_local = mouseY + getScrollOffset(); |
|
355 |
|
356 // document.getElementById('debug').innerHTML = '<br />Mouse: x: '+mouseX+', y:' + mouseY + '<br />' + document.getElementById('debug').innerHTML; |
355 |
357 |
356 if(bias) |
358 if(bias) |
357 { |
359 { |
358 if ( ( mouseX < fieldUL['left'] + 2 || mouseX > fieldUL['right'] - 5 ) || |
360 if ( ( mouseX < fieldUL['left'] + 2 || mouseX > fieldUL['right'] - 5 ) || |
359 ( mouseY < fieldUL['top'] - 2 || mouseY > fieldUL['bottom'] - 2 ) ) |
361 ( mouseY_local < fieldUL['top'] - 2 || mouseY_local > fieldUL['bottom'] - 2 ) ) |
360 { |
362 { |
361 return false; |
363 return false; |
362 } |
364 } |
363 } |
365 } |
364 else |
366 else |
365 { |
367 { |
366 if ( ( mouseX < fieldUL['left'] || mouseX > fieldUL['right'] ) || |
368 if ( ( mouseX < fieldUL['left'] || mouseX > fieldUL['right'] ) || |
367 ( mouseY < fieldUL['top'] || mouseY > fieldUL['bottom'] ) ) |
369 ( mouseY_local < fieldUL['top'] || mouseY_local > fieldUL['bottom'] ) ) |
368 return false; |
370 return false; |
369 } |
371 } |
370 |
372 |
371 return true; |
373 return true; |
372 |
|
373 /* |
|
374 var tgt = event.target; |
|
375 if ( !tgt ) |
|
376 return false; |
|
377 do { |
|
378 if ( tgt == obj ) |
|
379 return true; |
|
380 tgt = tgt.parentNode; |
|
381 } while (tgt.tagName.toLowerCase() != 'body' ); |
|
382 return false; |
|
383 */ |
|
384 } |
374 } |
385 |
375 |
386 function jBoxGarbageCollection(e) |
376 function jBoxGarbageCollection(e) |
387 { |
377 { |
388 setMousePos(e); |
378 setMousePos(e); |