summaryrefslogtreecommitdiff
path: root/docs/lab
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@figma.com>2019-02-03 10:23:50 +0300
committerRasmus Andersson <rasmus@figma.com>2019-02-03 10:23:50 +0300
commit388ee0d0500efbe6bbcfce91bc43cdc5fb29c708 (patch)
tree8f0a29a1df9430a19f0846a1d884542325b54e8d /docs/lab
parent09430b4e603f7cb884729194dea8f4ef41308835 (diff)
downloadinter-388ee0d0500efbe6bbcfce91bc43cdc5fb29c708.tar.xz
website: lab: query string now only includes customized values
Diffstat (limited to 'docs/lab')
-rw-r--r--docs/lab/index.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/lab/index.html b/docs/lab/index.html
index d3bc254e4..a174aac8d 100644
--- a/docs/lab/index.html
+++ b/docs/lab/index.html
@@ -1628,6 +1628,7 @@ class BoundVar {
this.isNumber = e.type == 'number'
this.lastValue = this.getValue()
this.parentVars = parentVars
+ this.defaultValue = this.lastValue
}
refreshValue(ev) {
@@ -1747,6 +1748,10 @@ class Vars {
getQueryString() {
let pairs = []
this.values.forEach((v, k) => {
+ let vr = this.vars.get(k)
+ if (vr && vr.defaultValue == v) {
+ return // skip
+ }
v = (v === true) ? 1 : (v === false || v === null) ? 0 : v
pairs.push(encodeURIComponent(k) + '=' + encodeURIComponent(v))
})