Skip to content

Commit

Permalink
Update WMEPIE.js
Browse files Browse the repository at this point in the history
Bug fixes - hiding Place menu when selecting a new Place, no longer possible to get in a mode where you cannot stop area place creation
  • Loading branch information
justins83 authored Oct 26, 2017
1 parent 2a61a6b commit d8e1fb8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions WMEPIE.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name WME Place Interface Enhancements
// @namespace https://greasyfork.org/users/30701-justins83-waze
// @version 2017.10.25.02
// @version 2017.10.26.01
// @description Enhancements to various Place interfaces
// @include https://www.waze.com/editor*
// @include https://www.waze.com/*/editor*
Expand All @@ -19,7 +19,7 @@ var UpdateObject, MultiAction;
(function() {
'use strict';

var curr_ver = "2017.10.25.02";
var curr_ver = "2017.10.26.01";
var settings = {};
var placeMenuSelector = "#edit-buttons > div > div.toolbar-submenu.toolbar-group.toolbar-group-venues.ItemInactive > menu";//"#edit-buttons > div > div.toolbar-button.waze-icon-place.toolbar-submenu.toolbar-group.toolbar-group-venues.ItemInactive > menu";
//"#edit-buttons > div > div.toolbar-submenu.toolbar-group.toolbar-group-venues.ItemInactive > menu";
Expand Down Expand Up @@ -931,11 +931,13 @@ var UpdateObject, MultiAction;
}

$('[id^="piePlaceMainItem"]').click(function(e){
$('.toolbar-group-venues').removeClass('open');
startPlacementMode($('#' + this.id).data("category"), true);
});

$('[id^="piePlaceAreaItem"]').click(function(e){
e.stopPropagation();
$('.toolbar-group-venues').removeClass('open');
startPlacementMode($('#' + this.id).data("category"), false);
});
}
Expand Down Expand Up @@ -1121,6 +1123,8 @@ var UpdateObject, MultiAction;
drawPoly.activate();*/
}
else{
if(drawPoly != null)
drawPoly.deactivate();
drawPoly = new OpenLayers.Control.DrawFeature(newPlaceLayer, OpenLayers.Handler.Polygon, polyDrawFeatureOptions);
W.map.addControl(drawPoly);
drawPoly.activate();
Expand Down

0 comments on commit d8e1fb8

Please sign in to comment.