[ka-Map-dev] [Bug 1425] New: viewportWidth/Height not correctly calculated in kaMap.js

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Wed Apr 12 16:07:46 EDT 2006


http://bugzilla.maptools.org/show_bug.cgi?id=1425

           Summary: viewportWidth/Height not correctly calculated in
                    kaMap.js
           Product: ka-Map
           Version: 0.3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: ka-map-dev at lists.maptools.org
        ReportedBy: tim at commenspace.org


The kaMap class in kaMap.js determines viewportWidth and viewportHeight using:

    //viewport width and height are used in many calculations
    this.viewportWidth = safeParseInt(this.domObj.style.width);
    this.viewportHeight = safeParseInt(this.domObj.style.height);

These are always zero.  Looks like somebody figured this out and wrote
kaMap.prototype.getObjectWidth (and Height).  So, I think things would work out
better with:

    //viewport width and height are used in many calculations
    this.viewportWidth = this.getObjectWidth(this.domObj);
    this.viewportHeight = this.getObjectHeight(this.domObj);


I'll commit this change unless someone let's me know that I'm sorely mistaken. 
(Note that this doesn't make any difference for folks using the startUp.js and a
full width/height viewport - it only becomes a problem when you try to use a
smaller div for the viewport.)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the ka-Map-dev mailing list