zavolokas / InpaintingSite

Web app for inpainting
GNU Affero General Public License v3.0
5 stars 4 forks source link

Where did the Dot go? #16

Open ferib opened 3 years ago

ferib commented 3 years ago

Ever noticed this blue/green dot when drawing?

It has been removed https://github.com/zavolokas/InpaintingSite/commit/3e0d49ca08f7b3184f52405e6a648a932d133cb2#diff-4e4d83de5636837bd243312538cb827eR200

It was originally a feature that helps the users draw, this may look unnecessary on desktop but it's a neat thing to have when drawing on mobile. The dot was designed to "spawn" if you click on an area so the user can then move the dot by "pushing" it around without having to cover up the area with their thumb.

I suggest we bring the dot back but only use it for mobile? desktop doesn't seem to have a need for it.

zavolokas commented 3 years ago

Sorry @ferib , I didn't get the purpose of the dot and removed it. I do see the value of after you have explained it. So lets bring the dot back for mobile only 👍

FYI: I also changed the painting behavior so that you can paint with your cursor. I'm afraid that also could affect how it works on mobile(haven't tested it)

ferib commented 3 years ago

All mouse/touch events do a basic error handling to check if the canvas exists yet, and then decide to call maskHandler.OnMouseMove() or not. The maskHandler.OnMouseMove() uses the event args to figure out if you are using cursor or touch and then takes whichever one is set. so it should already be possible to paint with (or without) the cursor.

zavolokas commented 3 years ago

I've change the implementation a bit because it was not supporting drawing with the cursor since it was tight to the dot. On desktop the dot is unnecessary.

So I propose to have the behavior that is currently on master for the desktop. For the mobile you can return the dot and related behavior if you want ;)