ZachPhillipsGary / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

How many tabs in an InfoBubble #153

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I had a need to find out how many tabs there are in an infobubble, but couldn't 
find a reference to that from the Javascript object. The demo code refers to 
using a document.getElementById('tab-index').value, but that always returned 
null.

I added this to the javascript file:

/**
 * Retreive the number of tabs on the object
 **/
InfoBubble.prototype.numTabs = function(){
    return this.tabs_.length;
}

InfoBubble.prototype['numTabs'] = InfoBubble.prototype.numTabs;

And now I can get the number of tabs there are by saying infoBubble.numTabs();

Original issue reported on code.google.com by rkolo...@gmail.com on 6 Jan 2012 at 3:06