Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Fix UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Aug 7, 2024
1 parent fdcb210 commit a18fdbd
Show file tree
Hide file tree
Showing 10 changed files with 84,708 additions and 84,628 deletions.
168,788 changes: 84,438 additions & 84,350 deletions index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/leaflet/leaflet.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ L.Draw.Feature.SnapMixin = {
var mdOrigin = this._map.unproject(this._mouseDownOrigin, z);
var closestMDO = this._manuallyCorrectClick(mdOrigin);

if (closestMDO.latlng) {
if (closestMDO && closestMDO.latlng) {
this._mouseMarker.setLatLng(closestMDO.latlng);
this._mouseDownOrigin = this._map.project(closestMDO.latlng, z);
}
Expand All @@ -633,7 +633,7 @@ L.Draw.Feature.SnapMixin = {
var oeOrigin = this._map.unproject([e.originalEvent.clientX, e.originalEvent.clientY], z);
var closestOE = this._manuallyCorrectClick(oeOrigin);

if (closestOE.latlng) {
if (closestOE && closestOE.latlng) {
e.originalEvent = this._map.project(closestOE.latlng, z);
}
}
Expand Down
4 changes: 2 additions & 2 deletions js/leaflet_07/leaflet.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ L.Draw.Feature.SnapMixin = {
var mdOrigin = this._map.unproject(this._mouseDownOrigin, z);
var closestMDO = this._manuallyCorrectClick(mdOrigin);

if (closestMDO.latlng) {
if (closestMDO && closestMDO.latlng) {
this._mouseMarker.setLatLng(closestMDO.latlng);
this._mouseDownOrigin = this._map.project(closestMDO.latlng, z);
}
Expand All @@ -633,7 +633,7 @@ L.Draw.Feature.SnapMixin = {
var oeOrigin = this._map.unproject([e.originalEvent.clientX, e.originalEvent.clientY], z);
var closestOE = this._manuallyCorrectClick(oeOrigin);

if (closestOE.latlng) {
if (closestOE && closestOE.latlng) {
e.originalEvent = this._map.project(closestOE.latlng, z);
}
}
Expand Down
17 changes: 17 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -808,4 +808,21 @@ img {
border-bottom: 1px solid black;
cursor: text;
min-width: 300px;
}

.project-content-switch {
color: green;
background: white;
display: flex;
flex-grow: 1;
align-items: center;
justify-content: center;
text-transform: uppercase;
font-weight: bold;
cursor: pointer;
}

.project-content-switch.active {
background: green;
color: white;
}
70 changes: 35 additions & 35 deletions pkg/tnviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,29 @@ export function ui_render_popover_content(decoded, konfiguration) {
}
}

/**
* @param {string} uidata
* @returns {string}
*/
export function ui_render_switch_content(uidata) {
let deferred2_0;
let deferred2_1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(uidata, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.ui_render_switch_content(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
deferred2_0 = r0;
deferred2_1 = r1;
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_export_3(deferred2_0, deferred2_1, 1);
}
}

/**
* @param {string} projektinfo
* @param {string} risse
Expand Down Expand Up @@ -553,29 +576,6 @@ export function ui_render_project_content(projektinfo, risse, uidata, csv_data,
}
}

/**
* @param {string} aenderungen
* @returns {string}
*/
export function ui_render_secondary_content(aenderungen) {
let deferred2_0;
let deferred2_1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(aenderungen, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.ui_render_secondary_content(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
deferred2_0 = r0;
deferred2_1 = r1;
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_export_3(deferred2_0, deferred2_1, 1);
}
}

/**
* @param {string} s
* @returns {string}
Expand Down Expand Up @@ -1463,6 +1463,18 @@ function __wbg_get_imports() {
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_parseFloat_c070db336d687e53 = function(arg0, arg1) {
const ret = parseFloat(getStringFromWasm0(arg0, arg1));
return ret;
};
imports.wbg.__wbg_parseInt_64e7fc2f8ddfa221 = function(arg0, arg1, arg2) {
const ret = parseInt(getStringFromWasm0(arg0, arg1), arg2);
return ret;
};
imports.wbg.__wbg_buffer_f3fdea4b3cf0aedc = function(arg0) {
const ret = getObject(arg0).buffer;
return addHeapObject(ret);
Expand All @@ -1479,18 +1491,6 @@ function __wbg_get_imports() {
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_parseFloat_c070db336d687e53 = function(arg0, arg1) {
const ret = parseFloat(getStringFromWasm0(arg0, arg1));
return ret;
};
imports.wbg.__wbg_parseInt_64e7fc2f8ddfa221 = function(arg0, arg1, arg2) {
const ret = parseInt(getStringFromWasm0(arg0, arg1), arg2);
return ret;
};
imports.wbg.__wbg_random_4bc01a1f182e92dc = typeof Math.random == 'function' ? Math.random : notDefined('Math.random');
imports.wbg.__wbg_log_5bb5f88f245d7762 = function(arg0) {
console.log(getObject(arg0));
Expand Down
Binary file modified pkg/tnviewer_bg.wasm
Binary file not shown.
Loading

0 comments on commit a18fdbd

Please sign in to comment.