Fix API panel re-injecting field defaults over cleared values
startPluginEdit pre-filled any empty field with its descriptor default, treating an explicitly cleared field (stored "") the same as one never set (undefined). So a saved-blank OpenSky bounding box reappeared as the default 50.5,3.2,53.7,7.3 on reopen (and would be re-persisted on save). Only inject a default when the field has never been stored (undefined), so intentional blanks stay blank. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
125d0ccc7d
commit
6a007fd25e
3 files changed
+6
-4
No files matched your search
+1
-1
@@ -14,4 +14,4 @@
|
||||
* @vue/runtime-dom v3.5.39
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let wn;const ho=typeof window<"u"&&window.trustedTypes;if(ho)try{wn=ho.createPolicy("vue",{createHTML:e=>e})}catch{}const Ui=wn?e=>wn.createHTML(e):e=>e,Vr="http://www.w3.org/2000/svg",Hr="http://www.w3.org/1998/Math/MathML",at=typeof document<"u"?document:null,go=at&&at.createElement("template"),Br={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?at.createElementNS(Vr,e):t==="mathml"?at.createElementNS(Hr,e):s?at.createElement(e,{is:s}):at.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{go.innerHTML=Ui(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const r=go.content;if(n==="svg"||n==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Kr=Symbol("_vtc");function zr(e,t,s){const n=e[Kr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ls=Symbol("_vod"),$i=Symbol("_vsh"),Jt={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ls]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Yt(e,!0),n.enter(e)):n.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Ls]:"none",e[$i]=!t}const Wr=Symbol(""),Gr=/(?:^|;)\s*display\s*:/;function qr(e,t,s){const n=e.style,o=ce(s);let i=!1;if(s&&!o){if(t)if(ce(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&Qt(n,r,"")}else for(const l in t)s[l]==null&&Qt(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?Yr(e,l,!ce(t)&&t?t[l]:void 0,r)||Qt(n,l,r):Qt(n,l,"")}}else if(o){if(t!==s){const l=n[Wr];l&&(s+=";"+l),n.cssText=s,i=Gr.test(s)}}else t&&e.removeAttribute("style");Ls in e&&(e[Ls]=i?n.display:"",e[$i]&&(n.display="none"))}const mo=/\s*!important$/;function Qt(e,t,s){if(F(s))s.forEach(n=>Qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Jr(e,t);mo.test(s)?e.setProperty(yt(n),s.replace(mo,""),"important"):e[n]=s}}const vo=["Webkit","Moz","ms"],an={};function Jr(e,t){const s=an[t];if(s)return s;let n=Be(t);if(n!=="filter"&&n in e)return an[t]=n;n=Uo(n);for(let o=0;o<vo.length;o++){const i=vo[o]+n;if(i in e)return an[t]=i}return t}function Yr(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ce(n)&&s===n}const bo="http://www.w3.org/1999/xlink";function yo(e,t,s,n,o,i=tl(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(bo,t.slice(6,t.length)):e.setAttributeNS(bo,t,s):s==null||i&&!jo(s)?e.removeAttribute(t):e.setAttribute(t,i?"":tt(s)?String(s):s)}function xo(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ui(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const r=i==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(r!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=jo(s):s==null&&r==="string"?(s="",l=!0):r==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function dt(e,t,s,n){e.addEventListener(t,s,n)}function Xr(e,t,s,n){e.removeEventListener(t,s,n)}const _o=Symbol("_vei");function Zr(e,t,s,n,o=null){const i=e[_o]||(e[_o]={}),l=i[t];if(n&&l)l.value=n;else{const[r,c]=ta(t);if(n){const g=i[t]=oa(n,o);dt(e,r,g,c)}else l&&(Xr(e,r,l,c),i[t]=void 0)}}const Qr=/(Once|Passive|Capture)$/,ea=/^on:?(?:Once|Passive|Capture)$/;function ta(e){let t,s;for(;(s=e.match(Qr))&&!ea.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):yt(e.slice(2)),t]}let cn=0;const sa=Promise.resolve(),na=()=>cn||(sa.then(()=>cn=0),cn=Date.now());function oa(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(F(o)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=o.slice(),r=[n];for(let c=0;c<l.length&&!n._stopped;c++){const g=l[c];g&&We(g,t,5,r)}}else We(o,t,5,[n])};return s.value=e,s.attached=na(),s}const wo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ia=(e,t,s,n,o
Line truncated
|
||||
**/let wn;const ho=typeof window<"u"&&window.trustedTypes;if(ho)try{wn=ho.createPolicy("vue",{createHTML:e=>e})}catch{}const Ui=wn?e=>wn.createHTML(e):e=>e,Vr="http://www.w3.org/2000/svg",Hr="http://www.w3.org/1998/Math/MathML",at=typeof document<"u"?document:null,go=at&&at.createElement("template"),Br={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?at.createElementNS(Vr,e):t==="mathml"?at.createElementNS(Hr,e):s?at.createElement(e,{is:s}):at.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{go.innerHTML=Ui(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const r=go.content;if(n==="svg"||n==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Kr=Symbol("_vtc");function zr(e,t,s){const n=e[Kr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ls=Symbol("_vod"),$i=Symbol("_vsh"),Jt={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ls]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Yt(e,!0),n.enter(e)):n.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Ls]:"none",e[$i]=!t}const Wr=Symbol(""),Gr=/(?:^|;)\s*display\s*:/;function qr(e,t,s){const n=e.style,o=ce(s);let i=!1;if(s&&!o){if(t)if(ce(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&Qt(n,r,"")}else for(const l in t)s[l]==null&&Qt(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?Yr(e,l,!ce(t)&&t?t[l]:void 0,r)||Qt(n,l,r):Qt(n,l,"")}}else if(o){if(t!==s){const l=n[Wr];l&&(s+=";"+l),n.cssText=s,i=Gr.test(s)}}else t&&e.removeAttribute("style");Ls in e&&(e[Ls]=i?n.display:"",e[$i]&&(n.display="none"))}const mo=/\s*!important$/;function Qt(e,t,s){if(F(s))s.forEach(n=>Qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Jr(e,t);mo.test(s)?e.setProperty(yt(n),s.replace(mo,""),"important"):e[n]=s}}const vo=["Webkit","Moz","ms"],an={};function Jr(e,t){const s=an[t];if(s)return s;let n=Be(t);if(n!=="filter"&&n in e)return an[t]=n;n=Uo(n);for(let o=0;o<vo.length;o++){const i=vo[o]+n;if(i in e)return an[t]=i}return t}function Yr(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ce(n)&&s===n}const bo="http://www.w3.org/1999/xlink";function yo(e,t,s,n,o,i=tl(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(bo,t.slice(6,t.length)):e.setAttributeNS(bo,t,s):s==null||i&&!jo(s)?e.removeAttribute(t):e.setAttribute(t,i?"":tt(s)?String(s):s)}function xo(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ui(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const r=i==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(r!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=jo(s):s==null&&r==="string"?(s="",l=!0):r==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function dt(e,t,s,n){e.addEventListener(t,s,n)}function Xr(e,t,s,n){e.removeEventListener(t,s,n)}const _o=Symbol("_vei");function Zr(e,t,s,n,o=null){const i=e[_o]||(e[_o]={}),l=i[t];if(n&&l)l.value=n;else{const[r,c]=ta(t);if(n){const g=i[t]=oa(n,o);dt(e,r,g,c)}else l&&(Xr(e,r,l,c),i[t]=void 0)}}const Qr=/(Once|Passive|Capture)$/,ea=/^on:?(?:Once|Passive|Capture)$/;function ta(e){let t,s;for(;(s=e.match(Qr))&&!ea.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):yt(e.slice(2)),t]}let cn=0;const sa=Promise.resolve(),na=()=>cn||(sa.then(()=>cn=0),cn=Date.now());function oa(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(F(o)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=o.slice(),r=[n];for(let c=0;c<l.length&&!n._stopped;c++){const g=l[c];g&&We(g,t,5,r)}}else We(o,t,5,[n])};return s.value=e,s.attached=na(),s}const wo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ia=(e,t,s,n,o
Line truncated
|
||||
Reference in new issue
Block a user