From 122cc33cb5bedf9015d47c05a6c392ece21933c4 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Fri, 4 Mar 2011 12:44:13 +0000 Subject: [PATCH] minor fixes --- build/js/ox.ui.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 4ca3b70e..1bd00545 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -431,8 +431,8 @@ requires //91: 'meta.left', //92: 'meta.right', 91: 'meta', - 92: 'meta', - 93: 'select', + //92: 'meta', + 93: 'meta', 96: '0.numpad', 97: '1.numpad', 98: '2.numpad', @@ -9384,7 +9384,7 @@ requires that.zoomToPlace(); }, key_escape: function() { - selectPlace(''); + pressEscape(); } }); @@ -9704,6 +9704,21 @@ requires return place; } + function pressEscape() { + var place; + if (self.selected) { + place = getPlaceById(self.selected); + if (place.editing) { + place.submit(); + } else if (place.selected) { + place.deselect(); + } + } else if (self.resultPlace) { + self.resultPlace.remove(); + self.resultPlace = null; + } + } + function removePlace(id) { } @@ -10275,6 +10290,7 @@ requires }; that.deselect = function() { + that.editing && that.submit(); that.selected = false; that.marker.update(); that.polygon.remove();