From: Robert R. <rai...@us...> - 2002-01-24 17:02:38
|
Update of /cvsroot/dynapi/dynapi2x/src/dynapi/gui In directory usw-pr-cvs1:/tmp/cvs-serv17952/src/dynapi/gui Modified Files: dynimage.js Log Message: Added constructor to dynimage to return img string (toString()) Index: dynimage.js =================================================================== RCS file: /cvsroot/dynapi/dynapi2x/src/dynapi/gui/dynimage.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dynimage.js 2002/01/11 20:51:55 1.1 --- dynimage.js 2002/01/24 17:02:35 1.2 *************** *** 6,10 **** */ ! DynImage = {}; DynImage.image = []; DynImage.getImage = function(src,w,h) { --- 6,19 ---- */ ! function DynImage(img,id) { ! this.img = img; ! this.id = id; ! }; ! DynImage.prototype.toString = function() { ! return "<img src=\""+this.img.src+"\""+ ! (this.id?" id=\""+this.id+"\"":"")+ ! (this.img.width?" width=\""+this.img.width+"\"":"")+ ! (this.img.height?" height=\""+this.img.height+"\"":"")+">"; ! }; DynImage.image = []; DynImage.getImage = function(src,w,h) { |