Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Propose name changes #30

Closed
tristen opened this issue Jul 16, 2012 · 6 comments
Closed

Propose name changes #30

tristen opened this issue Jul 16, 2012 · 6 comments

Comments

@tristen
Copy link
Member

tristen commented Jul 16, 2012

These are upstream but I wanted to discuss them here:

map

layer.named -> layer.name
Named in the past tense just seems weird - even for what it does.

markers

markers.factory -> markers.render
factory to me is a pretty internal name. "Render" qualify's what it does: renders the object out as html
or re-renders them out

markers.features -> markers.data
Features is such a geojson spec name. "data" seems like a more appropriate name for how we are using features.

markers.addCallback -> markers.onEvent
This feels more clear to me on some event specified in the first argument, do something (callback)

markers.removeCallback -> markers.removeEvent

interaction.hide_on_move -> interaction.hideOnMove
underscores just dont sit right with me .. we should camelCase right?

interaction.formatter -> interaction.template
Debatable change.

ease

ease.t -> ease.toPoint
More clear

@tmcw
Copy link
Contributor

tmcw commented Jul 16, 2012

Named needs to be named - modestmaps looks for .name as a property, and as such it can't be a function without very dangerous code, or a modestmaps tweak.

renderer could be valid, though it does refer to the factory pattern

markers.features refers to the features member of a GeoJSON feature collection, and markers.js aims to continue to support GeoJSON type objects internally, even if it supports other 'converters' to/from that format. data also could be confused with the data member in TileJSON.

addCallback and removeCallback are made to mirror modestmaps; I'd rather keep these continuous; they mirror addEventlistener in HTML and have been established for a while.

Hide on move, sure, works for me.

Template - no; this isn't templating, really: it doesn't take a template as an argument.

easey.toPoint I'd rather not use Point because it could be easily confused with MM.Point, which this has nothing to do with. open to other namings though

@tristen
Copy link
Member Author

tristen commented Jul 16, 2012

  • Perhaps setPosition ? instead of toPoint ?
  • I know factory refers to the factory pattern but I feel like an api shouldn't bear its name - internally yes but not outwardly. the word, "render" attributes more closely to what it does I think.

@tmcw
Copy link
Contributor

tmcw commented Jul 16, 2012

render is also a verb; you would expect markers.render() to render the markers. it would have to be markers.renderer() right?

@tristen
Copy link
Member Author

tristen commented Jul 16, 2012

Ah I see. Yes, renderer

@tmcw
Copy link
Contributor

tmcw commented Jul 16, 2012

Technically it's like an x value in http://en.wikipedia.org/wiki/Interpolation . Position is also kind of an overloaded term; unless we can find something that's accurate and specific, I don't really want to change this (plus it's a pro feature anyway)

@tmcw
Copy link
Contributor

tmcw commented Apr 4, 2013

We're supporting camelCase in v1 and such.

@tmcw tmcw closed this as completed Apr 4, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants