Solved: HTML5 canvas receives unwanted mouseup messages

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
williamdesmet
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 66
Joined: Tue Jun 26, 2012 7:07 pm

Solved: HTML5 canvas receives unwanted mouseup messages

Post by williamdesmet » Mon Dec 21, 2020 9:41 pm

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
Last edited by williamdesmet on Tue Dec 22, 2020 10:25 am, edited 1 time in total.

williamdesmet
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 66
Joined: Tue Jun 26, 2012 7:07 pm

Re: HTML5 canvas receives unwanted mouseup messages

Post by williamdesmet » Tue Dec 22, 2020 10:24 am

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.

Post Reply

Return to “HTML5”