mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 09:34:04 +02:00
@@ -263,7 +263,7 @@ export function rendererMap(context) {
|
||||
}
|
||||
|
||||
|
||||
function drawVector(difference, extent) {
|
||||
function drawEditable(difference, extent) {
|
||||
var mode = context.mode();
|
||||
var graph = context.graph();
|
||||
var features = context.features();
|
||||
@@ -576,15 +576,13 @@ export function rendererMap(context) {
|
||||
|
||||
if (!difference) {
|
||||
supersurface.call(context.background());
|
||||
wrapper.call(drawLayers);
|
||||
}
|
||||
|
||||
wrapper
|
||||
.call(drawLayers);
|
||||
|
||||
// OSM
|
||||
if (map.editable()) {
|
||||
context.loadTiles(projection);
|
||||
drawVector(difference, extent);
|
||||
drawEditable(difference, extent);
|
||||
} else {
|
||||
editOff();
|
||||
}
|
||||
|
||||
@@ -239,8 +239,9 @@ export function uiEntityEditor(context) {
|
||||
.on('change.entity-editor', historyChanged);
|
||||
|
||||
|
||||
function historyChanged() {
|
||||
function historyChanged(difference) {
|
||||
if (_state === 'hide') return;
|
||||
if (!difference || !difference.didChange.properties) return;
|
||||
|
||||
var entity = context.hasEntity(_entityID);
|
||||
var graph = context.graph();
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
event as d3_event,
|
||||
select as d3_select
|
||||
} from 'd3-selection';
|
||||
import { event as d3_event, select as d3_select } from 'd3-selection';
|
||||
|
||||
import { t } from '../util/locale';
|
||||
import { modeSelect } from '../modes';
|
||||
@@ -46,7 +43,12 @@ export function uiSelectionList(context, selectedIDs) {
|
||||
.append('div')
|
||||
.attr('class', 'feature-list cf');
|
||||
|
||||
context.history().on('change.selection-list', drawList);
|
||||
|
||||
context.history()
|
||||
.on('change.selectionList', function(difference) {
|
||||
if (difference) drawList();
|
||||
});
|
||||
|
||||
drawList();
|
||||
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ export function uiToolSave(context) {
|
||||
label: t('save.title')
|
||||
};
|
||||
|
||||
var button = null,
|
||||
tooltipBehavior = null;
|
||||
var button = null;
|
||||
var tooltipBehavior = null;
|
||||
var history = context.history();
|
||||
var key = uiCmd('⌘S');
|
||||
var _numChanges = 0;
|
||||
@@ -102,8 +102,11 @@ export function uiToolSave(context) {
|
||||
context.keybinding()
|
||||
.on(key, save, true);
|
||||
|
||||
|
||||
context.history()
|
||||
.on('change.save', updateCount);
|
||||
.on('change.save', function(difference) {
|
||||
if (difference) updateCount();
|
||||
});
|
||||
|
||||
context
|
||||
.on('enter.save', function() {
|
||||
|
||||
@@ -81,7 +81,9 @@ export function uiToolUndoRedo(context) {
|
||||
.on('drawn.undo_redo', debouncedUpdate);
|
||||
|
||||
context.history()
|
||||
.on('change.undo_redo', update);
|
||||
.on('change.undo_redo', function(difference) {
|
||||
if (difference) update();
|
||||
});
|
||||
|
||||
context
|
||||
.on('enter.undo_redo', update);
|
||||
|
||||
Reference in New Issue
Block a user