Workaround: popups move into zoom vertically too now on desktop
This commit is contained in:
parent
7dc7cc283d
commit
9a412c6b74
4 changed files with 17 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { Utils } from "../Utils";
|
import { Utils } from "../Utils";
|
||||||
|
|
||||||
export default class Constants {
|
export default class Constants {
|
||||||
public static vNumber = "0.4.0";
|
public static vNumber = "0.4.2";
|
||||||
|
|
||||||
// The user journey states thresholds when a new feature gets unlocked
|
// The user journey states thresholds when a new feature gets unlocked
|
||||||
public static userJourney = {
|
public static userJourney = {
|
||||||
|
|
|
@ -6,9 +6,11 @@ export default class LazyElement extends UIElement {
|
||||||
private _content: UIElement = undefined;
|
private _content: UIElement = undefined;
|
||||||
|
|
||||||
public Activate: () => void;
|
public Activate: () => void;
|
||||||
|
private _loadingContent: string;
|
||||||
|
|
||||||
constructor(content: (() => UIElement)) {
|
constructor(content: (() => UIElement), loadingContent = "Rendering...") {
|
||||||
super();
|
super();
|
||||||
|
this._loadingContent = loadingContent;
|
||||||
this.dumbMode = false;
|
this.dumbMode = false;
|
||||||
const self = this;
|
const self = this;
|
||||||
this.Activate = () => {
|
this.Activate = () => {
|
||||||
|
@ -21,7 +23,7 @@ export default class LazyElement extends UIElement {
|
||||||
|
|
||||||
InnerRender(): string {
|
InnerRender(): string {
|
||||||
if (this._content === undefined) {
|
if (this._content === undefined) {
|
||||||
return "Rendering...";
|
return this._loadingContent;
|
||||||
}
|
}
|
||||||
return this._content.InnerRender();
|
return this._content.InnerRender();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import LayerSelection from "./LayerSelection";
|
||||||
import Combine from "../Base/Combine";
|
import Combine from "../Base/Combine";
|
||||||
import Translations from "../i18n/Translations";
|
import Translations from "../i18n/Translations";
|
||||||
|
|
||||||
export default class LayerControlPanel extends UIElement{
|
export default class LayerControlPanel extends UIElement {
|
||||||
private readonly _panel: UIElement;
|
private readonly _panel: UIElement;
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ export default class LayerControlPanel extends UIElement{
|
||||||
|
|
||||||
if (State.state.filteredLayers.data.length > 1) {
|
if (State.state.filteredLayers.data.length > 1) {
|
||||||
const layerSelection = new LayerSelection();
|
const layerSelection = new LayerSelection();
|
||||||
layerSelection.onClick(() => { });
|
layerSelection.onClick(() => {
|
||||||
|
});
|
||||||
layerControlPanel = new Combine([layerSelection, "<br/>", layerControlPanel]);
|
layerControlPanel = new Combine([layerSelection, "<br/>", layerControlPanel]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ export default class LayerControlPanel extends UIElement{
|
||||||
]).SetClass("only-on-mobile")
|
]).SetClass("only-on-mobile")
|
||||||
.onClick(() => State.state.fullScreenMessage.setData(undefined));
|
.onClick(() => State.state.fullScreenMessage.setData(undefined));
|
||||||
|
|
||||||
layerControlPanel = new Combine([layerControlPanel, backButton]);
|
layerControlPanel = new Combine([layerControlPanel , backButton]);
|
||||||
|
|
||||||
this._panel = layerControlPanel;
|
this._panel = layerControlPanel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,8 @@ export default class ShowDataLayer {
|
||||||
|
|
||||||
|
|
||||||
const tags = State.state.allElements.getEventSourceFor(feature);
|
const tags = State.state.allElements.getEventSourceFor(feature);
|
||||||
const uiElement: LazyElement = new LazyElement(() => new FeatureInfoBox(tags, layer));
|
const uiElement: LazyElement = new LazyElement(() => new FeatureInfoBox(tags, layer),
|
||||||
|
"<div style='height: 90vh'>Rendering</div>");
|
||||||
popup.setContent(uiElement.Render());
|
popup.setContent(uiElement.Render());
|
||||||
popup.on('remove', () => {
|
popup.on('remove', () => {
|
||||||
State.state.selectedElement.setData(undefined);
|
State.state.selectedElement.setData(undefined);
|
||||||
|
|
Loading…
Reference in a new issue