mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
forward, backward (expand, collapse)
This commit is contained in:
@@ -13,6 +13,10 @@ en:
|
||||
text: text
|
||||
deselect: deselect
|
||||
close: close
|
||||
forward: forward
|
||||
backward: backward
|
||||
expand: expand
|
||||
collapse: collapse
|
||||
toolbar:
|
||||
inspect: Inspect
|
||||
undo_redo: Undo / Redo
|
||||
|
||||
@@ -5,7 +5,7 @@ import { svgIcon } from '../svg/icon';
|
||||
import { utilFunctor } from '../util';
|
||||
import { utilRebind } from '../util/rebind';
|
||||
import { uiToggle } from './toggle';
|
||||
import { localizer } from '../core/localizer';
|
||||
import { t, localizer } from '../core/localizer';
|
||||
|
||||
|
||||
export function uiDisclosure(context, key, expandedDefault) {
|
||||
@@ -45,6 +45,7 @@ export function uiDisclosure(context, key, expandedDefault) {
|
||||
|
||||
hideToggle
|
||||
.on('click', toggle)
|
||||
.attr('title', t(`icons.${_expanded ? 'collapse' : 'expand'}`))
|
||||
.classed('expanded', _expanded);
|
||||
|
||||
hideToggle.selectAll('.hide-toggle-text')
|
||||
@@ -82,7 +83,8 @@ export function uiDisclosure(context, key, expandedDefault) {
|
||||
}
|
||||
|
||||
hideToggle
|
||||
.classed('expanded', _expanded);
|
||||
.classed('expanded', _expanded)
|
||||
.attr('title', t(`icons.${_expanded ? 'collapse' : 'expand'}`));
|
||||
|
||||
hideToggle.selectAll('.hide-toggle-icon')
|
||||
.attr('xlink:href', _expanded ? '#iD-icon-down'
|
||||
|
||||
@@ -42,10 +42,13 @@ export function uiEntityEditor(context) {
|
||||
.append('div')
|
||||
.attr('class', 'header fillL');
|
||||
|
||||
var direction = (localizer.textDirection() === 'rtl') ? 'forward' : 'backward';
|
||||
|
||||
headerEnter
|
||||
.append('button')
|
||||
.attr('class', 'preset-reset preset-choose')
|
||||
.call(svgIcon((localizer.textDirection() === 'rtl') ? '#iD-icon-forward' : '#iD-icon-backward'));
|
||||
.attr('title', t(`icons.${direction}`))
|
||||
.call(svgIcon(`#iD-icon-${direction}`));
|
||||
|
||||
headerEnter
|
||||
.append('button')
|
||||
|
||||
@@ -37,11 +37,14 @@ export function uiPresetList(context) {
|
||||
.append('h3')
|
||||
.html(t.html('inspector.choose'));
|
||||
|
||||
var direction = (localizer.textDirection() === 'rtl') ? 'backward' : 'forward';
|
||||
|
||||
messagewrap
|
||||
.append('button')
|
||||
.attr('class', 'preset-choose')
|
||||
.attr('title', direction)
|
||||
.on('click', function() { dispatch.call('cancel', this); })
|
||||
.call(svgIcon((localizer.textDirection() === 'rtl') ? '#iD-icon-backward' : '#iD-icon-forward'));
|
||||
.call(svgIcon(`#iD-icon-${direction}`));
|
||||
|
||||
function initialKeydown(d3_event) {
|
||||
// hack to let delete shortcut work when search is autofocused
|
||||
@@ -273,7 +276,8 @@ export function uiPresetList(context) {
|
||||
var iconName = isExpanded ?
|
||||
(localizer.textDirection() === 'rtl' ? '#iD-icon-backward' : '#iD-icon-forward') : '#iD-icon-down';
|
||||
d3_select(this)
|
||||
.classed('expanded', !isExpanded);
|
||||
.classed('expanded', !isExpanded)
|
||||
.attr('title', !isExpanded ? t('icons.collapse') : t('icons.expand'));
|
||||
d3_select(this).selectAll('div.label-inner svg.icon use')
|
||||
.attr('href', iconName);
|
||||
item.choose();
|
||||
@@ -284,6 +288,7 @@ export function uiPresetList(context) {
|
||||
var button = wrap
|
||||
.append('button')
|
||||
.attr('class', 'preset-list-button')
|
||||
.attr('title', t('icons.expand'))
|
||||
.classed('expanded', false)
|
||||
.call(uiPresetIcon()
|
||||
.geometry(geometries.length === 1 && geometries[0])
|
||||
|
||||
Reference in New Issue
Block a user