mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Save custom background to localstorage (closes #2566)
This commit is contained in:
@@ -8,7 +8,7 @@ iD.ui.Background = function(context) {
|
||||
['bottom', [0, 1]]],
|
||||
opacityDefault = (context.storage('background-opacity') !== null) ?
|
||||
(+context.storage('background-opacity')) : 0.5,
|
||||
customTemplate = '';
|
||||
customTemplate = context.storage('background-custom-template') || '';
|
||||
|
||||
// Can be 0 from <1.3.0 use or due to issue #1923.
|
||||
if (opacityDefault === 0) opacityDefault = 0.5;
|
||||
@@ -64,6 +64,7 @@ iD.ui.Background = function(context) {
|
||||
function setCustom(template) {
|
||||
context.background().baseLayerSource(iD.BackgroundSource.Custom(template));
|
||||
selectLayer();
|
||||
context.storage('background-custom-template', template);
|
||||
}
|
||||
|
||||
function clickSetOverlay(d) {
|
||||
|
||||
Reference in New Issue
Block a user