Skip to content

Commit

Permalink
Added 'clearShapes'
Browse files Browse the repository at this point in the history
Allows simple clearing of all shape objects from the map.
  • Loading branch information
thingsinjars committed Nov 6, 2013
1 parent f764b3b commit 4741b93
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/extensions/shapes.js
Expand Up @@ -113,6 +113,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
$.error(shape + ' not supported');
}
};

//###Clear all shapes from the map
clearShapes = function() {
if (shapeContainer && shapeContainer.objects) {
shapeContainer.objects.clear();
}
};

circle = function(options){
shape.call(this, 'circle', options);
Expand All @@ -135,4 +142,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
$.jHERE.extend('rectangle', rectangle);
$.jHERE.extend('polyline', polyline);
$.jHERE.extend('polygon', polygon);
}(jQuery));
}(jQuery));

0 comments on commit 4741b93

Please sign in to comment.