Skip to content

Commit

Permalink
Added reset all button for issue openstreetmap#5503
Browse files Browse the repository at this point in the history
  • Loading branch information
alphagamer7 committed Feb 28, 2019
1 parent c3ee4a2 commit e16342e
Show file tree
Hide file tree
Showing 41 changed files with 50 additions and 38 deletions.
1 change: 1 addition & 0 deletions data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ en:
overlays: Overlays
imagery_source_faq: Imagery Info / Report a Problem
reset: reset
reset_all: Reset All
display_options: Display Options
brightness: Brightness
contrast: Contrast
Expand Down
1 change: 1 addition & 0 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@
"overlays": "Overlays",
"imagery_source_faq": "Imagery Info / Report a Problem",
"reset": "reset",
"reset_all": "Reset All",
"display_options": "Display Options",
"brightness": "Brightness",
"contrast": "Contrast",
Expand Down
10 changes: 10 additions & 0 deletions modules/ui/background_display_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ export function uiBackgroundDisplayOptions(context) {
})
.call(svgIcon('#iD-icon-' + (textDirection === 'rtl' ? 'redo' : 'undo')));

//reset all button
containerEnter.append('button')
.append('text')
.text(t('background.reset_all'))
.attr('class', 'display-option-reset display-option-reset')
.on('click', function() {
for (var i=0; i< sliders.length; i++) {
updateValue(sliders[i],1);
}
});

// update
container = containerEnter
Expand Down
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-ambulance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-archway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-bacon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-balance-scale.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-bell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-blender.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-charging-station.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-cheese.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-chess-knight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-couch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svg/fontawesome/fas-drumstick-bite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e16342e

Please sign in to comment.