Changeset 598
- Timestamp:
- 07/09/08 11:36:51 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/tom-tweenlite/lib/com/modestmaps/core/MapExtent.as
r588 r598 158 158 var first:Location = locations[0] as Location; 159 159 var extent:MapExtent = new MapExtent(first.lat, first.lat, first.lon, first.lon); 160 for (var i:int = 1; i < locations.length; i++) { 160 for (var i:int = 1; i < locations.length; i++) 161 { 161 162 extent.enclose(locations[i]); 162 163 } branches/tom-tweenlite/lib/com/modestmaps/core/TileGrid.as
r597 r598 825 825 var screenPoint:Point = new Point(mapWidth * (zoomedColumn-tl.column) / cols, mapHeight * (zoomedRow-tl.row) / rows); 826 826 827 if (!context) context = this; 828 screenPoint = this.parent.localToGlobal(screenPoint); 829 screenPoint = context.globalToLocal(screenPoint); 827 if (context && context != this) 828 { 829 screenPoint = this.parent.localToGlobal(screenPoint); 830 screenPoint = context.globalToLocal(screenPoint); 831 } 830 832 831 833 return screenPoint; … … 833 835 public function pointCoordinate(point:Point, context:DisplayObject=null):Coordinate 834 836 { 835 if (!context) context = this; 836 point = context.localToGlobal(point); 837 point = this.globalToLocal(point); 837 if (context && context != this) 838 { 839 point = context.localToGlobal(point); 840 point = this.globalToLocal(point); 841 } 838 842 839 843 var p:Point = invertedMatrix.transformPoint(point);
