Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mcwhittemore committed Mar 16, 2016
1 parent bb8e02d commit 8d7d87e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
15 changes: 0 additions & 15 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ var featureTypes = {
"Point": require('./feature_types/point')
}

/**
* Updates an existing feature
* @param {String} id - the drawId of the feature to update
* @param {Object} feature - a GeoJSON feature
* @returns {Draw} this
*/
// update(id, feature) {
// feature = JSON.parse(JSON.stringify(feature));
// var _feature = this._store.get(id);
// _feature.setCoordinates(feature.coordinates || feature.geometry.coordinates);
// if (feature.properties) _feature.setProperties(feature.properties);
// this._store._render();
// return this;
// }

var API = module.exports = function(ctx) {

return {
Expand Down
2 changes: 2 additions & 0 deletions src/modes/many_features/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ module.exports = function(ctx, opts) {
var lngD = e.lngLat.lng - opts.startPos.lng;
var latD = e.lngLat.lat - opts.startPos.lat;

console.log(lngD, latD, numFeatures);

for (var i=0; i < numFeatures; i++) {
var feature = features[i];
if (feature.type === 'Point') {
Expand Down
5 changes: 1 addition & 4 deletions src/modes/many_features/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function(ctx) {
ctx.api.unselectAll();
});

this.on('click', isFeature, function(e) {
this.on('mousedown', isFeature, function(e) {
var id = e.featureTarget.properties.id;
var feature = ctx.store.get(id);
if (feature.isSelected() ) {
Expand All @@ -25,9 +25,6 @@ module.exports = function(ctx) {
ctx.api.unselectAll();
feature.select();
}
});

this.on('mousedown', isFeature, function(e) {
ctx.events.startMode('many_drag', {
startPos: e.lngLat
});
Expand Down

0 comments on commit 8d7d87e

Please sign in to comment.