charlieroberts / interface.js

gui library for music / arts applications that works with touch, mouse and motion events
213 stars 45 forks source link

Buttons don't lose focus on fullscreen #22

Open aferriss opened 7 years ago

aferriss commented 7 years ago

I'm using the onmousedown property to call canvas.webkitRequestFullScreen(), however after I exit from fullscreen, the full screen button still has it's focus. Clicking any other widget will call the onmousedown event again, returning me to fullscreen. I solved this turning off focus again in the event handler.

   fullScreenBtn = new iFace.Button({
      bounds: [0,0.45,0.998, 0.1],
      label: 'Fullscreen',
      mode: 'contact',
      onmousedown: function (){
        this.hasFocus = false; 
        canvas.webkitRequestFullScreen();
      }
    });
aferriss commented 7 years ago

Actually I've noticed this is a problem with some other widgets as well. For instance if I click and hold on a slider/crossfader to change its value and my mouse is outside of it's bounds when I release, the onmouseup event never fires.

TVoorend commented 7 years ago

Hi,

The email address you sent this to is not correct, who are you trying to reach?

Kind regards,

Gillis

ICT Edenspiekermann

Op 3 mrt. 2017, om 22:14 heeft Adam Ferriss notifications@github.com het volgende geschreven:

Actually I've noticed this is a problem with some other widgets as well. For instance if I click and hold on a slider/crossfader to change its value and my mouse goes outside of it's bounds, the onmouseup event never fires.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/charlieroberts/interface.js/issues/22#issuecomment-284071767, or mute the thread https://github.com/notifications/unsubscribe-auth/ADXxqns-xE5zYZYlyMf3MHb4gZLUoGsVks5riIKigaJpZM4MPCii.

aferriss commented 7 years ago

@TVoorend Not sure how you ended up getting that notification. Was trying to reach the repo author @charlieroberts

TVoorend commented 7 years ago

ah I guess the email Ted entered at Github is incorrect. As he no longer works for Edenspiekermann I won’t be able to reach him to change this. Do you have other means to contact him? Last info I have is he now works for Inventdesign http://www.ledisvet.nl/ (http://www.ledisvet.nl/ http://www.ledisvet.nl/).

gr Gillis

Op 3 mrt. 2017, om 22:19 heeft Adam Ferriss notifications@github.com het volgende geschreven:

@TVoorend https://github.com/TVoorend Not sure how you ended up getting that notification. Was trying to reach the repo author @charlieroberts https://github.com/charlieroberts — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/charlieroberts/interface.js/issues/22#issuecomment-284072940, or mute the thread https://github.com/notifications/unsubscribe-auth/ADXxqmw5WWmOoj1NkWU1FC7K-VTqea3xks5riIPogaJpZM4MPCii.

charlieroberts commented 7 years ago

Gillis,

Ted "watched" notifications about this repo, which is why you're receiving emails. To stop receiving them, just "unwatch" the repo.

@aferriss Which branch of interface.js are you using? The v2 branch is the one currently under development that probably works the best.

aferriss commented 7 years ago

@charlieroberts I'm using master, is it much behind v2?

charlieroberts commented 7 years ago

It's ahead in some ways, behind in others. v2 is basically a complete rewrite, almost from scratch. It's better engineered and it should be easier to fix problems as they pop-up. But v2 is behind in terms of implementing some of the widgets, and way behind in terms of documentation.

Right now v2 has Button, Slider, MultiButton, MultiSlider, Knob, Joystick, and Menu. If you'd like to try it but need another one of the widgets implemented let me know... that'd be a good excuse for me to dive into working on it again. Best way to get a feel for it is to look in the examples folder.

aferriss commented 7 years ago

@charlieroberts Ah good to know! Unfortunately I've been tweaking the master branch quite a bit to suit my needs to moving everything over might be a bit more than I am ready to chew at the moment. I'd need the range and crossfader widgets as well.

Thanks for all your work on the library though! It seems to work great aside from these small things. Excited to see v2 when it comes out! :D