function PosNegColumn(x,starty,endy,blocks,blocksheight,colcols,blockcols,abacus,value,aging,rods){ if (aging === undefined) aging=true; if (rods === undefined) rods=false; this.elements = []; this.colWidthScale = 8/33; this.blockcols = blockcols; this.value = value; this.nullheight = 0; this.abaheight = 0; this.drawColumn = function(){ //grey: A0A0A0, stroke 6B6B6B var width = this.colWidthScale*abacus.blockWidth; var height = endy-starty; //console.log(width); //console.log(height); //console.log(x); //console.log(starty); var rect = new createjs.Shape(); rect.graphics.beginFill(this.blockcols[0]).drawRect(-1*(width/2),0,width,height); rect.graphics.beginStroke(this.blockcols[1]); rect.graphics.setStrokeStyle(width/8); rect.graphics.moveTo(-1*(width/2),0); rect.graphics.lineTo(-1*(width/2),height); rect.graphics.moveTo((width/2),0); rect.graphics.lineTo((width/2),height); rect.x = x; rect.y = starty; abacus.stage.addChild(rect); } this.updateY = function(){ var bmargin = (abacus.verticalMargin*abacus.blockHeight); var start = starty+(bmargin/2); var incr = abacus.blockHeight+bmargin; for (var i = 0; ii){ this.elements[i].updateValue(true,true); } else if (this.elements.lastIndexOf(null)