mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-03 13:38:04 +02:00
Add 'current' class to current preset in grid
This commit is contained in:
@@ -56,12 +56,12 @@ iD.ui.Inspector = function(context, entity) {
|
||||
.tags(entity.tags)
|
||||
.on('changeTags', changeTags)
|
||||
.on('close', browse)
|
||||
.on('choose', function() {
|
||||
.on('choose', function(preset) {
|
||||
panewrap
|
||||
.transition()
|
||||
.style('right', '-100%');
|
||||
|
||||
presetLayer.call(presetGrid, true);
|
||||
presetLayer.call(presetGrid, preset);
|
||||
});
|
||||
|
||||
var initial = entity.isNew() && _.without(Object.keys(entity.tags), 'area').length === 0;
|
||||
|
||||
@@ -191,6 +191,7 @@ iD.ui.PresetGrid = function(context, entity) {
|
||||
var entered = entries.enter()
|
||||
.append('div')
|
||||
.attr('class','grid-button-wrap col4 grid-entry-wrap')
|
||||
.classed('current', function(d) { return d === preset; })
|
||||
.append('button')
|
||||
.attr('class', 'grid-entry')
|
||||
.on('click', choose);
|
||||
|
||||
@@ -35,7 +35,7 @@ iD.ui.TagEditor = function(context, entity) {
|
||||
.title(t('inspector.back_tooltip'))
|
||||
.placement('left'))
|
||||
.on('click', function() {
|
||||
event.choose();
|
||||
event.choose(preset);
|
||||
})
|
||||
.append('span').attr('class','icon back');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user