You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
map.setSize accepts either (x, y) or ({x: 0, y: 0}) as arguments, and then it passes [{x: 0, y: 0}] to its callback. I don't grok any strong reasons why three types of representing size are necessary here - I think we should choose one (probably the size-object), and just go with that.
The text was updated successfully, but these errors were encountered:
It's a bit weird that it's the only thing that allows x,y or a point, it's true! Though I see no reason to enforce that the supplied arg should be a Point when any x/y Object will do.
I'd be OK losing support for setSize(x,y) in favor of consistency with other APIs, but it would be our first API breaking change. Perhaps we should make a list of these and see if we can make a clean break to v1.0.0? I've made a start on this on the wiki: https://github.com/stamen/modestmaps-js/wiki/v1.0.0-API-proposals
Regarding the callback, we should make sure that map.dimensions is always a com.modestmaps.Point, even if a { x: 0, y: 0 } literal is passed in, and that the callback receives MM.Point accordingly.
map.setSize
accepts either(x, y)
or({x: 0, y: 0})
as arguments, and then it passes[{x: 0, y: 0}]
to its callback. I don't grok any strong reasons why three types of representing size are necessary here - I think we should choose one (probably the size-object), and just go with that.The text was updated successfully, but these errors were encountered: