fix typo: GetClosetPoint --> GetClosestPoint
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1139,7 +1139,7 @@ class PlotCanvas(wx.Panel):
|
|||||||
l.append(cn)
|
l.append(cn)
|
||||||
return l
|
return l
|
||||||
|
|
||||||
def GetClosetPoint(self, pntXY, pointScaled= True):
|
def GetClosestPoint(self, pntXY, pointScaled= True):
|
||||||
"""Returns list with
|
"""Returns list with
|
||||||
[curveNumber, legend, index of closest point, pointXY, scaledXY, distance]
|
[curveNumber, legend, index of closest point, pointXY, scaledXY, distance]
|
||||||
list for only the closest curve.
|
list for only the closest curve.
|
||||||
@@ -1159,6 +1159,8 @@ class PlotCanvas(wx.Panel):
|
|||||||
mdist = min(dists) #Min dist
|
mdist = min(dists) #Min dist
|
||||||
i = dists.index(mdist) #index for min dist
|
i = dists.index(mdist) #index for min dist
|
||||||
return closestPts[i] #this is the closest point on closest curve
|
return closestPts[i] #this is the closest point on closest curve
|
||||||
|
|
||||||
|
GetClosetPoint = GetClosestPoint
|
||||||
|
|
||||||
def UpdatePointLabel(self, mDataDict):
|
def UpdatePointLabel(self, mDataDict):
|
||||||
"""Updates the pointLabel point on screen with data contained in
|
"""Updates the pointLabel point on screen with data contained in
|
||||||
@@ -2029,7 +2031,7 @@ class TestFrame(wx.Frame):
|
|||||||
if self.client.GetEnablePointLabel() == True:
|
if self.client.GetEnablePointLabel() == True:
|
||||||
#make up dict with info for the pointLabel
|
#make up dict with info for the pointLabel
|
||||||
#I've decided to mark the closest point on the closest curve
|
#I've decided to mark the closest point on the closest curve
|
||||||
dlst= self.client.GetClosetPoint( self.client._getXY(event), pointScaled= True)
|
dlst= self.client.GetClosestPoint( self.client._getXY(event), pointScaled= True)
|
||||||
if dlst != []: #returns [] if none
|
if dlst != []: #returns [] if none
|
||||||
curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst
|
curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst
|
||||||
#make up dictionary to pass to my user function (see DrawPointLabel)
|
#make up dictionary to pass to my user function (see DrawPointLabel)
|
||||||
|
Reference in New Issue
Block a user