forked from MapComplete/MapComplete
New roaming rendering system which allows layers to push questions, badges and title-icons to all the other layers, improve bike-clean-services
This commit is contained in:
parent
77ffdc093a
commit
2a31badd3d
16 changed files with 427 additions and 394 deletions
|
@ -1,5 +1,5 @@
|
|||
import {UIElement} from "../UI/UIElement";
|
||||
UIElement.runningFromConsole = true;
|
||||
import {Utils} from "../Utils";
|
||||
Utils.runningFromConsole = true;
|
||||
import {equal} from "assert";
|
||||
import T from "./TestHelper";
|
||||
import {FromJSON} from "../Customizations/JSON/FromJSON";
|
||||
|
@ -10,7 +10,6 @@ import {UIEventSource} from "../Logic/UIEventSource";
|
|||
import TagRenderingConfig from "../Customizations/JSON/TagRenderingConfig";
|
||||
import EditableTagRendering from "../UI/Popup/EditableTagRendering";
|
||||
import {SubstitutedTranslation} from "../UI/SpecialVisualizations";
|
||||
import {Utils} from "../Utils";
|
||||
import {Translation} from "../UI/i18n/Translation";
|
||||
import {OH, OpeningHour} from "../UI/OpeningHours/OpeningHours";
|
||||
import PublicHolidayInput from "../UI/OpeningHours/PublicHolidayInput";
|
||||
|
@ -40,6 +39,13 @@ new T([
|
|||
equal(notReg.matches([{k:"x",v:""}]), true)
|
||||
|
||||
equal(notReg.matches([]), true)
|
||||
|
||||
|
||||
const noMatch = FromJSON.Tag("key!=value") as Tag;
|
||||
equal(noMatch.matches([{k:"key",v:"value"}]), false)
|
||||
equal(noMatch.matches([{k:"key",v:"otherValue"}]), true)
|
||||
equal(noMatch.matches([{k:"key",v:""}]), true)
|
||||
equal(noMatch.matches([{k:"otherKey",v:""}]), true)
|
||||
|
||||
|
||||
})],
|
||||
|
@ -92,7 +98,7 @@ new T([
|
|||
}
|
||||
],
|
||||
condition: "x="
|
||||
}, "");
|
||||
}, undefined,"");
|
||||
|
||||
equal(undefined, tr.GetRenderValue({"foo": "bar"}));
|
||||
equal("Has no name", tr.GetRenderValue({"noname": "yes"})?.txt);
|
||||
|
@ -145,7 +151,7 @@ new T([
|
|||
]
|
||||
};
|
||||
|
||||
const constr = new TagRenderingConfig(def, "test");
|
||||
const constr = new TagRenderingConfig(def, undefined,"test");
|
||||
const uiEl = new EditableTagRendering(new UIEventSource<any>(
|
||||
{leisure: "park", "access": "no"}), constr
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue