jesusdomines / jquery-ui-map

Automatically exported from code.google.com/p/jquery-ui-map
0 stars 0 forks source link

[PATCH] addShape doesn't return shape #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
addShape method (from overlays) return object as specified, but not what is 
expected.

Currently, it returns
$( offset )
which is push offset, wrapped by jQuery

I was expecting
$( shape )

I wrote a patched method, attached to this issue.

Original issue reported on code.google.com by alexandr...@stadline.com on 16 Feb 2012 at 10:00

Attachments:

GoogleCodeExporter commented 8 years ago
Correct me if I'm wrong, but addMarker returns $( marker )

Original comment by alexandr...@stadline.com on 16 Feb 2012 at 10:02

GoogleCodeExporter commented 8 years ago
There's the same problem with addBounds, addControl, ...
I don't know the repercussions of a return value change for these methods

Original comment by alexandr...@stadline.com on 16 Feb 2012 at 10:18

GoogleCodeExporter commented 8 years ago
You would lose chainability to return on addBounds, addControl. The addMarkers 
and addShape return a value because they are stored in an array. But yeah, it 
probably should return a value, but then you would lose chaining on two 
functions which returns an object which you normally never add any event 
listeners to. 

Original comment by johansalllarsson on 27 Mar 2012 at 8:40