+
Skip to content

Conversation

anandthakker
Copy link

Closes #2

@mourner dunno if you actually want this in, but I needed it for something so here ya go


return [bestCell.x, bestCell.y];
var result = [bestCell.x, bestCell.y];
result.distance = bestCell.d;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An array mixed with object seems wired

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen properties on arrays in D3, for example data.columns in dsv.parse

@TWiStErRob
Copy link

Why not swallow the "breaking change" and bump the version number accordingly?

return {x: bestCell.x, y: bestCell.y, distance: bestCell.d};

@anandthakker
Copy link
Author

I have no personal opinion on this question -- attaching distance to an array, switching to an object, switching to a 3-element array all seem fine to me. I'll leave it to @mourner to state a preference.

@curran
Copy link
Contributor

curran commented Jan 15, 2017

This would be a cool feature to have. I'd say the property on the array is fine.

@anandthakker
Copy link
Author

Closing this as stale.

@TWiStErRob
Copy link

So what about #2? The fix is here, a button press away; someone just needs to own the decision of what format to use.

@mourner mourner reopened this Jun 18, 2018
@jolars
Copy link
Contributor

jolars commented Oct 23, 2018

I would love to see this implemented so that there might be a solution for multiPolygons.

@curran curran mentioned this pull request Jun 4, 2020
@mourner
Copy link
Member

mourner commented Jun 4, 2020

Superceded by #61

@mourner mourner closed this Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

return best distance
6 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载