button: touchCoords typos

This commit is contained in:
jean-emmanuel 2021-12-05 16:39:55 +01:00
parent d11fd0c366
commit 5371989084
2 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
"name": "open-stage-control",
"productName": "Open Stage Control",
"description": "Libre and modular OSC / MIDI controller",
"version": "1.11.1",
"version": "1.11.2",
"author": {
"name": "Jean-Emmanuel Doucet",
"email": "jean-emmanuel@ammd.net"

View file

@ -65,9 +65,9 @@ class Button extends Widget {
this.pulse = null
this.buttonSize = [100, 100]
thid.exposeTouchCoords = this.getProp('script').includes('touchCoords')
this.exposeTouchCoords = this.getProp('script').includes('touchCoords')
this.parsersLocalScope.touchCoords = [0.5, 0.5]
if (thid.exposeTouchCoords) {
if (this.exposeTouchCoords) {
this.on('resize', (e)=>{
this.buttonSize = [e.width, e.height]
}, {element: this.widget})
@ -191,7 +191,7 @@ class Button extends Widget {
this.container.classList.toggle('on', this.state)
this.value = this.getProp(this.state ? 'on' : 'off')
if (thid.exposeTouchCoords) {
if (this.exposeTouchCoords) {
if (options.y !== undefined) {
this.parsersLocalScope.touchCoords = [options.x / this.buttonSize[0], options.y / this.buttonSize[1]]
}