@grame/faustwasm 0.4.5 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYING.txt +520 -0
- package/README.md +4 -4
- package/assets/standalone/create-node.js +78 -0
- package/assets/standalone/faust-ui/index.css +8 -0
- package/assets/standalone/faust-ui/index.css.map +1 -1
- package/assets/standalone/faust-ui/index.js +56 -30
- package/assets/standalone/faust-ui/index.js.map +1 -1
- package/assets/standalone/faustwasm/index.d.ts +18 -10
- package/assets/standalone/faustwasm/index.js +81 -56
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/assets/standalone/index-template.html +17 -0
- package/assets/standalone/index-template.js +48 -0
- package/assets/standalone/index.html +4 -3
- package/assets/standalone/index.js +14 -71
- package/assets/standalone/manifest.json +5 -6
- package/assets/standalone/service-worker.js +51 -27
- package/dist/cjs/index.d.ts +18 -10
- package/dist/cjs/index.js +81 -56
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.d.ts +18 -10
- package/dist/cjs-bundle/index.js +81 -56
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.d.ts +18 -10
- package/dist/esm/index.js +81 -56
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.d.ts +18 -10
- package/dist/esm-bundle/index.js +81 -56
- package/dist/esm-bundle/index.js.map +2 -2
- package/fileutils.js +19 -21
- package/package.json +4 -2
- package/scripts/faust2wasm.js +10 -5
- package/src/FaustAudioWorkletNode.ts +18 -38
- package/src/FaustAudioWorkletProcessor.ts +28 -1
- package/src/FaustDspGenerator.ts +18 -9
- package/src/FaustFFTAudioWorkletProcessor.ts +27 -0
- package/src/FaustScriptProcessorNode.ts +5 -14
- package/src/copyWebStandaloneAssets.d.ts +2 -2
- package/src/copyWebStandaloneAssets.js +30 -19
- package/src/faust2wasmFiles.js +5 -5
- package/test/faustlive-wasm/faust-ui/index.css +8 -0
- package/test/faustlive-wasm/faust-ui/index.css.map +1 -1
- package/test/faustlive-wasm/faust-ui/index.js +56 -30
- package/test/faustlive-wasm/faust-ui/index.js.map +1 -1
- package/test/faustlive-wasm/faustwasm/index.d.ts +18 -10
- package/test/faustlive-wasm/faustwasm/index.js +81 -56
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/assets/standalone/index-poly.js +0 -234
- package/assets/standalone/service-worker-poly.js +0 -98
- package/assets/standalone/template-poly.html +0 -60
- package/assets/standalone/template.html +0 -50
- package/assets/standalone/template.js +0 -63
- package/assets/standalone/types.d.ts +0 -9
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
display: block;
|
|
54
54
|
height: 100%;
|
|
55
55
|
width: 100%;
|
|
56
|
+
touch-action: none;
|
|
56
57
|
}
|
|
57
58
|
.faust-ui-component.faust-ui-component-vslider > .faust-ui-component-vslider-flexdiv input {
|
|
58
59
|
position: relative;
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
display: block;
|
|
99
100
|
height: 100%;
|
|
100
101
|
width: 100%;
|
|
102
|
+
touch-action: none;
|
|
101
103
|
}
|
|
102
104
|
.faust-ui-component.faust-ui-component-hslider > .faust-ui-component-hslider-flexdiv > input {
|
|
103
105
|
position: relative;
|
|
@@ -162,6 +164,7 @@
|
|
|
162
164
|
border-radius: 4px;
|
|
163
165
|
flex: 1 0 auto;
|
|
164
166
|
border-style: solid;
|
|
167
|
+
touch-action: none;
|
|
165
168
|
}
|
|
166
169
|
.faust-ui-component.faust-ui-component-button > div > span {
|
|
167
170
|
user-select: none;
|
|
@@ -179,6 +182,7 @@
|
|
|
179
182
|
border-radius: 1px;
|
|
180
183
|
flex: 1 0 auto;
|
|
181
184
|
border-style: solid;
|
|
185
|
+
touch-action: none;
|
|
182
186
|
}
|
|
183
187
|
.faust-ui-component.faust-ui-component-checkbox > div > span {
|
|
184
188
|
margin: auto;
|
|
@@ -196,6 +200,7 @@
|
|
|
196
200
|
flex: 1 1 auto;
|
|
197
201
|
min-height: 50%;
|
|
198
202
|
width: 100%;
|
|
203
|
+
touch-action: none;
|
|
199
204
|
}
|
|
200
205
|
.faust-ui-component.faust-ui-component-knob > input {
|
|
201
206
|
position: relative;
|
|
@@ -271,6 +276,7 @@
|
|
|
271
276
|
display: block;
|
|
272
277
|
height: 100%;
|
|
273
278
|
width: 100%;
|
|
279
|
+
touch-action: none;
|
|
274
280
|
}
|
|
275
281
|
/*!************************************************************************************************************************!*\
|
|
276
282
|
!*** css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/components/Numerical.scss ***!
|
|
@@ -318,6 +324,7 @@
|
|
|
318
324
|
display: block;
|
|
319
325
|
height: 100%;
|
|
320
326
|
width: 100%;
|
|
327
|
+
touch-action: none;
|
|
321
328
|
}
|
|
322
329
|
.faust-ui-component.faust-ui-component-vbargraph > .faust-ui-component-vbargraph-flexdiv > input {
|
|
323
330
|
position: relative;
|
|
@@ -358,6 +365,7 @@
|
|
|
358
365
|
display: block;
|
|
359
366
|
height: 100%;
|
|
360
367
|
width: 100%;
|
|
368
|
+
touch-action: none;
|
|
361
369
|
}
|
|
362
370
|
.faust-ui-component.faust-ui-component-hbargraph > .faust-ui-component-hbargraph-flexdiv > input {
|
|
363
371
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.css","mappings":";;;AAAA;EACI;EACA;EACA;EACA;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAAI;EACI;AAER,C;;;;ACvBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ;AAFY;EAEI;EACA;AAGhB,C;;;;AC1CI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ;AAAY;EAEI;EACA;AAChB,C;;;;ACxCA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;AAEZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACbA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;EACA;AAEZ,C;;;;AC1BA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACVA;EACI;AACJ;AAAI;EACI;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;AAGZ,C;;;;ACnBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ,C;;;;ACjBA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACdA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ,C;;;;ACrCI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ,C;;;;AClCA;EACI;EACA;EACA;EACA;EACA;AAAJ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;AAEZ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAEZ;AADY;EACI;AAGhB;AADY;EACI;EACA;AAGhB,C;;;;AC3CA;EACI;EACA;EACA;EACA;EACA;EACA;AACJ,C","sources":["webpack://@shren/faust-ui/./src/components/Base.scss","webpack://@shren/faust-ui/./src/components/VSlider.scss","webpack://@shren/faust-ui/./src/components/HSlider.scss","webpack://@shren/faust-ui/./src/components/Nentry.scss","webpack://@shren/faust-ui/./src/components/Soundfile.scss","webpack://@shren/faust-ui/./src/components/Button.scss","webpack://@shren/faust-ui/./src/components/Checkbox.scss","webpack://@shren/faust-ui/./src/components/Knob.scss","webpack://@shren/faust-ui/./src/components/Menu.scss","webpack://@shren/faust-ui/./src/components/Radio.scss","webpack://@shren/faust-ui/./src/components/Led.scss","webpack://@shren/faust-ui/./src/components/Numerical.scss","webpack://@shren/faust-ui/./src/components/VBargraph.scss","webpack://@shren/faust-ui/./src/components/HBargraph.scss","webpack://@shren/faust-ui/./src/components/Group.scss","webpack://@shren/faust-ui/./src/index.scss"],"sourcesContent":[".faust-ui-component {\n display: flex;\n position: absolute;\n flex-direction: column;\n overflow: hidden;\n &:focus {\n outline: none;\n }\n & > .faust-ui-component-label {\n position: relative;\n margin-top: 4px;\n width: 100%;\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & input {\n box-shadow: none;\n }\n}",".faust-ui-component.faust-ui-component-vslider {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-vslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n }\n }\n & input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance:textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}",".faust-ui-component.faust-ui-component-hslider {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n -moz-appearance:textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}\n",".faust-ui-component.faust-ui-component-nentry {\n align-items: center;\n & input {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n opacity: 1;\n }\n }\n}",".faust-ui-component.faust-ui-component-soundfile {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-button {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-checkbox {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 1px;\n flex: 1 0 auto;\n border-style: solid;\n & > span {\n margin: auto;\n user-select: none;\n }\n }\n}",".faust-ui-component.faust-ui-component-knob {\n align-items: center;\n & > canvas {\n position: relative;\n display: block;\n flex: 1 1 auto;\n min-height: 50%;\n width: 100%;\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 0px;\n border-width: 0px;\n border-radius: 4px;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance:textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n}",".faust-ui-component.faust-ui-component-menu {\n align-items: center;\n & > select {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n }\n}",".faust-ui-component.faust-ui-component-radio {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n margin-top: auto;\n }\n & > .faust-ui-component-radio-group {\n flex: 0 0 auto;\n margin-bottom: auto;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n & > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n}",".faust-ui-component.faust-ui-component-led {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-led-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-numerical {\n align-items: center;\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n}",".faust-ui-component.faust-ui-component-vbargraph {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: inherit;\n & > .faust-ui-component-vbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-hbargraph {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n }\n }\n}","\n.faust-ui-group {\n position: absolute;\n display: block;\n background-color: rgba(80, 80, 80, 0.75);\n border-radius: 4px;\n border: 1px rgba(255, 255, 255, 0.25) solid;\n & > .faust-ui-group-label {\n position: relative;\n margin: 4px;\n width: calc(100% - 8px);\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & .faust-ui-tgroup-tabs {\n position: absolute;\n display: inline-block;\n white-space: nowrap;\n left: 0px;\n & .faust-ui-tgroup-tab {\n position: relative;\n display: inline-block;\n border-radius: 5px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: none;\n margin: 10px;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.5);\n &:hover {\n background-color: rgba(255, 255, 255, 1);\n }\n &.active {\n background-color: rgba(40, 40, 40, 1);\n color: white;\n }\n }\n }\n}",".faust-ui-root {\n margin: 0px auto;\n flex: 1 0 auto;\n position: relative !important;\n background-color: transparent !important;\n border: none !important;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.css","mappings":";;;AAAA;EACI;EACA;EACA;EACA;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAAI;EACI;AAER,C;;;;ACvBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ;AAFY;EAEI;EACA;AAGhB,C;;;;AC3CI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ;AAAY;EAEI;EACA;AAChB,C;;;;ACzCA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;AAEZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACbI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACdA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;EACA;AAEZ,C;;;;AC3BA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACVA;EACI;AACJ;AAAI;EACI;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;AAGZ,C;;;;ACnBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;EACA;AAGZ,C;;;;AClBA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACdA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ,C;;;;ACtCI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ,C;;;;ACnCA;EACI;EACA;EACA;EACA;EACA;AAAJ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;AAEZ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAEZ;AADY;EACI;AAGhB;AADY;EACI;EACA;AAGhB,C;;;;AC3CA;EACI;EACA;EACA;EACA;EACA;EACA;AACJ,C","sources":["webpack://@shren/faust-ui/./src/components/Base.scss","webpack://@shren/faust-ui/./src/components/VSlider.scss","webpack://@shren/faust-ui/./src/components/HSlider.scss","webpack://@shren/faust-ui/./src/components/Nentry.scss","webpack://@shren/faust-ui/./src/components/Soundfile.scss","webpack://@shren/faust-ui/./src/components/Button.scss","webpack://@shren/faust-ui/./src/components/Checkbox.scss","webpack://@shren/faust-ui/./src/components/Knob.scss","webpack://@shren/faust-ui/./src/components/Menu.scss","webpack://@shren/faust-ui/./src/components/Radio.scss","webpack://@shren/faust-ui/./src/components/Led.scss","webpack://@shren/faust-ui/./src/components/Numerical.scss","webpack://@shren/faust-ui/./src/components/VBargraph.scss","webpack://@shren/faust-ui/./src/components/HBargraph.scss","webpack://@shren/faust-ui/./src/components/Group.scss","webpack://@shren/faust-ui/./src/index.scss"],"sourcesContent":[".faust-ui-component {\n display: flex;\n position: absolute;\n flex-direction: column;\n overflow: hidden;\n &:focus {\n outline: none;\n }\n & > .faust-ui-component-label {\n position: relative;\n margin-top: 4px;\n width: 100%;\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & input {\n box-shadow: none;\n }\n}",".faust-ui-component.faust-ui-component-vslider {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-vslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance:textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}",".faust-ui-component.faust-ui-component-hslider {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n -moz-appearance: textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}\n",".faust-ui-component.faust-ui-component-nentry {\n align-items: center;\n & input {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n opacity: 1;\n }\n }\n}",".faust-ui-component.faust-ui-component-soundfile {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-button {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n touch-action: none;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-checkbox {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 1px;\n flex: 1 0 auto;\n border-style: solid;\n touch-action: none;\n & > span {\n margin: auto;\n user-select: none;\n }\n }\n}",".faust-ui-component.faust-ui-component-knob {\n align-items: center;\n & > canvas {\n position: relative;\n display: block;\n flex: 1 1 auto;\n min-height: 50%;\n width: 100%;\n touch-action: none;\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 0px;\n border-width: 0px;\n border-radius: 4px;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance: textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n}",".faust-ui-component.faust-ui-component-menu {\n align-items: center;\n & > select {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n }\n}",".faust-ui-component.faust-ui-component-radio {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n margin-top: auto;\n }\n & > .faust-ui-component-radio-group {\n flex: 0 0 auto;\n margin-bottom: auto;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n & > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n}",".faust-ui-component.faust-ui-component-led {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-led-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-numerical {\n align-items: center;\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n}",".faust-ui-component.faust-ui-component-vbargraph {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: inherit;\n & > .faust-ui-component-vbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-hbargraph {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n }\n }\n}","\n.faust-ui-group {\n position: absolute;\n display: block;\n background-color: rgba(80, 80, 80, 0.75);\n border-radius: 4px;\n border: 1px rgba(255, 255, 255, 0.25) solid;\n & > .faust-ui-group-label {\n position: relative;\n margin: 4px;\n width: calc(100% - 8px);\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & .faust-ui-tgroup-tabs {\n position: absolute;\n display: inline-block;\n white-space: nowrap;\n left: 0px;\n & .faust-ui-tgroup-tab {\n position: relative;\n display: inline-block;\n border-radius: 5px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: none;\n margin: 10px;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.5);\n &:hover {\n background-color: rgba(255, 255, 255, 1);\n }\n &.active {\n background-color: rgba(40, 40, 40, 1);\n color: white;\n }\n }\n }\n}",".faust-ui-root {\n margin: 0px auto;\n flex: 1 0 auto;\n position: relative !important;\n background-color: transparent !important;\n border: none !important;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}"],"names":[],"sourceRoot":""}
|
|
@@ -440,7 +440,7 @@ const _AbstractItem = class _AbstractItem extends _AbstractComponent__WEBPACK_IM
|
|
|
440
440
|
const fromX = prevX - rect.left;
|
|
441
441
|
const fromY = prevY - rect.top;
|
|
442
442
|
const prevValue = this.state.value;
|
|
443
|
-
this.
|
|
443
|
+
this.handleMouseOrTouchDown({ pointerId: -1, x: fromX, y: fromY, originalEvent: e });
|
|
444
444
|
const handleTouchMove = (e2) => {
|
|
445
445
|
e2.preventDefault();
|
|
446
446
|
const clientX = e2.changedTouches[0].clientX;
|
|
@@ -451,13 +451,13 @@ const _AbstractItem = class _AbstractItem extends _AbstractComponent__WEBPACK_IM
|
|
|
451
451
|
prevY = clientY;
|
|
452
452
|
const x = clientX - rect.left;
|
|
453
453
|
const y = clientY - rect.top;
|
|
454
|
-
this.
|
|
454
|
+
this.handleMouseOrTouchMove({ pointerId: -1, prevValue, x, y, fromX, fromY, movementX, movementY, originalEvent: e2 });
|
|
455
455
|
};
|
|
456
456
|
const handleTouchEnd = (e2) => {
|
|
457
457
|
e2.preventDefault();
|
|
458
458
|
const x = e2.changedTouches[0].clientX - rect.left;
|
|
459
459
|
const y = e2.changedTouches[0].clientY - rect.top;
|
|
460
|
-
this.
|
|
460
|
+
this.handleMouseOrTouchUp({ pointerId: -1, x, y, originalEvent: e2 });
|
|
461
461
|
document.removeEventListener("touchmove", handleTouchMove);
|
|
462
462
|
document.removeEventListener("touchend", handleTouchEnd);
|
|
463
463
|
};
|
|
@@ -475,18 +475,18 @@ const _AbstractItem = class _AbstractItem extends _AbstractComponent__WEBPACK_IM
|
|
|
475
475
|
const fromX = e.clientX - rect.left;
|
|
476
476
|
const fromY = e.clientY - rect.top;
|
|
477
477
|
const prevValue = this.state.value;
|
|
478
|
-
this.
|
|
478
|
+
this.handleMouseOrTouchDown({ pointerId: -1, x: fromX, y: fromY, originalEvent: e });
|
|
479
479
|
const handleMouseMove = (e2) => {
|
|
480
480
|
e2.preventDefault();
|
|
481
481
|
const x = e2.clientX - rect.left;
|
|
482
482
|
const y = e2.clientY - rect.top;
|
|
483
|
-
this.
|
|
483
|
+
this.handleMouseOrTouchMove({ pointerId: -1, prevValue, x, y, fromX, fromY, movementX: e2.movementX, movementY: e2.movementY, originalEvent: e2 });
|
|
484
484
|
};
|
|
485
485
|
const handleMouseUp = (e2) => {
|
|
486
486
|
e2.preventDefault();
|
|
487
487
|
const x = e2.clientX - rect.left;
|
|
488
488
|
const y = e2.clientY - rect.top;
|
|
489
|
-
this.
|
|
489
|
+
this.handleMouseOrTouchUp({ pointerId: -1, x, y, originalEvent: e2 });
|
|
490
490
|
document.removeEventListener("mousemove", handleMouseMove);
|
|
491
491
|
document.removeEventListener("mouseup", handleMouseUp);
|
|
492
492
|
};
|
|
@@ -500,10 +500,38 @@ const _AbstractItem = class _AbstractItem extends _AbstractComponent__WEBPACK_IM
|
|
|
500
500
|
this.handleContextMenu = (e) => {
|
|
501
501
|
};
|
|
502
502
|
this.handlePointerDown = (e) => {
|
|
503
|
+
e.preventDefault();
|
|
504
|
+
e.currentTarget.focus();
|
|
505
|
+
const { pointerId } = e;
|
|
506
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
507
|
+
const fromX = e.clientX - rect.left;
|
|
508
|
+
const fromY = e.clientY - rect.top;
|
|
509
|
+
const prevValue = this.state.value;
|
|
510
|
+
this.handleMouseOrTouchDown({ pointerId, x: fromX, y: fromY, originalEvent: e });
|
|
511
|
+
const handlePointerMove = (e2) => {
|
|
512
|
+
if (e2.pointerId !== pointerId) return;
|
|
513
|
+
e2.preventDefault();
|
|
514
|
+
const x = e2.clientX - rect.left;
|
|
515
|
+
const y = e2.clientY - rect.top;
|
|
516
|
+
this.handleMouseOrTouchMove({ pointerId, prevValue, x, y, fromX, fromY, movementX: e2.movementX, movementY: e2.movementY, originalEvent: e2 });
|
|
517
|
+
};
|
|
518
|
+
const handlePointerUp = (e2) => {
|
|
519
|
+
if (e2.pointerId !== pointerId) return;
|
|
520
|
+
e2.preventDefault();
|
|
521
|
+
const x = e2.clientX - rect.left;
|
|
522
|
+
const y = e2.clientY - rect.top;
|
|
523
|
+
this.handleMouseOrTouchUp({ pointerId, x, y, originalEvent: e2 });
|
|
524
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
525
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
526
|
+
};
|
|
527
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
528
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
529
|
+
};
|
|
530
|
+
this.handleMouseOrTouchDown = (e) => {
|
|
503
531
|
};
|
|
504
|
-
this.
|
|
532
|
+
this.handleMouseOrTouchMove = (e) => {
|
|
505
533
|
};
|
|
506
|
-
this.
|
|
534
|
+
this.handleMouseOrTouchUp = (e) => {
|
|
507
535
|
};
|
|
508
536
|
this.handleFocusIn = (e) => this.setState({ focus: true });
|
|
509
537
|
this.handleFocusOut = (e) => this.setState({ focus: false });
|
|
@@ -729,10 +757,13 @@ class Button extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
729
757
|
this.btn.style.fontFamily = `${fontname}, sans-serif`;
|
|
730
758
|
this.btn.style.fontStyle = fontface;
|
|
731
759
|
};
|
|
732
|
-
this.
|
|
760
|
+
this.handleContextMenu = (e) => {
|
|
761
|
+
e.preventDefault();
|
|
762
|
+
};
|
|
763
|
+
this.handleMouseOrTouchDown = () => {
|
|
733
764
|
this.setValue(1);
|
|
734
765
|
};
|
|
735
|
-
this.
|
|
766
|
+
this.handleMouseOrTouchUp = () => {
|
|
736
767
|
this.setValue(0);
|
|
737
768
|
};
|
|
738
769
|
}
|
|
@@ -767,8 +798,8 @@ class Button extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
767
798
|
}
|
|
768
799
|
componentDidMount() {
|
|
769
800
|
super.componentDidMount();
|
|
770
|
-
this.btn.addEventListener("
|
|
771
|
-
this.btn.addEventListener("
|
|
801
|
+
this.btn.addEventListener("pointerdown", this.handlePointerDown);
|
|
802
|
+
this.btn.addEventListener("contextmenu", this.handleContextMenu);
|
|
772
803
|
this.on("style", () => this.schedule(this.setStyle));
|
|
773
804
|
const labelChange = () => this.span.innerText = this.state.label;
|
|
774
805
|
this.on("label", () => this.schedule(labelChange));
|
|
@@ -798,10 +829,10 @@ class Checkbox extends _Button__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
798
829
|
constructor() {
|
|
799
830
|
super(...arguments);
|
|
800
831
|
this.className = "checkbox";
|
|
801
|
-
this.
|
|
832
|
+
this.handleMouseOrTouchDown = () => {
|
|
802
833
|
this.setValue(1 - this.state.value);
|
|
803
834
|
};
|
|
804
|
-
this.
|
|
835
|
+
this.handleMouseOrTouchUp = () => {
|
|
805
836
|
};
|
|
806
837
|
}
|
|
807
838
|
}
|
|
@@ -1315,7 +1346,7 @@ class Knob extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1315
1346
|
this.handleChange = (e) => {
|
|
1316
1347
|
const value = parseFloat(e.currentTarget.value);
|
|
1317
1348
|
if (isFinite(value)) {
|
|
1318
|
-
const changed = this.setValue(+
|
|
1349
|
+
const changed = this.setValue(+value);
|
|
1319
1350
|
if (changed) return;
|
|
1320
1351
|
}
|
|
1321
1352
|
this.input.value = this.inputNumber.value + (this.state.unit || "");
|
|
@@ -1369,7 +1400,7 @@ class Knob extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1369
1400
|
ctx.lineTo(valuePosX, valuePosY);
|
|
1370
1401
|
ctx.stroke();
|
|
1371
1402
|
};
|
|
1372
|
-
this.
|
|
1403
|
+
this.handleMouseOrTouchMove = (e) => {
|
|
1373
1404
|
const newValue = this.getValueFromDelta(e);
|
|
1374
1405
|
if (newValue !== this.state.value) this.setValue(newValue);
|
|
1375
1406
|
};
|
|
@@ -1413,8 +1444,7 @@ class Knob extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1413
1444
|
componentDidMount() {
|
|
1414
1445
|
super.componentDidMount();
|
|
1415
1446
|
this.input.addEventListener("change", this.handleChange);
|
|
1416
|
-
this.canvas.addEventListener("
|
|
1417
|
-
this.canvas.addEventListener("touchstart", this.handleTouchStart, { passive: false });
|
|
1447
|
+
this.canvas.addEventListener("pointerdown", this.handlePointerDown);
|
|
1418
1448
|
this.on("style", () => {
|
|
1419
1449
|
this.schedule(this.setStyle);
|
|
1420
1450
|
this.schedule(this.paint);
|
|
@@ -1590,8 +1620,7 @@ class Led extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1590
1620
|
}
|
|
1591
1621
|
componentDidMount() {
|
|
1592
1622
|
super.componentDidMount();
|
|
1593
|
-
this.canvas.addEventListener("
|
|
1594
|
-
this.canvas.addEventListener("touchstart", this.handleTouchStart, { passive: false });
|
|
1623
|
+
this.canvas.addEventListener("pointerdown", this.handlePointerDown);
|
|
1595
1624
|
this.on("style", () => this.schedule(this.setStyle));
|
|
1596
1625
|
this.on("label", () => this.schedule(this.paintLabel));
|
|
1597
1626
|
this.on("value", () => this.schedule(this.paint));
|
|
@@ -2067,9 +2096,9 @@ class Soundfile extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2067
2096
|
this.btn.style.fontFamily = `${fontname}, sans-serif`;
|
|
2068
2097
|
this.btn.style.fontStyle = fontface;
|
|
2069
2098
|
};
|
|
2070
|
-
this.
|
|
2099
|
+
this.handleMouseOrTouchDown = () => {
|
|
2071
2100
|
};
|
|
2072
|
-
this.
|
|
2101
|
+
this.handleMouseOrTouchUp = () => {
|
|
2073
2102
|
};
|
|
2074
2103
|
}
|
|
2075
2104
|
static get defaultProps() {
|
|
@@ -2103,8 +2132,7 @@ class Soundfile extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2103
2132
|
}
|
|
2104
2133
|
componentDidMount() {
|
|
2105
2134
|
super.componentDidMount();
|
|
2106
|
-
this.btn.addEventListener("
|
|
2107
|
-
this.btn.addEventListener("touchstart", this.handleTouchStart);
|
|
2135
|
+
this.btn.addEventListener("pointerdown", this.handlePointerDown);
|
|
2108
2136
|
this.on("style", () => this.schedule(this.setStyle));
|
|
2109
2137
|
const labelChange = () => this.span.innerText = this.state.label;
|
|
2110
2138
|
this.on("label", () => this.schedule(labelChange));
|
|
@@ -2273,8 +2301,7 @@ class VBargraph extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2273
2301
|
}
|
|
2274
2302
|
componentDidMount() {
|
|
2275
2303
|
super.componentDidMount();
|
|
2276
|
-
this.canvas.addEventListener("
|
|
2277
|
-
this.canvas.addEventListener("touchstart", this.handleTouchStart, { passive: false });
|
|
2304
|
+
this.canvas.addEventListener("pointerdown", this.handlePointerDown);
|
|
2278
2305
|
this.on("style", () => {
|
|
2279
2306
|
this.schedule(this.setStyle);
|
|
2280
2307
|
this.schedule(this.paint);
|
|
@@ -2388,13 +2415,13 @@ class VSlider extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2388
2415
|
ctx.fillStyle = slidercolor;
|
|
2389
2416
|
(0,_utils__WEBPACK_IMPORTED_MODULE_1__.fillRoundedRect)(ctx, left - drawWidth, top + drawHeight * (1 - distance) - drawWidth, drawWidth * 3, drawWidth * 2, borderRadius);
|
|
2390
2417
|
};
|
|
2391
|
-
this.
|
|
2418
|
+
this.handleMouseOrTouchDown = (e) => {
|
|
2392
2419
|
const { value } = this.state;
|
|
2393
2420
|
if (e.x < this.interactionRect[0] || e.x > this.interactionRect[0] + this.interactionRect[2] || e.y < this.interactionRect[1] || e.y > this.interactionRect[1] + this.interactionRect[3]) return;
|
|
2394
2421
|
const newValue = this.getValueFromPos(e);
|
|
2395
2422
|
if (newValue !== value) this.setValue(this.getValueFromPos(e));
|
|
2396
2423
|
};
|
|
2397
|
-
this.
|
|
2424
|
+
this.handleMouseOrTouchMove = (e) => {
|
|
2398
2425
|
const newValue = this.getValueFromPos(e);
|
|
2399
2426
|
if (newValue !== this.state.value) this.setValue(newValue);
|
|
2400
2427
|
};
|
|
@@ -2442,8 +2469,7 @@ class VSlider extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2442
2469
|
componentDidMount() {
|
|
2443
2470
|
super.componentDidMount();
|
|
2444
2471
|
this.input.addEventListener("change", this.handleChange);
|
|
2445
|
-
this.canvas.addEventListener("
|
|
2446
|
-
this.canvas.addEventListener("touchstart", this.handleTouchStart, { passive: false });
|
|
2472
|
+
this.canvas.addEventListener("pointerdown", this.handlePointerDown);
|
|
2447
2473
|
this.on("style", () => {
|
|
2448
2474
|
this.schedule(this.setStyle);
|
|
2449
2475
|
this.schedule(this.paint);
|