mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 00:07:03 +02:00
Move the edit menu logic to uiInit
Make context the first argument of operation objects Add Paste operation to edit menu when opening the context menu on a blank area of the map (close #2508)
This commit is contained in:
@@ -65,7 +65,7 @@ export function validationDisconnectedWay() {
|
||||
entityIds: [singleEntity.id],
|
||||
onClick: function(context) {
|
||||
var id = this.issue.entityIds[0];
|
||||
var operation = operationDelete([id], context);
|
||||
var operation = operationDelete(context, [id]);
|
||||
if (!operation.disabled()) {
|
||||
operation();
|
||||
}
|
||||
|
||||
@@ -107,12 +107,12 @@ export function validationMissingTag(context) {
|
||||
var deleteOnClick;
|
||||
|
||||
var id = this.entityIds[0];
|
||||
var operation = operationDelete([id], context);
|
||||
var operation = operationDelete(context, [id]);
|
||||
var disabledReasonID = operation.disabled();
|
||||
if (!disabledReasonID) {
|
||||
deleteOnClick = function(context) {
|
||||
var id = this.issue.entityIds[0];
|
||||
var operation = operationDelete([id], context);
|
||||
var operation = operationDelete(context, [id]);
|
||||
if (!operation.disabled()) {
|
||||
operation();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user