js/figure.js
/**
 * Creates a figure div with the given title text, also returning an area that a key can be added to.
 **/
Creates a figure div with the given title text, also returning an area that a key can be added to.
Creates a figure div with the given title text also returning an area that a key can be added to .
function createFigure(titleText, figureDiv) {
	if(typeof figureDiv == 'undefined' || figureDiv == null)
		figureDiv = document.createElement('div');
	figureDiv.classList.add('figure');
	if(typeof titleText != 'undefined')
		figureDiv.innerHTML = "<h2>"+titleText+"</h2>";
	let keyArea = document.createElement('div');
	figureDiv.appendChild(keyArea);
	keyArea.classList.add('key');
	return figureDiv;
}
function createFigure ( titleText , figureDiv ) { if ( typeof figureDiv == 'undefined' || figureDiv == null ) figureDiv = document . createElement ( 'div' ) ; figureDiv . classList . add ( 'figure' ) ; if ( typeof titleText != 'undefined' ) figureDiv . innerHTML = "<h2>" + titleText + "</h2>" ; let keyArea = document . createElement ( 'div' ) ; figureDiv . appendChild ( keyArea ) ; keyArea . classList . add ( 'key' ) ; return figureDiv ; }
Creates a figure div with the given title text, also returning an area that a key can be added to.
Creates a figure div with the given title text also returning an area that a key can be added to .