Page 1 of 1

Solved: HTML5 canvas receives unwanted mouseup messages

Posted: Mon Dec 21, 2020 9:41 pm
by williamdesmet
Hi there,

I made a 1024x768 stack and on preopenstack I do:

Code: Select all

   if the environment is "development" then
      set the fullscreen of me to false
       else
      set the fullscreenmode of me to "showAll"
      set the fullscreen of me to true  
      end if
This makes the HTML5 canvas 'fullscreen' in the browser.
The left and right side of the canvas are wider than the original 1024x768 because my iMac screen is bigger.
In the cardscript I do mouseup. mousedown and mousemove scripts.

What happens is that the left and right side of the canvas receive messages that do no happen within the original (resized) stack.
I don't want it to happen. but I don't know how to stop it.
Flushevents do no work? Are flushevents supported in HTML5?

Does anyone have suggestions?

Greetings,

William

Re: HTML5 canvas receives unwanted mouseup messages

Posted: Tue Dec 22, 2020 10:24 am
by williamdesmet
Solved!
A new day so a new view on things.
I added extra script to the mousemove x,y message and now it works ok.

Code: Select all

if x,y is not within the rect of grp "test"
   then
      put false into tColor
   end if


I like the HTML5 way more and more.