ASNMTAP

 view release on metacpan or  search on metacpan

applications/htmlroot/overlib_debug.js  view on Meta::CPAN

//\/////
//\  overLIB Debug Plugin
//\  This file requires overLIB 4.10 or later.
//\
//\  overLIB 4.05 - You may not remove or change this notice.
//\  Copyright Erik Bosrup 1998-2003. All rights reserved.
//\  Contributors are listed on the homepage.
//\  See http://www.bosrup.com/web/overlib/ for details.
//   $Revision: 1.6 $                $Date: 2005/02/01 22:18:44 $
//
//\/////
//\mini
////////
// PRE-INIT
// Ignore these lines, configuration is below.
////////
if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Debug Plugin.');
else {
var olZindex;
registerCommands('allowdebug');
////////
// PLUGIN FUNCTIONS
////////
// Parses Debug Parameters
function parseDebugExtras(pf, i, ar) {
	var k =  i, v;

	if (k < ar.length) {
		if (ar[k] == ALLOWDEBUG) { v = ar[k + 1]; if(typeof v == 'string') {v = ar[++k]; if (pf != 'ol_') setCanShowParm(v);} return k; }
	}

	return -1;
}
// Debug main routine
function showProperties() {
	var args = showProperties.arguments, sho, shoObj, vis, lvl = 0, istrt = 0, theDiv = 'showProps', txt = '';

	if (args.length == 0) return;
	if (args.length % 2 && typeof args[0] == 'string') {
		istrt = 1;
		theDiv = args[0];
	}

	sho = createDivContainer(theDiv);

	if (olNs4) {
		shoObj = sho;
		txt += '<table cellpadding="1" cellspacing="0" border="0" bgcolor="#000000"><tr><td>';
	} else {
		with(sho.style) {
			backgroundColor = '#ffffcc';
			padding = '5px';
			border = '1px #000000 solid';
		}
		shoObj = sho.style;
	}

	lvl = getLayerLevel(theDiv);

	if(typeof sho.position == 'undefined') {
		sho.position = new Pagelocation(10 + lvl*20, 10, 1);
		if(typeof olZindex == 'undefined') olZindex = getDivZindex();
		shoObj.zIndex = olZindex + 1 + lvl;
	}



( run in 1.656 second using v1.01-cache-2.11-cpan-d8267643d1d )